PDA

View Full Version : [ubuntu] SSH server on 2wire router



killjoy123987
March 4th, 2009, 02:33 AM
I have a 2wire 2701HG-G Gateway router and I am trying to set up a SSH server. I have openSSH-server and the ssh client installed and have had no problem testing the yourname@localhost connection but when i try to connect using my IP it just hangs. I have tried to port foreward but no matter what it still just hangs. im not sure but i think it may be waiting for a response thats being blocked. any help is appreciated thanks.

drjimmy42
March 4th, 2009, 02:36 AM
Are you setting up an ssh server on an ubuntu box attached to the server?
From where are you trying to connect with an ssh client?
Paste in the commands you are using in each case, I'm not sure what you mean by "trying to connect with my IP".

killjoy123987
March 4th, 2009, 02:45 AM
when it works i type

ssh yourname@localhost
and when it hangs and doesnt do anything i type

ssh yourname@xx.xx.xxx.xxx.xx
where instead of the x's i put my IP address

I am trying to connect from the computer same computer both times which is the computer im hosting the server on

drjimmy42
March 4th, 2009, 02:55 AM
Is the ip address you are using your external ip address or the one assigned to your ubuntu box by your router? If its the internal one its most likely a 192.168.*.* sort of address.

If you are trying the internal one, it should still work. In that case try adding a -v to ssh to see where it hangs up.

If you are trying your external address assigned to your router by your ISP, then you need to forward port 22 on your router to the local ip address of your ubuntu box. right now traffic shows up at port 22 on your router and it tells it to go away.

killjoy123987
March 4th, 2009, 03:01 AM
I have already port forewarded port 22 on my router but it still doesn't work


Myname@Myname-desktop:~$ sudo ssh Myname@70.27.168.56 -v
OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 70.27.168.56 [70.27.168.56] port 22.
at the risk of getting hacked there is what i got and then it stops and doesnt do anything

drjimmy42
March 4th, 2009, 03:40 AM
Can you ping that address?
You might try nmap (apt-get install nmap) to scan the ports of that ip address and see what appears open from the outside. Most routers won't respond to ping so use nmap with the -P0 option.

Do you have any other ports forwarded on your router? Are they working correctly?

killjoy123987
March 4th, 2009, 03:56 AM
Starting Nmap 4.62 ( http://nmap.org ) at 2009-03-03 21:53 EST
All 1715 scanned ports on bas3-barrie18-1176217656.dsl.bell.ca (70.27.168.56) are filtered

Nmap done: 1 IP address (1 host up) scanned in 36.977 seconds
jeremy@jeremy-desktop:~$


is what i got from nmap

the only other port thats foreworded was my utorrent from windows and i believe it worked correctly

drjimmy42
March 4th, 2009, 03:59 AM
It appears as though port forwarding is not working. If the port were open you would see something like this.


~> nmap -P0 myhost.com

Starting Nmap 4.20 ( http://insecure.org ) at 2009-03-03 21:57 EST
Interesting ports on myhost.com (x.x.z.y):
Not shown: 1696 closed ports
PORT STATE SERVICE
22/tcp open ssh

Nmap finished: 1 IP address (1 host up) scanned in 3.031 seconds

You might check the doc for your router to make sure you have port forwarding set up correctly.

killjoy123987
March 4th, 2009, 06:48 PM
To port foreward i used the turorial for ssh on http://portforward.com/
i looked at the bellsupport and they used the same method

drjimmy42
March 4th, 2009, 08:59 PM
I'm not sure what could be wrong, but according to nmap, that port is not open. Even if it were open and no one was listening it would show something.

killjoy123987
March 4th, 2009, 10:30 PM
Hey I got it to work. It turns out i wasn't port forewarding the right computer. when i did it to my computer it all worked. Thanks for all the help.

mjramon
June 13th, 2012, 03:42 AM
Hey I got it to work. It turns out i wasn't port forewarding the right computer. when i did it to my computer it all worked. Thanks for all the help.
Can you tell us, how do you solve the problem?, please, regards.

efflandt
June 13th, 2012, 04:44 AM
Something to note is that many broadband routers (or by default when Linux itself is a masquerade router) do not route LAN2LAN via public IP (possibly to prevent IP spoofing).

I have a 2Wire 2701HG-B (DSL wireless/router/modem), and have connected ssh in through it from the internet. But I have had no reason to try locally connecting through my public IP when I can connect directly to LAN IP. So I was not sure if the 2Wire blocks LAN2LAN via PPPoE IP.

madverb
June 13th, 2012, 04:58 AM
Nevermind.