Block a Mac from accessing wan via commands

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
User avatar
harsini
Posts: 84
Joined: Mon Jul 22, 2013 9:59 am
Location: Iran

Block a Mac from accessing wan via commands

Post 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 ?

nworbnhoj
Posts: 916
Joined: Mon Jul 21, 2014 10:08 am
Location: Australia
Contact:

Re: Block a Mac from accessing wan via commands

Post by nworbnhoj »

I suspect that you should use the UCI
http://wiki.openwrt.org/doc/uci/firewall
Can you help someone else get Gargoyle up and running?
TL-WDR3600 : Gargoyle 1.9.0 : NBN FixedWireless
TL-WR1043ND-V2 : Gargoyle 1.8.0 : 3G Huawei E160E

Post Reply