Fix DNS resolution across Wi-Fi, cellular, USB tethering, and VPNs
- Add NetworkManager rc-manager=file with dnsmasq caching and baseline /etc/resolv.conf, isolate usb0 routes/DNS in USB_Networking.nmconnection, enable loopback in boot runlevel, and guard 90-nm-cloud-setup.sh for OpenRC. - Rewrite 50-dns-filter.sh to handle dhcp4/dhcp6/dns events, drop BusyBox-invalid logger -i and blocking gateway sleeps, gate IPv6 AAAA filtering on global unicast addresses and accept_ra, and fall back to 1.1.1.1/9.9.9.9 when no upstream DNS is advertised. - Fix bananarchy-privacy-ctl musl parallel-query leaks (omit 127.0.0.1 in VPN mode, add sync-dns recovery, replace pkill/pgrep), add usb-tether DNS DNAT, rebuild and verify all four a1120 target images and release zips, and add scripts/test-dns-resolution.py.
This commit is contained in:
1 parent
6cedcf980c
commit
63ef9299fc
15 files changed
+764
-105
No files matched your search
@@ -1310,8 +1310,13 @@ PY
|
||||
on)
|
||||
ensure_usb_network_gadget
|
||||
sysctl -w net.ipv4.ip_forward=1 >/dev/null 2>&1 || true
|
||||
sysctl -w net.ipv4.conf.usb0.route_localnet=1 >/dev/null 2>&1 || true
|
||||
nft add table ip nat 2>/dev/null || true
|
||||
nft 'add chain ip nat prerouting { type nat hook prerouting priority -100 ; }' 2>/dev/null || true
|
||||
nft 'add chain ip nat postrouting { type nat hook postrouting priority 100 ; }' 2>/dev/null || true
|
||||
nft flush chain ip nat prerouting 2>/dev/null || true
|
||||
nft add rule ip nat prerouting iifname "usb*" udp dport 53 dnat to 127.0.0.1:53 2>/dev/null || true
|
||||
nft add rule ip nat prerouting iifname "usb*" tcp dport 53 dnat to 127.0.0.1:53 2>/dev/null || true
|
||||
nft add rule ip nat postrouting oifname "wwan*" masquerade 2>/dev/null || true
|
||||
nft add rule ip nat postrouting oifname "wlan*" masquerade 2>/dev/null || true
|
||||
ip addr show dev usb0 2>/dev/null | grep -q "172.16.42.1" || ip addr add 172.16.42.1/16 dev usb0 2>/dev/null || true
|
||||
@@ -1320,6 +1325,7 @@ PY
|
||||
;;
|
||||
off)
|
||||
ensure_usb_network_gadget
|
||||
sysctl -w net.ipv4.conf.usb0.route_localnet=0 >/dev/null 2>&1 || true
|
||||
sysctl -w net.ipv4.ip_forward=0 >/dev/null 2>&1 || true
|
||||
nft delete table ip nat 2>/dev/null || true
|
||||
nmcli connection delete USBNetworkShare >/dev/null 2>&1 || true
|
||||
|
||||
Reference in new issue
Block a user