iptable MAC Filtering

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
tkgcmt
DD-WRT Novice


Joined: 02 Apr 2014
Posts: 2

PostPosted: Wed Apr 02, 2014 5:22    Post subject: iptable MAC Filtering Reply with quote
So, recently got into dd-wrt.
I want to set a rule, so I can only connect at wl0.1 from a specific MAC.

So i ran those commands at a Command Prompt:

Code:
$ telnet 192.168.1.1
$ insmode xt_mac #k2.6
$ iptable -I FORWARD -i wl0.1 -m mac --mac-source CE.LL.PH.ON.EX.XX -j DROP
(didn't worked, so:)
$ iptable -F
$ iptable -I INPUT -i wl0.1 -m mac --mac-source CE.LL.PH.ON.EX.XX -j DROP


I also tried with -A over the -I option. None of those prevented me from connecting to the internet with my cellphone, that has that MAC address. Am I doing something wrong here?
And do I have to reset the router or something for those rules to take effect?

Thanks in advance.


Last edited by tkgcmt on Thu Apr 03, 2014 3:00; edited 1 time in total
Sponsor
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 13049
Location: Behind The Reset Button

PostPosted: Wed Apr 02, 2014 12:53    Post subject: Re: iptable MAC Filtering Reply with quote
tkgcmt wrote:
So, recently got into dd-wrt.
I want to set a rule, so I can only connect at wl0.1 from a specific MAC.

So i ran those commands at a Command Prompt:

$ telnet 192.168.1.1
$ insmode xt_mac #k.6
$ iptable -I FORWARD -i wl0.1 -m mac --mac-source CE.LL.PH.ON.EX.XX -j DROP
(didn't worked, so:)
$ iptable -F
$ iptable -I INPUT -i wl0.1 -m mac --mac-source CE.LL.PH.ON.EX.XX -j DROP


I also tried with -A over the -I option. None of those prevented me from connecting to the internet with my cellphone, that has that MAC address. Am I doing something wrong here?
And do I have to reset the router or something for those rules to take effect?

Thanks in advance.


just use the mac filtering in the gui and select "allow" for the mac(s) you enter in the list. Any other mac not in the allowed list will be denied.

I use mac filtering via gui and it works.

or.. it could be the known bug in the build you are running with your specific hardware.

_________________
[Moderator Deleted] Shocked
tkgcmt
DD-WRT Novice


Joined: 02 Apr 2014
Posts: 2

PostPosted: Thu Apr 03, 2014 2:28    Post subject: Re: iptable MAC Filtering Reply with quote
barryware wrote:

just use the mac filtering in the gui and select "allow" for the mac(s) you enter in the list. Any other mac not in the allowed list will be denied.


That won't work for me, because it will create the rules for all interfaces.


The thing is, I wanna do this only for my Virtual Interface (My second SSID, that has no security set). Don't know if anyone here ever heard of, but I'm trying to do a HomePass, for my 3DS.

The catch: without screwing with my main network, because my father works at home, dependant of the wifi.

I want to know if the commands I put is correct, at least :/
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum