- Nov 4, 2009
- 1,380
- 1
- 0
This is driving me a bit up the wall. I have Ubuntu Server 12.04 x64 running as a VirtualBox guest to Windows 7 x64 Host.
I cannot ssh to this ubuntu installation from any external address on any port other than 22. I can ssh to it on whatever port I want on from itself or another computer on the LAN. I can also ssh to it using port 22 from external addresses.
The Ubuntu server is attached to a bridged network adapter and is assigned a DHCP reservation from my router 10.0.0.3.
Ports are forwarded on my router (cheap RetailPlus thing). I'd be inclined to blame the router but every other forwarding rule works great; minecraft on my desktop, minecraft on a different port on this same Ubuntu server, ssh to the VM host, bittorrent to several desktops in the house.
I did the usual stuff, power cycle the router, reboot the VM and VM host.
AppArmor is disabled per Canonical's instructions.
Windows Firewall on the host is OFF.
Router forwarding page
Server firewall setup (obviously temporary)
SSHD config file relevant bits, I have not changed anything else
Local host and LAN ssh results
External ssh results
I cannot ssh to this ubuntu installation from any external address on any port other than 22. I can ssh to it on whatever port I want on from itself or another computer on the LAN. I can also ssh to it using port 22 from external addresses.
The Ubuntu server is attached to a bridged network adapter and is assigned a DHCP reservation from my router 10.0.0.3.
Ports are forwarded on my router (cheap RetailPlus thing). I'd be inclined to blame the router but every other forwarding rule works great; minecraft on my desktop, minecraft on a different port on this same Ubuntu server, ssh to the VM host, bittorrent to several desktops in the house.
I did the usual stuff, power cycle the router, reboot the VM and VM host.
AppArmor is disabled per Canonical's instructions.
Windows Firewall on the host is OFF.
Router forwarding page
Code:
Current Port Forwarding Table:
Local IP Address Protocol Port Range Comment Select
10.0.0.3 TCP 22 SSH Server
10.0.0.3 TCP 221 SSH Server
10.0.0.3 TCP 23 SSH Server
10.0.0.3 TCP 22201 SSH Server01
Code:
root@server01:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Code:
root@server:~# cat /etc/ssh/sshd_config | grep -i port
# What ports, IPs and protocols we listen for
Port 22
Port 23
Port 221
Port 22201
Code:
root@server:~# ssh -p 22 localhost
root@localhost's password:
root@server:~# ssh -p 23 localhost
root@localhost's password:
root@server:~# ssh -p 221 localhost
root@localhost's password:
root@server:~# ssh -p 22201 localhost
root@localhost's password:
Code:
root@externaladdress[~]# ssh -p 22 my.public.ip.address
[EMAIL="root@my.public.ip.addres"]root@my.public.ip.addres[/EMAIL]'s password:
root@externaladdress[~]# ssh -p 23 my.public.ip.address
ssh: connect to host my.public.ip.address port 23: Connection refused
root@externaladdress[~]# ssh -p 221 my.public.ip.address
ssh: connect to host my.public.ip.address port 221: Connection refused
root@externaladdress[~]# ssh -p 22201 my.public.ip.address
ssh: connect to host my.public.ip.address port 22201: Connection refused
Last edited: