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:
parent
ff74a1b298
commit
129e6a9ae4
5 changed files with 21 additions and 2 deletions
|
@ -19,8 +19,8 @@ DSVPN=${DSVPN:-yes}
|
|||
SOURCES=${SOURCES:-yes}
|
||||
NOINTERNET=${NOINTERNET:-no}
|
||||
INTERFACE=${INTERFACE:-$(ip -o -4 route show to default | grep -m 1 -Po '(?<=dev )(\S+)' | tr -d "\n")}
|
||||
KERNEL_VERSION="5.4.42"
|
||||
KERNEL_PACKAGE_VERSION="1.9+1efcfb3"
|
||||
KERNEL_VERSION="5.4.52"
|
||||
KERNEL_PACKAGE_VERSION="1.10+206826e"
|
||||
KERNEL_RELEASE="${KERNEL_VERSION}-mptcp_${KERNEL_PACKAGE_VERSION}"
|
||||
GLORYTUN_UDP_VERSION="3622f928caf03709c4031a34feec85c623bc5281"
|
||||
#MLVPN_VERSION="8f9720978b28c1954f9f229525333547283316d2"
|
||||
|
|
17
omr-service
17
omr-service
|
@ -50,11 +50,28 @@ _lan_route() {
|
|||
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
|
||||
_glorytun_udp
|
||||
_glorytun_tcp
|
||||
_multipath
|
||||
_omr_api
|
||||
_lan_route
|
||||
_gre_tunnels
|
||||
sleep 10
|
||||
done
|
||||
|
|
Binary file not shown.
|
@ -51,6 +51,7 @@ net.core.default_qdisc = fq
|
|||
net.netfilter.nf_conntrack_max = 131072
|
||||
|
||||
net.ipv4.conf.all.log_martians = 0
|
||||
net.ipv4.conf.default.log_martians = 0
|
||||
|
||||
# MPTCP settings
|
||||
net.mptcp.mptcp_checksum = 0
|
||||
|
|
|
@ -20,4 +20,5 @@ vpn gt-udp-tun+ nosmurfs,tcpflags
|
|||
vpn mlvpn+ nosmurfs,tcpflags
|
||||
vpn tun+ nosmurfs,tcpflags
|
||||
vpn dsvpn+ nosmurfs,tcpflags
|
||||
vpn gre-user+ nosmurfs,tcpflags
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue