Hi there,
Just wondering where the best place to put the following iptables script to force my virtual redundant keepalived ip address consisting of my dual pihole setup (192.168.1.20) I run DOH but wanted to capture and redirect any port 53 traffic as well. My command is below. Just wondering where the best place under /jffs/ to place this script and make it executable. Cheers.
Just wondering where the best place to put the following iptables script to force my virtual redundant keepalived ip address consisting of my dual pihole setup (192.168.1.20) I run DOH but wanted to capture and redirect any port 53 traffic as well. My command is below. Just wondering where the best place under /jffs/ to place this script and make it executable. Cheers.
Code:
iptables -t nat -A PREROUTING ! -s 192.168.1.20 ! -d 192.168.1.20 -i br0 -p tcp --dport 53 -j DNAT --to 192.168.1.20
iptables -t nat -A PREROUTING ! -s 192.168.1.20 ! -d 192.168.1.20 -i br0 -p udp --dport 53 -j DNAT --to 192.168.1.20
iptables -t nat -A PREROUTING ! -s 192.168.1.20 ! -d 192.168.1.20 -i br0 -p tcp --dport 5053 -j DNAT --to 192.168.1.20
iptables -t nat -A PREROUTING ! -s 192.168.1.20 ! -d 192.168.1.20 -i br0 -p udp --dport 5053 -j DNAT --to 192.168.1.20