Skip to contentSkip to conversation

need help

DISCUSSION Karthik RC 4 participants 4 messages Apr 29, 2003

lore
Share & tools
lore

Karthik RC

author
#0 lore raw

Hello ,
can we do IP/MAC filering through iptables..
regards
from karthik

#1 lore raw

Hi

Yes you can do MAC address based Filter using Iptables

hare
----- Original Message -----
From: "Karthik RC" <[email protected]>
To: <[email protected]>
Sent: Tuesday, April 29, 2003 3:51 PM
Subject: need help

Quoted 7 lines

Hello ,
can we do IP/MAC filering through iptables..
regards
from karthik

#2 lore raw
In reply to Karthik RC

You can use MAC match option

example:

IPTABLES -A INPUT -m mac --mac-source 00:00:00:00:01:11

regards.
JW

*********** REPLY SEPARATOR ***********

Quoted 4 lines · Karthik RC

Hello ,
can we do IP/MAC filering through iptables..
regards
from karthik

#3 lore raw
In reply to Karthik RC
Quoted 2 lines

Hello ,
can we do IP/MAC filering through iptables..

Yes, you can match the source/destination IP address and/or source MAC address.

Examples:

# iptables -A FORWARD -s 10.20.30.40 -j REJECT
# iptables -A OUTPUT -d 10.12.13.14 -j LOG
# iptables -A FORWARD -m mac --mac-source 00:01:23:45:67:89 -j ACCEPT
# iptables -A FORWARD -m mac --mac-source ! 00:01:23:45:67:89 -j REJECT

Please read

# iptables -m mac --help
# iptables --help
And whatever comes to your mind, the modules have their own help messages.
# iptables -p tcp --help
# iptables -m state --help
etc...

Regards,
Maciej