ip route
default via 192.168.0.2 dev wlan0 proto dhcp metric 600
169.254.0.0/16 dev wlan0 scope link metric 1000
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.235 metric 600
192.168.1.0/24 via 192.168.0.11 dev wlan0 proto dhcp metric 600
however my android tablet does not get it. It's running android Oreo, not rooted.
Any idea on how to solve this issue?
$ ip route show
10.0.0.0/24 dev wlan0 proto kernel scope link src 10.0.0.143
10.83.242.0/24 dev rmnet1 proto kernel scope link src 10.83.242.254
But I dont trust Termux because I believe it runs in an environment different from what the apps are running in.
For example the nslookup tool always queries 8.8.8.8 default and not the DNS servers received via DHCP:
Looking around, it seems Android has issues with static routes, so I gave up on this approach and instead set a routing rule on the system running pi-hole, which also acts as a gateway. I don't know why I didn't think of that before...
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
up ip route add default via 192.168.0.1 dev eth0 metric 200
up ip route add default via 192.168.42.129 dev usb0 metric 100
up ip route add 192.168.1.0/24 via 192.168.0.11 dev eth0