mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +00:00
Fix gre tunnel configuration
This commit is contained in:
parent
efd7ffd1db
commit
f8484dc742
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ _glorytun_tcp() {
|
||||||
#if [ -n "$(systemctl -a | grep 'glorytun-tcp')" ]; then
|
#if [ -n "$(systemctl -a | grep 'glorytun-tcp')" ]; then
|
||||||
if systemctl list-unit-files glorytun-tcp@.service >/dev/null; then
|
if systemctl list-unit-files glorytun-tcp@.service >/dev/null; then
|
||||||
for intf in /etc/glorytun-tcp/tun*; do
|
for intf in /etc/glorytun-tcp/tun*; do
|
||||||
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
[ "$(echo $intf | grep key)" = "" ] && timeout 10 /etc/glorytun-tcp/post.sh ${intf}
|
||||||
done
|
done
|
||||||
if [ -f /etc/openmptcprouter-vps-admin/current-vpn ] && [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
if [ -f /etc/openmptcprouter-vps-admin/current-vpn ] && [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
||||||
localip="$(cat /etc/glorytun-tcp/tun0 | grep LOCALIP | cut -d '=' -f2)"
|
localip="$(cat /etc/glorytun-tcp/tun0 | grep LOCALIP | cut -d '=' -f2)"
|
||||||
|
@ -157,7 +157,7 @@ _gre_tunnels() {
|
||||||
ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR >/dev/null 2>&1
|
ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR >/dev/null 2>&1
|
||||||
ip link set $iface up >/dev/null 2>&1
|
ip link set $iface up >/dev/null 2>&1
|
||||||
ip addr add $LOCALIP dev $iface >/dev/null 2>&1
|
ip addr add $LOCALIP dev $iface >/dev/null 2>&1
|
||||||
ip route add $NETWORK dev $iface onlink >/dev/null 2>&1
|
ip route add $NETWORK dev $iface >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue