LinuxQuestions.org
Review your favorite Linux distribution.
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
 
Search this Thread
Old 11-20-2004, 01:11 AM   #1
gene_albin
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
cannot ssh to home linux box from work


Ok, This is kind of difficult to describe so it might be a bit long winded. The initial problem:
I need to connect via SSH (and eventually via VPN) from my computer at work to my linux server at home. I have successfully configured my server at home and have established a SSH connection between my laptop (XP) and my linux server, all of which was on my local home lan (behind the router).

Here is my best guess as to how my internet connection is setup. Best guess because I'm not too sure how my isp sets up the connection to the intenet.

Home (Gentoo linux computer)
192.168.x.x
|
192.168.x.x
DI 514 Router
42.161.x.x
|
42.161.x.x
ISP (proxy server? router?)
202.33.x.x (reported by whatismyip.com)
|
Internet
|
132.20.x.x
Work (proxy)
122.20.x.x
|
122.20.x.x
Work Computer (XP)
All of the addresses listed are on private networks, i.e. I can't ping them from the internet, except the 132.20.x.x address and the 202.33.x.x address. Both ends have connectivity to the internet. Port 22 is open for outbount traffic becuase I can establish a SSH connection from each end to a third party server on the internet. The problem is that I can't establish a connection from my work computer to my home computer. I have configured the DI-514 to route port 20 through to my linux box and have configured the firewall to pass the traffic. Yet I still cannot connect. Unfortunately I can't configure my ISP's proxy server.

One more thing. Every 24 hours my ISP requires that I log into his web based authentication server to establish my connection. If 24 hours lapses then when I type in an address in my web browser (from home) then I'm redirected to the login server and have to login. Then I'm directed to the target website. This seems like it is a proxy server although I don't have to put any proxy settings in my web browser or my network setup.

Does anyone out there have any idea how I can establish this SSH connection?

Sorry for the long post, but I'm quite confused and frustrated! TIA

-gene
 
Old 11-20-2004, 03:25 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
if your ISP is giving you only private IPs, you need to have the ISP do port-forwarding from the first public ip (202.33.x.x) to your router...

=(


Last edited by win32sux; 11-20-2004 at 03:26 AM.
 
Old 11-20-2004, 04:19 AM   #3
gene_albin
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
So that is the only option, huh? It it possible to establish a connection from my home computer to a server on the internet, then from my work computer connect to that same computer on the internet and somehow pass through that connection that is already established from home to get to my home computer... (are you as confused as I am... )
 
Old 11-20-2004, 06:56 AM   #4
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
It's possible that they don't port block incoming connections and the second private address is just a 2 system hop they added for whatever dumb reason, in which case you just need to configure your DI router to port forward port 22 to your linux box's internal IP address. If they block some inbound ports then a possiblity is to change to port that ssh listens on to a higher number like 8000 and then set up your router to forward port 8000 to Linux instead. If they really are using a proxy, or a second NAT then you probably can't get any inbound connections to work, unless you ask them to and they will probably say no if you ask. The other solution I could think of to the second NAT/proxy problem would be to change ISPs
 
Old 11-20-2004, 07:26 AM   #5
kyiydnlm
LQ Newbie
 
Registered: Nov 2004
Posts: 6

Rep: Reputation: 0
No matter what they did, you can do this.

You should code two programs: SSHServer and SSHClient

SSHClient running on your server on the internet listens to port 12345 (you can use any unoccupied port)

SSHServer running on your home computer makes a connection to SSHClient on port 12345

Then transfer commands and reply between SSHServer and SSHClient

The programs are not hard to code and won't need much work.

They look should like these (They are your own SSH system

SSHClient:
main()
{
/* listen to port 12345 */
/* user and password code goes here */
/* pack command package */
/* package send */
/* listen for reply package */
}

SSHServer:
main()
{
/* connect to SSHServer on port 12345 */
/* you can also write some codes to verify the privilege of the connection, and execute command with the user's privilege. but if you run SSHServer on root, the SSHServer can completely access your home computer */
/* listen for command */
/* receive package */
/* unpack command */
/* execute the command */
/* pack reply package */
/* package send */
}
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding SSH (Sun box to Linux box) oswald21 Linux - Newbie 2 07-08-2006 02:06 PM
ssh to box at home z3nith Linux - Networking 3 09-13-2005 11:22 PM
Joining my Linux box to my XP/98 home network cbjhawks Linux - Networking 2 09-08-2005 11:17 AM
Connect to work box from home box slackist Linux - Networking 4 09-18-2004 05:34 AM
Can't ssh into my box from work. donk3 Linux - Security 3 08-27-2003 07:54 AM


All times are GMT -5. The time now is 09:32 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