Saturday, February 19, 2005

block mac .....

waduh ... gw beberapa hari ini bingung pisan ... soalnya ada client di lan gw yang suka main internet .. mentang mentang jago komp gw block ip dia .. dia ganti ip .. makanya gw pengen block aja mac nya ... eheheh wah wah tp .. apa daya ... stress nyari scriptnya di google untuk iptables.... heheh nech tp gak tau bener ato gak ..
beberapa alamat gw dapet di sini
http://ccfaq.valar.co.uk/modules.php?name=News&file=article&sid=138

referensi 1

[root@clarkconnect root]# iptables -A INPUT -p all -m mac --mac-source aa:bb:cc:dd:ee:04 -j DROP

iptables -I PREROUTING -t nat -j DROP --mac-source 00:50:56:40:5E:32 -p tcp --dport 80
iptables -I PREROUTING -t nat -j DROP --mac-source 00:50:56:40:5E:32

referensi 2

buat droped
iptables -I FORWARD -i eth1 -m mac --mac-source xx:xx:xx:xx:xx:xx -j DROP

untuk mendelete
iptables -I FORWARD -i eth1 -m mac --mac-source xx:xx:xx:xx:xx:xx -j DROP

referensi 3

# 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

Referensi 4

iptables -A INPUT -m mac --mac-source 00:00:00:00:00:01 -j DROP

iya nech cara install dan ref tentang iptables ada di sinich .....
http://www.cae.wisc.edu/fsg/linux/linux-iptables.shtml