Skip to content

Instantly share code, notes, and snippets.

@NNdroid
Created July 19, 2023 02:09
Show Gist options
  • Save NNdroid/1a90376bedc9935eafa7dca2954a83d5 to your computer and use it in GitHub Desktop.
Save NNdroid/1a90376bedc9935eafa7dca2954a83d5 to your computer and use it in GitHub Desktop.
dns hijack
iptables -t nat -A PREROUTING ! -s 10.42.0.1/32 ! -d 10.42.0.1/32 -p tcp -m tcp --dport 53 -j DNAT --to-destination 10.42.0.1:53
iptables -t nat -A PREROUTING ! -s 10.42.0.1/32 ! -d 10.42.0.1/32 -p udp -m udp --dport 53 -j DNAT --to-destination 10.42.0.1:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment