Skip to content

Instantly share code, notes, and snippets.

@thekitp
Forked from billyriantono/dnsmasq.conf
Last active February 4, 2018 11:30
Show Gist options
  • Save thekitp/cf7ae97741995406a57dcaa27ed68629 to your computer and use it in GitHub Desktop.
Save thekitp/cf7ae97741995406a57dcaa27ed68629 to your computer and use it in GitHub Desktop.
/etc/init.d/vpnserver file for softether using Local Bridge
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
TAP_ADDR=192.168.7.1
TAP_ADAPTER='tap_soft'
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
sleep 3
ifconfig tap_vpn 192.168.250.1
service dhcpd restart
sleep 1
ifconfig $TAP_ADAPTER $TAP_ADDR
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
sleep 1
ifconfig $TAP_ADAPTER $TAP_ADDR
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment