Skip to content

Commit 92b5579

Browse files
authored
[config] Force disable ipv6 OS connections
1 parent 80dff0a commit 92b5579

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

post-fs-data.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ MODDIR=${0%/*}
88

99
# This script will be executed in post-fs-data mode
1010

11+
# Redirect DNS requests to localhost
1112
iptables -t nat -A OUTPUT -p tcp ! -d 91.239.100.100 --dport 53 -j DNAT --to-destination 127.0.0.1:5354
1213
iptables -t nat -A OUTPUT -p udp ! -d 91.239.100.100 --dport 53 -j DNAT --to-destination 127.0.0.1:5354
1314
# ip6tables -t nat -A OUTPUT -p tcp ! -d 91.239.100.100 --dport 53 -j DNAT --to-destination [::1]:5354
1415
# ip6tables -t nat -A OUTPUT -p udp ! -d 91.239.100.100 --dport 53 -j DNAT --to-destination [::1]:5354
16+
17+
# Force disable IPv6 OS connections
18+
resetprop net.ipv6.conf.all.accept_redirects 0
19+
resetprop net.ipv6.conf.all.disable_ipv6 1
20+
resetprop net.ipv6.conf.default.accept_redirects 0
21+
resetprop net.ipv6.conf.default.disable_ipv6 1

0 commit comments

Comments
 (0)