1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-03-09 15:50:00 +00:00

Update Linux Kernel and add gre-tunnels creation

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-07-23 17:01:34 +02:00
parent ff74a1b298
commit 129e6a9ae4
5 changed files with 21 additions and 2 deletions

View file

@ -19,8 +19,8 @@ DSVPN=${DSVPN:-yes}
SOURCES=${SOURCES:-yes} SOURCES=${SOURCES:-yes}
NOINTERNET=${NOINTERNET:-no} NOINTERNET=${NOINTERNET:-no}
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")} INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")}
KERNEL_VERSION="5.4.42" KERNEL_VERSION="5.4.52"
KERNEL_PACKAGE_VERSION="1.9+1efcfb3" KERNEL_PACKAGE_VERSION="1.10+206826e"
KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}" KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}"
GLORYTUN_UDP_VERSION="3622f928caf03709c4031a34feec85c623bc5281" GLORYTUN_UDP_VERSION="3622f928caf03709c4031a34feec85c623bc5281"
#MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2" #MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"

View file

@ -50,11 +50,28 @@ _lan_route() {
done done
} }
_gre_tunnels() {
. "$(readlink -f "/etc/shorewall/params.vpn")"
for intf in /etc/openmptcprouter-vps-admin/intf/*; do
. "$(readlink -f "$intf")"
iface="$(basename $intf)"
if [ "$(ip tunnel show $iface 2>/dev/null | awk '{print $4}')" != "$OMR_ADDR" ]; then
ip tunnel del $iface 2>&1 >/dev/null
ip tunnel add $iface mode gre local $INTFADDR remote $OMR_ADDR
ip link set $iface up
ip addr add $LOCALIP dev $iface
ip route add $NETWORK dev $iface 2>&1 >/dev/null
fi
done
}
while true; do while true; do
_glorytun_udp _glorytun_udp
_glorytun_tcp _glorytun_tcp
_multipath _multipath
_omr_api _omr_api
_lan_route _lan_route
_gre_tunnels
sleep 10 sleep 10
done done

Binary file not shown.

View file

@ -51,6 +51,7 @@ net.core.default_qdisc = fq
net.netfilter.nf_conntrack_max = 131072 net.netfilter.nf_conntrack_max = 131072
net.ipv4.conf.all.log_martians = 0 net.ipv4.conf.all.log_martians = 0
net.ipv4.conf.default.log_martians = 0
# MPTCP settings # MPTCP settings
net.mptcp.mptcp_checksum = 0 net.mptcp.mptcp_checksum = 0

View file

@ -20,4 +20,5 @@ vpn gt-udp-tun+ nosmurfs,tcpflags
vpn mlvpn+ nosmurfs,tcpflags vpn mlvpn+ nosmurfs,tcpflags
vpn tun+ nosmurfs,tcpflags vpn tun+ nosmurfs,tcpflags
vpn dsvpn+ nosmurfs,tcpflags vpn dsvpn+ nosmurfs,tcpflags
vpn gre-user+ nosmurfs,tcpflags