LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-27-2004, 07:38 AM   #1
xtra
LQ Newbie
 
Registered: Jun 2004
Posts: 20

Rep: Reputation: 0
SSH from Internet to RH9 through xavi 7028r router problem


Okies - I am no linux wizard - needs to be said, right.

I have a running SSHd on my RH9 linux system. I can ssh to it from within my network.

I disabled the linux firewall and restarted the system. Still no problems with accessing it from the lan.

I configured my router to NAT the packets for port 22 to the linbox.

When trying to connect to it through the internet (dial-up laptop, no firewall) I get Network error: connection refused.

Now with what I know from networking I gather as much as it is trying to handshake and it fails.

First, how can I produce data (I see people here who seem to have found some log or degug setting for ssh - where is it?) to see what happens, and even better, how can I fix it?

Thanks!
 
Old 06-27-2004, 07:51 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Welcome to LQ.

You can increase the verbosity by running with "-vvv" - eg:
ssh -vvv user@remotehost

Perhaps you should also check with your ISP incase they block incomming connections on port 22.
 
Old 06-27-2004, 08:51 AM   #3
xtra
LQ Newbie
 
Registered: Jun 2004
Posts: 20

Original Poster
Rep: Reputation: 0
I'm currently living in Spain and I can not read spanish very well... I would not know if this is so. (I have telefonica adsl)

Isn't there something on the Internet I can ssh to to see if the connectivity works?
 
Old 06-27-2004, 08:55 AM   #4
xtra
LQ Newbie
 
Registered: Jun 2004
Posts: 20

Original Poster
Rep: Reputation: 0
[xtrasyn@Graceland xtrasyn]$ ssh -vvv xx.xx.xx.xx
OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 22.
debug1: connect to address xx.xx.xx.xx port 22: Connection refused
ssh: connect to host xx.xx.xx.xx port 22: Connection refused
[xtrasyn@Graceland xtrasyn]$

(The xx-es are consistent and show my real IP)
 
Old 06-27-2004, 08:56 AM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
There are things you could ssh to but I thought you were wanting incomming ssh?
 
Old 06-27-2004, 08:59 AM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Are you sure that your firewalls are allowing incomming connections on port 22? What kind of firewall do you have that is doing the natting?
 
Old 06-29-2004, 05:10 AM   #7
xtra
LQ Newbie
 
Registered: Jun 2004
Posts: 20

Original Poster
Rep: Reputation: 0
See me being clueless at first BUT IT WAS FIXED!

Right I took some time to get back to you on this one.

I reset my router to factory settings, upgraded the firmware and all that. It was configured well as in all the booklets and I have an internet connection.

I had configured it to go without firewall, and to nat all ports (!) to 192.168.1.203 (my linux machine).

I removed all firewall rules from the box so it is running unfirewalled. Nmap confirms this.

When I nmaped my internet IP I got the message that a telnet, netbios and http ports were open, but clearly not the ones I wanted.

When I used an online scan, only ssh port was open, but i still got connection refused.

But now comes the funny part (it actually did make me laugh for a minute)

The factory settings of the router put the wan side in with a value of 255.255.255.255. This ended up as putting the ports that you can use to access the router DIRECTLY on the internet. So that was why I did have web access...

So I gave it the subnet it is supposed to have as provided by the ISP and voila, problem solved.

Thanks for your time and sorry for wasting it.
 
  


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, confirmed router problem Ossar Linux - Networking 2 10-09-2004 10:00 AM
ssh internet -> router -> slackbox Tuttle Linux - Networking 5 09-14-2004 01:51 PM
unable to connect to my linux router from internet using ssh shkkhanhyd Linux - Security 3 03-31-2004 09:44 PM
How to setup RH9.0 as firewall/router to share internet connection iel Linux - Networking 3 03-04-2004 02:33 AM
dsl router + NAT + ssh = problem valleyman Linux - Networking 5 12-10-2003 09:19 AM

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

All times are GMT -5. The time now is 10:38 PM.

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