mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
OpenVPN linkup/down scripts, add IPv6 + ifconfig_local ipv4 route, for https://github.com/opnsense/core/issues/2799
This commit is contained in:
parent
724f41dadb
commit
54f4ec89bb
@ -3,5 +3,6 @@
|
||||
# delete the node just in case mpd cannot do that
|
||||
/bin/rm -f /var/etc/nameserver_$1
|
||||
/bin/rm -f /tmp/$1_router
|
||||
/bin/rm -f /tmp/$1_routerv6
|
||||
/bin/rm -f /tmp/$1up
|
||||
/usr/local/opnsense/service/configd_ctl.py filter reload
|
||||
|
||||
@ -4,11 +4,21 @@
|
||||
# /usr/local/opnsense/service/configd_ctl.py interface newip $interface
|
||||
|
||||
if [ -n "${route_vpn_gateway}" ]; then
|
||||
/bin/echo ${route_vpn_gateway} > /tmp/$1_router
|
||||
/bin/echo ${route_vpn_gateway} > /tmp/$1_router
|
||||
elif [ -n "${ifconfig_remote}" ]; then
|
||||
/bin/echo ${ifconfig_remote} > /tmp/$1_router
|
||||
/bin/echo ${ifconfig_remote} > /tmp/$1_router
|
||||
elif [ -n "${ifconfig_local}" ]; then
|
||||
/bin/echo ${ifconfig_local} > /tmp/$1_router
|
||||
elif [ "${dev_type}" = "tun" ]; then
|
||||
/bin/echo ${5} > /tmp/${1}_router
|
||||
/bin/echo ${5} > /tmp/${1}_router
|
||||
fi
|
||||
|
||||
if [ -n "${route_ipv6_gateway_1}" ]; then
|
||||
/bin/echo ${route_ipv6_gateway_1} > /tmp/${1}_routerv6
|
||||
elif [ -n "${ifconfig_ipv6_remote}" ]; then
|
||||
/bin/echo ${ifconfig_ipv6_remote} > /tmp/${1}_routerv6
|
||||
elif [ -n "${ifconfig_ipv6_local}" ]; then
|
||||
/bin/echo ${ifconfig_ipv6_local} > /tmp/${1}_routerv6
|
||||
fi
|
||||
|
||||
/usr/bin/touch /tmp/$1up
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user