diff --git a/dsvpn-run b/dsvpn-run new file mode 100644 index 0000000..e4d1ff8 --- /dev/null +++ b/dsvpn-run @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +if [ ! -f "$1" ]; then + echo "usage: $(basename "$0") FILE" + exit 1 +fi + +. "$(readlink -f "$1")" + +exec dsvpn \ + ${MODE:+server} \ + "$1".key \ + auto \ + ${PORT:+65401} \ + ${DEV:+dsvpn0} \ + ${LOCALTUNIP:+10.255.251.1} \ + ${REMOTETUNIP:+10.255.251.1} diff --git a/dsvpn-server@.service.in b/dsvpn-server@.service.in new file mode 100644 index 0000000..25cc20e --- /dev/null +++ b/dsvpn-server@.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=Dead Simple VPN - Server on %I + +[Service] +ExecStart=/usr/local/bin/dsvpn-run /etc/dsvpn/%i +Restart=always +RestartSec=15 + +[Install] +WantedBy=network.target \ No newline at end of file diff --git a/dsvpn0-config b/dsvpn0-config new file mode 100644 index 0000000..c4164cf --- /dev/null +++ b/dsvpn0-config @@ -0,0 +1,5 @@ +PORT=65401 +DEV=dsvpn0 +MODE=server +LOCALTUNIP=10.255.251.1 +REMOTETUNIP=10.255.251.2 \ No newline at end of file diff --git a/glorytun-tcp-post.sh b/glorytun-tcp-post.sh new file mode 100644 index 0000000..f494e11 --- /dev/null +++ b/glorytun-tcp-post.sh @@ -0,0 +1,8 @@ +#!/bin/sh +. "$(readlink -f "$1")" + +INTF=gt-${DEV} +[ -z "$LOCALIP" ] && LOCALIP="10.255.255.1" +[ -z "$BROADCASTIP" ] && BROADCASTIP="10.255.255.3" +ip link set dev ${INTF} up +ip addr add ${LOCALIP}/30 brd ${BROADCASTIP} dev ${INTF} diff --git a/glorytun-udp-post.sh b/glorytun-udp-post.sh new file mode 100644 index 0000000..73a3853 --- /dev/null +++ b/glorytun-udp-post.sh @@ -0,0 +1,8 @@ +#!/bin/sh +. "$(readlink -f "$1")" + +INTF=gt-udp-${DEV} +[ -z "$LOCALIP" ] && LOCALIP="10.255.254.1" +[ -z "$BROADCASTIP" ] && BROADCASTIP="10.255.254.3" +ip link set dev ${INTF} up +ip addr add ${LOCALIP}/30 brd ${BROADCASTIP} dev ${INTF} diff --git a/omr6in4@.service.in b/omr6in4@.service.in new file mode 100644 index 0000000..71b3542 --- /dev/null +++ b/omr6in4@.service.in @@ -0,0 +1,11 @@ +[Unit] +Description=OMR6IN4 on %I +After=network.target network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/omr-6in4-run start /etc/openmptcprouter-vps-admin/omr-6in4/%i +ExecStop=/usr/local/bin/omr-6in4-run start /etc/openmptcprouter-vps-admin/omr-6in4/%i + +[Install] +WantedBy=multi-user.target diff --git a/openmptcprouter-shorewall.tar.gz b/openmptcprouter-shorewall.tar.gz new file mode 100644 index 0000000..35205d4 Binary files /dev/null and b/openmptcprouter-shorewall.tar.gz differ diff --git a/openmptcprouter-shorewall6.tar.gz b/openmptcprouter-shorewall6.tar.gz new file mode 100644 index 0000000..b43e80d Binary files /dev/null and b/openmptcprouter-shorewall6.tar.gz differ