Skip to contentSkip to conversation

How to Block Mac Address ?

DISCUSSION Mohammad Shakir 1 participant 1 message Jun 15, 2003

lore
Share & tools
lore
#0 lore raw

I want to block a mac address for this I complie this rule but it is not working, any friend who can slove this problem.

# Flush all Rules
/sbin/iptables --flush
/sbin/iptables --table nat --flush
/sbin/iptables --delete-chain
/sbin/iptables --table nat --delete-cha
/sbin/iptables -N MACtest

# to block this MAC Address
/sbin/iptables -t filter -A FORWARD -j MACtest /sbin/iptables -A MACtest -m mac --mac-source 00:02:55:EE:65:D8 -j DROP

# for MASQUREADE
/sbin/iptables --table nat --append POSTROUTING -s 192.168.0.0/24 --out-interface ppp0 -j MASQUERADE

echo "1" > /proc/sys/net/ipv4/ip_forward

---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!