Custom rules on firewall TAB

Hi, anyone knows why I don't see the custom tab on LUCI --> Network --> firewall

1 Like

Because nftables (fw4) is different than iptables (fw3) and /etc/firewall.user as such doesn't exist anymore (see /etc/nftables.d/ as a rough equivalent). Both fw4 and its outer luci interface are still being worked on quite actively, maybe it comes back, maybe it won't, either way it needs to be handled quite differently to hook up custom nftables commands at the right place.

In the mean time, use your preferred editor to work via /etc/nftables.d/ (using nftables syntax, not iptables).

3 Likes

Now how can I make such rules for pihole?:
iptables -t nat -A PREROUTING -i br-lan ! -s 192.168.1.232 -p udp --dport 53 -j REDIRECT
iptables -t nat -A PREROUTING -i br-lan ! -s 192.168.1.232 -p tcp --dport 53 -j REDIRECT
iptables -t nat -A PREROUTING -i eth1.2 -p udp --dport 53 -j REDIRECT
iptables -t nat -A PREROUTING -i eth1.2 -p tcp --dport 53 -j REDIRECT
Thanks.