LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-09-2009, 06:28 PM   #1
paranoid times
Member
 
Registered: Jan 2005
Distribution: Fedora Core 3, 4
Posts: 135

Rep: Reputation: 16
SSH tunnel only listening on loopback device. Should also listen on eth0


I have a server at home. Work normally just connects up to it with a reverse ssh connection such that I can get at the work computer easily. The work computer does a few tunnels one for ssh and another for http. The home server recently died. How convent it was that I was working on a new one at the time. Unfortunately it wasn't quite as complete as I expected.

The SSH tunnel is still working fine (after all the keys and such had been copied over). The HTTP tunnel isn't working the way it use to.

server: IP: 192.168.0.57
home computer: IP: 192.168.0.90
work computer: IP: 10.5.2.28

Previously I would connect to work by pointing my home computer at "192.168.0.57:8220" and if I wanted to connect to ssh I would connect up to the server and ssh to "127.0.0.1:9220" netstat is currently showing this:

Code:
tcp   0    0   127.0.0.1:9220       0.0.0.0:*        LISTEN      
tcp   0    0   127.0.0.1:8220       0.0.0.0:*        LISTEN
It use to look like this:

Code:
tcp   0    0   0.0.0.0:9220       0.0.0.0:*        LISTEN      
tcp   0    0   0.0.0.0:8220       0.0.0.0:*        LISTEN
The command that I use to connect up the tunnel is/was (I would just leave it in the crontab running periodically):
Code:
ssh -axfTCR 8220:127.0.0.1:80 michael@home sleep 6h
ssh -axfTCR 9220:127.0.0.1:22 michael@home sleep 6h


I've tried putting a -g on the options. Along with putting the ip address of the home server in front of the port (192.168.0.90:8220:127...) I've looked through ssh_config and sshd_config on both sides. But nothing has stuck out to me or worked yet. The one notable difference that I could think of is the old server (that recently died) was Fedora 2 the new server is CentOS 5.2.

Any thoughts on what could get this working would be greatly appreciated.

Thanks,
Michael
 
Old 02-09-2009, 09:57 PM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 748
Blog Entries: 6

Rep: Reputation: 74
Maybe you can try this way

ssh -axfTCR eth0-ip:8220:127.0.0.1:80 michael@home sleep 6h

because this is the way i tunnel in the linux gateway and keep alive
(ssh -f user@idcserver.net -p 8022 -L 192.168.1.1:8080:idcserver.net:8118 sleep 30d)

hope you get the idea with this
 
Old 02-10-2009, 02:17 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,532
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
Also look for 'autossh', it keeps tunnels alive automagically.
 
Old 02-10-2009, 02:20 PM   #4
paranoid times
Member
 
Registered: Jan 2005
Distribution: Fedora Core 3, 4
Posts: 135

Original Poster
Rep: Reputation: 16
It seems that adding:
Code:
GatewayPorts yes
To the sshd_config file on the home server has made it work. (found at: http://ask.metafilter.com/52931/ssh-...on-remote-side)

Thank you very much for your help though and for letting me know about autossh, I didn't know that it existed and could be much nice then a cron script.

Thanks again,
Michael
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
loopback device renamed to eth0 AAnarchYY Linux - Networking 1 03-29-2007 03:03 PM
Why server socket listen() is not listening seungtaeh Linux - Networking 1 03-09-2007 04:32 AM
SSH reverse tunnel (lo only? why not eth0) Dinomight Linux - Networking 3 08-17-2006 09:44 PM
Postfix won't listen on loopback muff Linux - Software 2 09-07-2005 04:14 PM
xinetd and ipop3 listening only on loopback 3brothers Linux - Networking 3 10-13-2003 05:17 PM


All times are GMT -5. The time now is 11:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration