I have the following IPTable rules:

iptables -I FORWARD -i br1 -d nvram get lan_ipaddr/nvram get lan_netmask -m state --state NEW -j DROP

iptables -t nat -I POSTROUTING -o br0 -j SNAT --to nvram get lan_ipaddr

These rules 1) Allow people connected to the wifi to access the internet 2) Block people on the wifi from accessing vlan0

I would like to add a rule to allow specific mac addresses access to vlan0 from the wifi (eth1)

I'm having trouble grokking the Iptable syntax, and any help would be greatly appreciated.


iptables -A FORWARD -m mac --mac-source XX:XX:XX:XX:XX:XX -i eth1 -o eth0.0 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0.0 -j DROP # or REJECT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.