Page 1 of 1

Autostart VPN server at server reboot on Debian 8

Posted: Sat Jul 29, 2017 12:00 pm
by Ammar
I have followed all the steps to set up the VPN server but on softether's official guide, the startup script is for RHEL OS's but after searching online, i've found the "update-rc.d vpnserver defaults". This works on Ubuntu 14.01 LTS but the VPN server doesn't start on Debian 8. Any help would be highly appreciated.

Re: Autostart VPN server at server reboot on Debian 8

Posted: Sat Jul 29, 2017 4:42 pm
by raafat

Re: Autostart VPN server at server reboot on Debian 8

Posted: Sat Jul 29, 2017 9:04 pm
by Ammar
raafat wrote:
>
> https://www.digitalocean.com/community/ ... l-examples
Thanks for your reply but I've already tried that before posting. I couldn't understand anything about the Debian version as it's so confusing.

Re: Autostart VPN server at server reboot on Debian 8

Posted: Mon Aug 13, 2018 1:23 am
by rclub
Ammar,
I was having trouble getting vpnserver to auto start as well. A few years ago I was able to install vpnserver and worked flawlessly following instructions at: http://tomearp.blogspot.com/2013/11/set ... ether.html - but recently I updated raspbian and reinstalled latest softether and could not get the vpnserver to start automatically.

Admittedly, I am the furthest thing from a Linux expert , barely a novice - but while researching this issue I came across a site that gave instructions on how to auto start a different VPN - https://2ellsblog.wordpress.com/2016/02 ... up-script/

based on that, my solution which appears to work (can't confirm this is the 'best' way or if it will cause any issues)

- Still use the startup script detailed in Tom's Blog using the /etc/init.d/vpnserver script
- Not sure if needed, but I added a 10 second delay(sleep 10) to the script near the top between : # description: SoftEther VPN Server
sleep 10
DAEMON=/usr/local/vpnserver/vpnserver
- then open rc.local using: sudo nano /etc/rc.local
- scroll down to the bottom of the script, and just above the line exit 0 - add: /etc/init.d/vpnserver start

this worked for me...

Re: Autostart VPN server at server reboot on Debian 8

Posted: Mon Aug 13, 2018 1:25 am
by rclub
disregard my post, does not apply to debian - was for raspbian

Re: Autostart VPN server at server reboot on Debian 8

Posted: Tue Aug 14, 2018 12:48 pm
by qupfer
Debian 8 includes systemd? If yes, you should create a service file and enable it:

qupfer@vpn ~ % cat /etc/systemd/system/vpn.service
[Unit]
Description=SoftEther VPN Server daemon
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/bin/vpnserver start
ExecStop=/usr/local/bin/vpnserver stop

[Install]
WantedBy=multi-user.target





and activate it with:
systemctl enable vpn.service
systemctl start vpn.service

Re: Autostart VPN server at server reboot on Debian 8

Posted: Tue Aug 14, 2018 1:37 pm
by Ammar
Thanks for the reply. I'll try it out. Cheers!