I wanna to route all traffic by DNS. It worked before by following these commands ,but it doesn't work today for unknown reasons.
Before connecting to iodine:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default edimax.com 0.0.0.0 UG 0 0 0 wlan0
link-local * 255.255.0.0 U 1000 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 2 0 0 wlan0
After connecting:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default edimax.com 0.0.0.0 UG 0 0 0 wlan0
10.0.0.0 * 255.255.255.224 U 0 0 0 dns0
link-local * 255.255.0.0 U 1000 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 2 0 0 wlan0
Command to route data over DNS tunnel:
#!/bin/bash
sudo route del default gw 192.168.2.1 wlan0
sudo route add default gw 10.0.0.1 dns0
sudo route add -net 209.54.48.51 netmask 255.255.255.255 gw 192.168.2.1 wlan0
