Browse Source

Add DNS hint

Virtual DNS intercepts the DNS queries generated by the machine. This
requires that the queries are actually sent through the tunnel
interface. In some scenarios, this is not automatically the case, for
example when `/etc/resolv.conf` contains a `nameserver` entry with some
local IP address for which there is a route through the ethernet
interface. A special-purpose IP address like 198.18.0.1 is unlikely to
be inside another route than the default route and can be used to force
DNS resolution through the tunnel.
pull/19/head
B. Blechschmidt 3 years ago
parent
commit
d4127af422
  1. 3
      README.md

3
README.md

@ -34,6 +34,9 @@ sudo ip route add 0.0.0.0/1 dev tun0
sudo ip route add ::/1 dev tun0
sudo ip route add 8000::/1 dev tun0
# Make sure that DNS queries are routed through the tunnel.
sudo sh -c "echo nameserver 198.18.0.1 > /etc/resolv.conf"
./target/release/tun2proxy --tun tun0 --proxy "$PROXY_TYPE://$PROXY_IP:$PROXY_PORT"
```

Loading…
Cancel
Save