Skip to content

Commit ca85ca4

Browse files
committed
Add back automatic redirections
1 parent d1eedd1 commit ca85ca4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

post-fs-data.sh

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

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

11+
# Redirect DNS requests to localhost
12+
iptables -t nat -A OUTPUT -p tcp ! -d 45.11.45.11 --dport 53 -j DNAT --to-destination 127.0.0.1:5354
13+
iptables -t nat -A OUTPUT -p udp ! -d 45.11.45.11 --dport 53 -j DNAT --to-destination 127.0.0.1:5354
14+
# ip6tables -t nat -A OUTPUT -p tcp ! -d 45.11.45.11 --dport 53 -j DNAT --to-destination [::1]:5354
15+
# ip6tables -t nat -A OUTPUT -p udp ! -d 45.11.45.11 --dport 53 -j DNAT --to-destination [::1]:5354
16+
1117
# Force disable IPv6 OS connections
1218
resetprop net.ipv6.conf.all.accept_redirects 0
1319
resetprop net.ipv6.conf.all.disable_ipv6 1

0 commit comments

Comments
 (0)