Page 1 of 1

Block a Mac from accessing wan via commands

Posted: Mon Jun 15, 2015 4:23 am
by harsini
Hi.I want to block a list of mac addresses in my c# program using ssh commands for gargoyle or openwrt.I use iptables commands and they worked fine in rejecting the clients access to internet but as the router reboot all the rules are gone.

Code: Select all

iptables -A forwarding_rule -m mac --mac-source  1c:7b:21:e5:cd:fd -j reject
It's strange for me that how no one ask about this in gargoyle and openwrt forums as I search them.
Where should I write my rules in-order not to delete after rebooting?Should I do anything further after issue above command?
What is other solution for reject and allow mac addresses access to internet ?

Re: Block a Mac from accessing wan via commands

Posted: Tue Jun 16, 2015 6:40 am
by nworbnhoj
I suspect that you should use the UCI
http://wiki.openwrt.org/doc/uci/firewall