[SOLVED] sshd stopped responding to external connections
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have several Linux boxes behind a router with a single public static IP. All machines have static IPs on the LAN, all are set up in a headless config so they are remotely managed through SSH, all work great. For several years, I have been forwarding port 22 to one of the machines (call it box3), and it's been working great. A couple of weeks ago we had a power outage, the UPS on box3 failed and box3 experienced a hard shutdown. The UPS's on the other machines were fine, no problems there. When box3 came back up, the following problems started.
Box3 is accessible through SSH within the LAN like normal. However, I can no longer connect to box3 from outside the LAN using the public IP like before. It's as if the forwarding of port 22 to box3 isn't working like it should. Box3's LAN IP has not changed, and if I change port 22 to point to a new machine on the LAN in the router (eg: box4, box5, etc), I can access them without a problem from outside the LAN. But as soon as I switch port 22 to point to box3, the connections time out again.
Summary:
SSH connections to box3 within the LAN work fine
SSH connections to box3 from outside the LAN with the router set to forward port 22 to box3 fail
SSH connections to box4 from outside the LAN with the router set to forward port 22 to box4 work fine
Any ideas?
All machines are running Fedora.
Last edited by suicidaleggroll; 07-20-2012 at 09:44 PM.
So, inexplicably, another reboot of the machine has fixed the problem. Now responds fine to both internal and external SSH connections. Still not sure what the cause of the problem was, never made any changes and it's back to normal. Sounds like Windows behavior to me...odd
Last edited by suicidaleggroll; 07-29-2012 at 07:45 PM.
So, inexplicably, another reboot of the machine has fixed the problem. Now responds fine to both internal and external SSH connections. Still not sure what the cause of the problem was, never made any changes and it's back to normal. Sounds like Windows behavior to me...odd
I finally found the solution to this. For some reason the troublesome box lost its default route ("ip route" showed no default). While this didn't affect incoming SSH connections on the LAN it did prevent incoming SSH connections from outside the network.
A simple "ip route add default via 192.168.1.1" fixes it temporarily. Still not sure why it vanished in the first place, but it happens rarely enough that having to run this command manually to fix it isn't so bad.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.