An OpenVPN daemon in routed mode on SME Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
375 B

12 years ago
#!/bin/bash
net=$(/sbin/e-smith/db configuration getprop openvpn-routed Network || echo '192.168.29.0/255.255.255.0')
12 years ago
addr=${net%%/*}
mask=${net#*/}
12 years ago
db=$(/sbin/e-smith/db networks getprop $addr VPNRouted)
12 years ago
if [ -z $db ]; then
/sbin/e-smith/db networks set $addr network Mask $mask VPNRouted yes Removable no
/sbin/e-smith/signal-event network-create $addr
fi
12 years ago
exit 0