Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I run Ubuntu 12.04 and have no success connecting with SSH from "Internet". The router is a TL-MR3420 which is set up to forward requests to one of the NIC's on ubuntu machine (which has in total 3 NICs).

I can SSH from a client on the "local" network/LAN.

The forward mechanism in the router seems to work. If I stop SSH service on the Ubuntu machine and instead start one on the windows machine - it works like a charm.

I do not use the Std port 22 but that shouldn't be an issue as far as I understand - sine it works on the same port on the win machine.

Since my public IS isn't static I use a dynDNS service but as said earlier the same setup works from the win machine.

The router is located on 192.168.0.1

The Ubuntu NICs has the following IP: eth2 192.168.0.100 , eth1 192.168.0.101 , eth0 192.168.0.102 and I have forwarded the "outside" request to 192.168.0.100

In regards for firewall settings on the Ubuntu machine I have disabled the ufw and the command ufw status give status: inactive.

I don't now it this is relevant information but

teh command iptables --list give:

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

I have tried to catch traffic with help of wireshark (a tool I'm not too used to use) and it seems as a few (3?) "requests" actually reaches the NIC but ... nothing happens.

The syslog does not show any entries during these attempts.

Perhaps it could be some routing issues but I have reached my level of competence and are stuck ... all help and support to get this sorted out is much appreciated.

I'm new to Linux so please do not assume I have a configuration that is correct - but as I wrote earlier - if the client that initiate SSH is on the LAN it all works.

PS:I have also tried to get VPN (PPP) working from Internet with no success - once again VPN works on the windows machine ... so my best guess is that this is related to how the ubuntu machine handles (IP) traffic and not the TL-MR3420 router or other network issues.

share|improve this question
add comment

1 Answer

What's probably happening is that the SSH service isn't running on all of the network interfaces. Check your /etc/ssh/sshd_config file has this

Port (your port)
#Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0

and that the ListenAddress directive is commented out.

share|improve this answer
    
Tank you for your reply. Both those two lines are commented out in sshd_config. –  Pelle L May 14 '12 at 7:02
    
Tank you for your reply. Both those two lines are commented out in sshd_config. So I assume that this means that the SSH "service" actually is running on all NIC. To me it seems as SSH "refuse" to serve traffic that initiates from internet. Traffic that is forwarded from the router that is. Both SSH and VPN (PPP) "services" works when traffic is initiated from computers on the LAN. I do not understand how this works different on a Ubuntu (linux) machine compared to a win7 machine - cos on a Win7 machine running SSH and PPP services it just works. –  Pelle L May 14 '12 at 7:10
    
Could the fact that I have 3 NIC play a role here? Could it be that a conflict exists between them in regards of how traffic is manages? –  Pelle L May 14 '12 at 16:22
    
@PelleL set listenAddress to the IP(Not MAC) address of the ethernet card you want to use, or you may try 255.255.255.255 if that fails. –  hexafraction Jul 23 '12 at 23:51
    
From memory, if ListenAddress is set to 0.0.0.0 it defaults to listening to any and all IPs; does 255.255.255.255 do the same, or is there a subtle difference? –  jackweirdy Jul 25 '12 at 20:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.