mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Add needed changes to have OpenVPN Bonding used as default gateway
This commit is contained in:
parent
4449784731
commit
a486708f2b
3 changed files with 7 additions and 0 deletions
|
@ -396,6 +396,9 @@ function wizard_add()
|
|||
vpn_port = 65301
|
||||
vpn_intf = "tun0"
|
||||
ucic:set("network","omrvpn","proto","dhcp")
|
||||
elseif default_vpn == "openvpn_bonding" then
|
||||
vpn_intf = "bonding-omrvpn"
|
||||
ucic:set("network","omrvpn","proto","bonding")
|
||||
end
|
||||
if vpn_intf ~= "" then
|
||||
ucic:set("network","omrvpn","ifname",vpn_intf)
|
||||
|
|
|
@ -189,6 +189,9 @@ while true; do
|
|||
#if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
# OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n")
|
||||
#fi
|
||||
if [ "$OMR_TRACKER_DEVICE" = "bonding-omrvpn" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY="10.255.248.1"
|
||||
fi
|
||||
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(uci -q get "network.$OMR_TRACKER_INTERFACE.gateway")
|
||||
fi
|
||||
|
|
|
@ -77,6 +77,7 @@ start_service()
|
|||
set network.omrvpn.updelay='20'
|
||||
set network.omrvpn.use_carrier='1'
|
||||
set network.omrvpn.mtu='1440'
|
||||
set network.omrvpn.ifname= 'bonding-omrvpn'
|
||||
commit network
|
||||
EOF
|
||||
config_load openmptcprouter
|
||||
|
|
Loading…
Reference in a new issue