LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2004, 05:38 PM   #1
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Rep: Reputation: 15
ssh not working on external IP


I am new to this... just setup a RedHat box... ssh don't seem to be working... ssh is installed... as i can ssh in via the local network but no the web... i have made sure that the firewall is disabled... but it wtill don't work.... please someone help i'm getting desperate!!!!!

i am getting connection refused constantly
 
Old 08-05-2004, 05:43 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Does your server have the external IP address it'self or are you using NAT?

Are you trying to access the external IP from within your network?

It would also be worth checking with your ISP to make sure that they don't blocak any ports.
 
Old 08-05-2004, 05:56 PM   #3
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
yes it has an external ip set by the isp (as in it connects directly in) ... no they aren't filtering any ports (or so they have told us) and i am trying to connect to it over the net fomr a completely different location
 
Old 08-05-2004, 06:02 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
If you can reach it from the inisde, and it connects directly
to the internet, which interface is which?

eth0 = ?
eth1 = ?

Also, what do /etc/hosts.allow and /etc/hosts.deny look
like? Is ssh configured to listen on both interfaces?


Cheers,
Tink
 
Old 08-05-2004, 06:04 PM   #5
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
How are you connected to the internet? Directly plugged to a modem or via router / gateway?
 
Old 08-05-2004, 06:04 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
You may want to check that the ssh server is bound to all ip addresses on the system:
netstat -nlp | grep sshd

You should get something like:
Code:
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1175/sshd
The 0.0.0.0 stands for all local IP addresses.
 
Old 08-05-2004, 06:25 PM   #7
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
ok did that command and it all looks the same as what david_ross stated.

eth0 is the local NIC and eth1 is the modem for the internet.

hosts.deny and hosts.allow have nothing in them... as in the whole thing is commented out

#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
 
Old 08-05-2004, 06:27 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
iptables -L
 
Old 08-05-2004, 06:34 PM   #9
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
tinkster... what am i looking for?
 
Old 08-05-2004, 06:36 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Firewall rules that may prohibit incoming connections
on port 22 ...


Cheers,
Tink

Last edited by Tinkster; 08-05-2004 at 07:07 PM.
 
Old 08-05-2004, 06:37 PM   #11
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
firewall has been disabled
 
Old 08-05-2004, 06:38 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
So the output of
iptables -L
was empty?


Cheers,
Tink
 
Old 08-05-2004, 06:40 PM   #13
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
no but we disabled the firewall in the gui
 
Old 08-05-2004, 06:43 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Ummm .... whatever you did in the GUI obviously
didn't work :}

If iptables -L comes back with something other than
Code:
[root@diggn:/etc]$ iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
your firewall is active.


Cheers,
Tink
 
Old 08-05-2004, 06:47 PM   #15
TurboChicken
Member
 
Registered: Aug 2004
Posts: 44

Original Poster
Rep: Reputation: 15
okay so how do i either

alter it to allow ssh

or

disable it entirely (prefered)
 
  


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
cannot ssh to external interface CartersAdvocate Slackware 12 11-17-2005 09:53 PM
SSH to an external IP address BluePyre Linux - Software 2 07-14-2004 07:10 PM
Cannot ssh into Linux with external ip address gautam1980 Linux - Newbie 1 02-13-2004 03:14 PM
Can't ssh to external ip....please help... ksoma Linux - Security 7 08-12-2003 06:51 AM
Sample Working ipchain that allows http,ftp,ssh for internal and external network munisp Linux - Networking 1 11-09-2001 06:49 PM


All times are GMT -5. The time now is 10:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration