What's new

setting up on-board openvpn server w/pihole question

Jumpstarter

Senior Member
I have setup nat table rules to control the interface of the router VPN server
piholes ip is "192.168.1.2"
iptables -t nat -A PREROUTING -i tun21 -p udp --dport 53 -j DNAT --to 192.168.1.2
iptables -t nat -A PREROUTING -i tun21 -p tcp --dport 53 -j DNAT --to 192.168.1.2
iptables -t nat -A PREROUTING -i tun22 -p udp --dport 53 -j DNAT --to 192.168.1.2
iptables -t nat -A PREROUTING -i tun22 -p tcp --dport 53 -j DNAT --to 192.168.1.2


Also, I have setup push "dhcp-option DNS 192.168.1.2" inside the server settings.
I did not want to manipulate connect to DNS automatically option. left it at default Yes
Are there any options i need to consider for conditional forwarding and reverse lookup?


EDIT:
Decided to switch to
Code:
iptables -t nat -A PREROUTING -i tun21 -p udp ! --source 192.168.1.2 ! --destination 192.168.1.2 --dport 53 -j DNAT --to 192.168.1.2
iptables -t nat -A PREROUTING -i tun21 -p tcp ! --source 192.168.1.2 ! --destination 192.168.1.2 --dport 53 -j DNAT --to 192.168.1.2
iptables -t nat -A PREROUTING -i tun22 -p udp ! --source 192.168.1.2 ! --destination 192.168.1.2 --dport 53 -j DNAT --to 192.168.1.2
iptables -t nat -A PREROUTING -i tun22 -p tcp ! --source 192.168.1.2 ! --destination 192.168.1.2 --dport 53 -j DNAT --to 192.168.1.2
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top