mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use static address for glorytun
This commit is contained in:
parent
78e3bef74a
commit
c1c3adc1d3
3 changed files with 9 additions and 3 deletions
|
@ -7,3 +7,6 @@ config glorytun 'vpn'
|
|||
option mptcp '1'
|
||||
option proto 'tcp'
|
||||
option chacha20 '1'
|
||||
option localip '10.0.0.2'
|
||||
option remoteip '10.0.0.1'
|
||||
option mtuauto '1'
|
||||
|
|
|
@ -17,9 +17,9 @@ set_default() {
|
|||
local iface
|
||||
config_get iface "$config" dev
|
||||
[ "$iface" = "$DEVICE" ] && {
|
||||
config_get localip "$config" localip
|
||||
config_get localip "$config" localip
|
||||
config_get remoteip "$config" remoteip
|
||||
[ "$remoteip" != "" ] && [ "$localip" != "" ] && ip addr add $localip peer $remoteip dev $DEVICE
|
||||
[ "$remoteip" != "" ] && [ "$localip" != "" ] && ifconfig $DEVICE $localip pointopoint $remoteip up
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@ uci -q batch <<-EOF >/dev/null
|
|||
delete network.glorytun=interface
|
||||
set network.glorytun=interface
|
||||
set network.glorytun.ifname=tun0
|
||||
set network.glorytun.proto=dhcp
|
||||
set network.glorytun.proto=static
|
||||
set network.glorytun.ipaddr=10.0.0.2
|
||||
set network.glorytun.netmask=255.255.255.0
|
||||
set network.glorytun.gateway=10.0.0.1
|
||||
set network.glorytun.ip4table=vpn
|
||||
set network.glorytun.multipath=off
|
||||
set network.glorytun.leasetime=12h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue