Results 1 to 10 of 12
Server details:
OS: Linux RedHat
DHCP: Static IP set to 192.168.1.101
sshd_config: Enabled for port 22 for ssh
Connected through wire to the Linksys router
Router:
Type: Linksys BEFW11S4
Port ...
- 04-20-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
Help: Cannot access Linux Server behind the linksys router via ssh
Server details:
OS: Linux RedHat
DHCP: Static IP set to 192.168.1.101
sshd_config: Enabled for port 22 for ssh
Connected through wire to the Linksys router
Router:
Type: Linksys BEFW11S4
Port forwarding enabled for port 22 to IP 192.168.1.101
Client:
Windows 7
Interface: PuTTy
Host: 192.168.1.101 on port 22 through SSH
This always gives an error "connection timed out".
SSH directly on the local Linux works fine..
Seems basic but had been struggling over this for past 3 hours to no avail so thought of posting it to the experts..please help. Am I missing anything?
regards
Idx.
- 04-20-2011 #2Where is this client? If it is on the local network (alongClient:
Windows 7
Interface: PuTTy
Host: 192.168.1.101 on port 22 through SSH
with the server) it is correct to connect to 192.168.1.101,
the server's local address, but if the client is outside the local
network (somewhere out on the internet), then it must connect
to the public address, the one the router connects to.
- 04-20-2011 #3Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
- 04-20-2011 #4Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
Do I have to put anything in the iptables config file?
- 04-21-2011 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Are you able to ssh to this computer from another inside the LAN (behind the router/firewall)?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 04-21-2011 #6Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
No, that is exactly the problem..i haven't tried "outside" the firewall as behind the router itself is not working. Basically, it is like 192.168.1.100 (client) connecting to 192.168.1.101 (server) through SSH on port 22..sounds so simple..but is not working.
- 04-21-2011 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Ok. Then it is probably an iptables rule problem. Post the output of 'iptables-save' here. Also, you might try stopping the iptables services and then trying to connect with ssh again. I had a problem connecting with NFS recently on my new Linux installation for this reason. I was able to alter the iptables in-kernel rules so that nfs works again, but I had to disable iptables at first to verify that it was the cause of my connection problem.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 04-21-2011 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Ditto using OpenVPN to connect from outside the firewall. The NFS clients were inside.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 04-21-2011 #9Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
Output of iptables-save:
# Generated by iptables-save v1.2.8 on Wed Apr 20 17:01:49 2011
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5071:847593]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type 255 -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Wed Apr 20 17:01:49 2011
- 04-21-2011 #10Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
rubberman-disabling the iptable worked..so it has to do something with my iptables..do you see anything missing there?


Reply With Quote
