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've noticed that my SSH sessions are timing out, not before 5 minutes of inactivity. I looked in my ssh config file, and didn't see a timeout set. I didn't have this issue before. Here are two of my iptables rules, which is I believe, to be the culprit somehow:
Code:
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
I believe that I am missing an additional rule, as possibly packets are being dropped, closing out my session. Oddly enough, nothing shows up in my auth.log file when the session is terminated.
Show the entire iptables rules. iptables -vnL INPUT and OUTPUT.
How does the session terminate? Does it say broken pipe? Does it happen suddenly, is there a timeout before you get an error?
Those would be the only two rules related to ssh. Does a forwarding rule need to be put in place? Is there nothing wrong with these two rules?
The session just closes unexpectedly, with no error or timeout.
Well, you're quite reluctant to share information for someone who actually needs help. On the other hand, you're asking if ssh access needs a forwarding rule, which leads me to believe that you don't understand iptables (and that's ok), but you're not actually showing us what is going on there (which isn't ok). Moreoever, you haven't actually shown us what sshd_config looks like, you're just saying there's no timeout directive. What would a 'timeout' directive look like in ssh exactly? Are you referring to the correct two directives? Also, it wouldn't hurt to know what distro you're using...
EDIT: Sorry, you've already said what OS you're using. Are you using it as an independent bare metal server, or as a virtual machine/container?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.