Re: telnet/ssh disconnects... Possible NAT teardown?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy wrote:

Ok, I'm at home now, and i tried telneting in from another computer on the
network....   It works fine.  No disconnects.

I'm using Road-Runner (Cable modem) to connect to the internet, the linux PC in
question is the router (2 NIC cards, one to cable modem, other to LAN).

Is it possible the cable modem is the cause?  I don't understand what could be
wrong.

-Jeremy



This is a common problem with ssh connections through firewalls.
I avoid this problem by placing the following perl script in my path (either world executable in /usr/local/bin for any users , or user executable in my own ~/bin/ directory) and I name it "dot". Then either execute dot when leaving an ssh session alone for a while, or run it in the background if it is not too disruptive of what you are doing. Just ctrl-c with dot in the foregrond to stop it.


#!/usr/bin/perl
# Simple keep-alive script when port forwarding via ssh through firewall
# Otherwise the TCP connections in fw table may timeout.
$|=1;
$i=0;
while (true){
 $i++;
 if ($i>60) {
   print("\n.");
   $i=1;
 } else{
   print(".");
 }
sleep 60;
}

Enjoy!

--
-----------------------------------------------------------
  "Spend less!  Do more!  Go Open Source..." -- Dirigo.net
  Chris Johnson, RHCE #807000448202021





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux