You are not logged in.

#1 2015-01-13 17:45:42

irb
Member
Registered: 2014-11-07
Posts: 17
Website

sshd and vpnc interacting poorly

Here's one that has been causing me a headache lately. I have a vpnc connection to my employer's network managed with networkmanager. When the connection goes down, it takes sshd with it. Since the VPN connection times out after 24 hours, I often find myself losing my connection in to my laptop at home when I'm at the office.

I've tried configuring sshd to only listen on my home network's LAN address, to no avail.  Why does sshd shut down when the vpn tunnel goes down, and where should I look to correct this behavior?

I'd include logs but at the moment I can't get in. heh.

Thanks,

/i.

Offline

#2 2015-01-17 16:53:03

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: sshd and vpnc interacting poorly

My best  is that when the vpn comes up your gateway is redirected and all traffic goes through the vpn, then when the vpn goes down it takes all open connections with it.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2015-01-19 18:39:58

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Re: sshd and vpnc interacting poorly

That's not a bad idea, and it may be the cause, but I had this same setup (KDE network manager applet, vpnc, sshd) running on Slackware without a hitch. The major difference is systemd, it seems to me. Is there some systemd way I can check that sshd is running and start it if not?

Thanks.

Offline

#4 2015-01-20 10:53:33

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: sshd and vpnc interacting poorly

Check the status with:
systemctl status sshd

Start sshd with:
systemctl start sshd


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2015-01-20 16:42:25

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Re: sshd and vpnc interacting poorly

Thanks, but I can't do that manually if I can't ssh in. I was wondering if a mechanism existed within systemd to monitor whether certain daemons were running.

Offline

#6 2015-01-20 17:04:53

✩ ✩ ✩
Member
From: Riga, Latvia
Registered: 2015-01-17
Posts: 9

Re: sshd and vpnc interacting poorly

dUGUioxb.png

Does enabling that (highlighted in the screenshot above) option solve the issue you are having?

Offline

#7 2015-01-20 19:12:50

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: sshd and vpnc interacting poorly

irb wrote:

Thanks, but I can't do that manually if I can't ssh in. I was wondering if a mechanism existed within systemd to monitor whether certain daemons were running.

I suspected it would be a catch 22 situation smile

Looking into the service file of sshd I'd say that if you have sshd enabled and it starts up successfully it will always be running. If for some odd reason it crashes or exits, it should be restarted automatically by systemd.

You can try what ✩ ✩ ✩ says, that is most probably what you are looking for, however if you want to route all traffic through your employers network then you'll have to figure out a middle term solution which might complicate things.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB