This file is interpreted as shell script.

Put your custom iptables rules here, they will

be executed with each firewall (re-)start.

Internal uci firewall chains are flushed and recreated on reload, so

put custom rules into the root chains e.g. INPUT or FORWARD or into the

special user chains, e.g. input_wan_rule or postrouting_lan_rule.

iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -o br-lan -j MASQUERADE

Last modification:November 30, 2024
If you think my article is useful to you, please feel free to appreciate