Skip to content

How do I set custom DNS servers for a proxy? #660

Answered by laikitleung
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

nat a virtual ip such as 255.255.255.53,then set your proxy nameserver 255.255.255.53
iptables -t nat -A OUTPUT -p udp --dport 53 -d 255.255.255.53 -j DNAT --to-destination 1.1.1.1:53
iptables -t nat -A OUTPUT -p tcp --dport 53 -d 255.255.255.53 -j DNAT --to-destination 1.1.1.1:53

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@zonyitoo
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants