LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-14-2006, 03:39 PM   #1
R.S.
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
Can't connect to server via ssh


Problem:
SSH is running and firewall is not blocking it. I can connect from local network to server.
When i'm connecting from outside i get: "Connection refused"

External static network ip: 82.135.200.200
Server ip: 192.168.0.33
Lan ip: 192.168.1.1...

My server is connected to dsl modem which makes me local network from 82.135.200.200 to 192.168.0.33. So i can connect to ssh using 192.168.0.33 or 192.168.1.1 on port 22

But how to connect from outside using 82.135.200.200?

Linux RH 8.0

Thenks.
 
Old 01-14-2006, 04:56 PM   #2
zmanea
Member
 
Registered: Sep 2003
Location: Colorado
Posts: 85

Rep: Reputation: 15
Is the DSL router a firewall? If so you will need to port forward 22 to the Linux box
 
Old 01-14-2006, 05:17 PM   #3
Sir_Limpalot
LQ Newbie
 
Registered: Jan 2006
Location: Norway
Distribution: Debian
Posts: 18

Rep: Reputation: 0
Is the ssh-daemon you're trying to connect to on the firewall or on a machine behind the firewall?
If it's on a system behind the firewall you'll need to forward port 22 to the correct internal ip like so:

iptables -A PREROUTING -i <external interface> -p tcp -m tcp --dport 22 -j DNAT --to-destination <internal ip>:22

(Sorry if you think it's a stupid question, but it wouldn't be the first time anyone made that mistake)

Hope this helps...
 
Old 01-15-2006, 10:35 AM   #4
R.S.
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Original Poster
Rep: Reputation: 0
PREROUTING is not working..

So i understand. My modem is configured to work as router, but i can set up it to work us bridge. There will be no problem.
 
Old 01-15-2006, 04:00 PM   #5
Sir_Limpalot
LQ Newbie
 
Registered: Jan 2006
Location: Norway
Distribution: Debian
Posts: 18

Rep: Reputation: 0
Most routers can be set up to forward ports and ssh is not very hard in this regard, check the web-interface on your router....
 
  


Reply



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
SSH server error on connect rlbewick Mandriva 2 05-02-2005 02:43 PM
can not connect to x server in ssh YellowFin Linux - Newbie 3 03-22-2005 08:35 PM
ssh server I can connect to glennt11 General 1 01-20-2005 12:05 PM
ssh issue: cannot connect to x server jgruss Linux - Software 3 07-14-2004 09:36 AM
cannot connect to X server over ssh ocularbob Linux - General 1 02-03-2003 04:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:06 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration