Skip to content

Commit

Permalink
Fix: IPv6 DNS Leak / IPv6 Forwarding (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nep-Timeline committed May 25, 2024
1 parent 2c8c1b8 commit 9395bf1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions box/scripts/box.iptables
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,21 @@ disable_ipv6() {
sysctl -w net.ipv6.conf.wlan0.disable_ipv6=1

ip -6 rule add unreachable pref "${pref}"

} >> /dev/null 2>&1

ipv6_enable() {
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1

sysctl -w net.ipv6.conf.all.accept_ra=1
sysctl -w net.ipv6.conf.wlan0.accept_ra=1
sysctl -w net.ipv6.conf.all.accept_ra=2
sysctl -w net.ipv6.conf.wlan0.accept_ra=2
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0
sysctl -w net.ipv6.conf.wlan0.disable_ipv6=0

ip -6 rule del unreachable pref "${pref}"

$IP6V -A OUTPUT -p udp --destination-port 53 -j DROP
} >> /dev/null 2>&1

intranet=(
Expand Down Expand Up @@ -611,6 +611,10 @@ cleanup_iptables() {
stop_tproxy
forward -D
} >> /dev/null 2>&1

if [ "${iptables}" = "$IP6V" ]; then
${iptables} -D OUTPUT -p udp --destination-port 53 -j DROP
fi
done
}

Expand Down

0 comments on commit 9395bf1

Please sign in to comment.