Re: MAC addres and iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sasa Stupar pravi:

Antony Stone pravi:

On Sunday 29 February 2004 1:45 pm, Sasa Stupar wrote:



Hi!

I have a working router for my network. Is it possible to allow access
to the router by defining a MAC address with iptables?
So basically I need to allow only some users to access internet and not
all. So I want to allow access only to users with certain MAC address
and deny all others.

Is this possible with iptables and how?


Try something like:

iptables -A INPUT -s a.b.c.d -m mac --mac aa:bb:cc:dd:ee:ff -j ACCEPT

Where a.b.c.d is the IP address and aa:bb:cc:dd:ee:ff is the MAC address of the machine you want to allow access to the firewall system.

You need to have compiled mac address matching into your kernel, or loaded the appropriate module.

See "man iptables" for more info.

Regards,

Antony.




Thanx for the answer. Since I am new to linux and iptables: how do I know if mac address matching is compiled or not in the kernel and what is the responsible module?
BTW, I am running on RH8 with iptables 1.2.9.


Regards,
Sasa


I have done this command and it doesn't work. I have changed the rule to:

iptables -A INPUT -s ! a.b.c.d -m ! mac --mac aa:bb:cc:dd:ee:ff -j DROP

then it works BUT as soon as I add another ip and mac address then I am blocked out.

What am I doing wrong here?

Regards,
Sasa


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux