What's new

setting up on-board openvpn server w/pihole question

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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:

Latest threads

Sign Up For SNBForums Daily Digest

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