Skip to content

Commit

Permalink
Fix dns leak again (#157)
Browse files Browse the repository at this point in the history
* Fix dns leak
* Remove unused code
  • Loading branch information
Nep-Timeline authored Nov 12, 2024
1 parent 9a0c210 commit 61896b8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions box/scripts/box.iptables
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ disable_ipv6() {

# add: block Askes ipv6 completely
ip -6 rule add unreachable pref "${pref}"

# add: blocks all outgoing IPv6 traffic using the UDP protocol to port 53, effectively preventing DNS queries over IPv6.
$IP6V -A OUTPUT -p udp --destination-port 53 -j DROP
} >> /dev/null 2>&1

ipv6_enable() {
Expand All @@ -145,8 +142,8 @@ ipv6_enable() {
# del: block Askes ipv6 completely
ip -6 rule del unreachable pref "${pref}"

# del: blocks all outgoing IPv6 traffic using the UDP protocol to port 53, effectively preventing DNS queries over IPv6.
$IP6V -D OUTPUT -p udp --destination-port 53 -j DROP
# add: blocks all outgoing IPv6 traffic using the UDP protocol to port 53, effectively preventing DNS queries over IPv6.
$IP6V -A OUTPUT -p udp --destination-port 53 -j DROP
} >> /dev/null 2>&1

intranet=(
Expand Down Expand Up @@ -915,4 +912,4 @@ else
echo "${yellow}Usage:${normal} ${green}$0${normal} {${yellow}enable|disable|renew${normal}}"
;;
esac
fi
fi

0 comments on commit 61896b8

Please sign in to comment.