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

Fixes and set VPS IPv6 in settings

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-01-02 21:03:38 +01:00
parent 8bd69f0c37
commit 476e6ff7c9
2 changed files with 9 additions and 7 deletions

View file

@ -485,12 +485,10 @@ _vps_firewall_redirect_port() {
}
_vps_firewall_close_port() {
echo "$vpsfwlist"
echo "$vpsfwlist" | while read -r line; do
echo "line: $line"
[ -n "$line" ] && {
proto=$(echo $line | awk '{print $4}')
src_port=$(echo $line | awk '{print $5}')
src_dport=$(echo $line | awk '{print $5}')
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "'$proto'","fwtype" : "DNAT"}'
_set_json "shorewallclose" "$settings"
}
@ -786,6 +784,10 @@ _set_config_from_vps() {
set openmptcprouter.settings.disable_ipv6=1
EOF
sysctl -qw net.ipv6.conf.all.disable_ipv6=1
else
uci -q batch <<-EOF >/dev/null
set openmptcprouter.${servername}.ipv6=$vps_ipv6_addr
EOF
fi
# Get VPS iperf config