Ping keepalive appliance
-
I have a remote site whose VPN tunnel drops if there's no traffic over it for some time.
How can I set up a cheap "ping keepalive" appliance that does all the right things? I want to feed it an IP address, and have it set up like a daemon, that restarts, etc, so that it constantly sends a small stream of traffic. Does anybody sell this or do I need to make one with a PC or whatever? (I'd really rather not have a PC dedicated to this)
-
@Captain any linux router can probably be set up to ping an endpoint indefinitely.
If you want something easier to interact with, just get a raspberry pi.
Then you could just create a script that will do a single ping, and run that as often as you need via crontab.
You could also make a daemon etc, but to me that seems more complicated.
-
@swayde said in Ping keepalive appliance:
raspberry pi.
If you don't want to have a VM then this would be an excellent choice.
On a base install configure networking at then just do:
crontab - e
*/1 * * * * ping -c1 google.com;
I'd also advise disabling swap and forcing fsck at startup. We use Pi zero+ in a product and it works great, with no swap and fsck it's reliable enough while still allowing you to yank power without shutting down properly.
-
Great idea guys. I never think of cron.
-
Our servers are setup so that any inactive SSH session will get disconnected after a certain timeout. I need the session opened for a reverse-SSH tunnel.
My simple solution is typing this command once connected
# watch ls -l
-
@Captain said in Ping keepalive appliance:
Great idea guys. I never think of cron.
You could set up a scheduled task to remind you of it.
-
@TimeBandit said in Ping keepalive appliance:
Our servers are setup so that any inactive SSH session will get disconnected after a certain timeout. I need the session opened for a reverse-SSH tunnel.
My simple solution is typing this command once connected
# watch ls -l
Does it actually inspect the inside of the SSH tunnel, or just whether the TCP link is idle?
If it's the latter, just put this line in your ~/.ssh/config to automatically send an encrypted keepalive each minute:
ServerAliveInterval 60
That's if you're using a linux client of course, but I'm sure putty has a similar setting.
-
-
@TimeBandit said in Ping keepalive appliance:
Our servers are setup so that any inactive SSH session will get disconnected after a certain timeout. I need the session opened for a reverse-SSH tunnel.
Don't
ClientAliveInterval
/ServerAliveInterval
get around that?Edit: