0

In my Pi 2 b, I've created a route and tried some masquerading via iptables, and I'm using pi-hole. The Arris cable modem does not have a feature to add any static routes nor CLI for iptables. This guide helped me block http://connectivitycheck.gstatic.com enter image description here

sudo iptables -L -n -t nat 
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DNAT       udp  --  8.8.4.4              0.0.0.0/0            udp dpt:53 to:10.141.165.1
DNAT       udp  --  8.8.8.8              0.0.0.0/0            udp dpt:53 to:10.141.165.1
DNAT       udp  --  0.0.0.0/0            8.8.8.8              udp dpt:53 to:10.141.165.1
DNAT       udp  --  0.0.0.0/0            8.8.4.4              udp dpt:53 to:10.141.165.1

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0

Here's a route:

route -ne
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.141.165.1    0.0.0.0         UG        0 0          0 eth0
8.8.4.4         10.141.165.1    255.255.255.255 UGH       0 0          0 eth0
8.8.8.8         10.141.165.1    255.255.255.255 UGH       0 0          0 eth0
10.141.0.0      0.0.0.0         255.255.0.0     U         0 0          0 eth0

Alas I can still ping:

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=123 time=18.155 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=123 time=13.884 ms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.