i want to block trafic from a MAC address

Taking care of your Linux box.

i want to block trafic from a MAC address

Postby smk08 » Tue Dec 16, 2008 2:48 pm

Asslamu Alaikum

Dear fellows i want to block the traffic from a particular mac address to my squid server 00-1C-2B-F0-A1-BB-AC either by iptables or by squid acls.




Thanks
Shahid Mahmood
0321-4538113
i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Postby lambda » Tue Dec 16, 2008 4:07 pm

Code: Select all

iptables -A INPUT -m mac --mac-source 00:1c:2b:f0:a1:bb:ac -m tcp -p tcp --dport 3128 -j REJECT

why haven't you read the documentation?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

An error occur

Postby smk08 » Wed Dec 17, 2008 8:22 am

Asslamu Alaikum

when i write the following rule in iptables
iptables -A INPUT -m --mac-source 00-1C-F0-A1-B8-33 -m tcp -p tcp --dport 8080 -j REJECT

The error occur
iptables v1.3.5: Couldn't load match `--mac-source':/lib/iptables/libipt_--mac-source.so: cannot open shared object file: No such file or directory
Shahid Mahmood

0321-4538113

i am crazy to learn linux
smk08
Naik
 
Posts: 56
Joined: Fri Aug 08, 2008 1:44 pm
Location: Sheikhupura, Pakistan

Postby x2oxen » Wed Dec 17, 2008 10:05 am

you missing the library i guess.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
x2oxen
Major General
 
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Website: http://usmanpk.com
WLM: x2oxen@hotmail.com
Yahoo Messenger: x2oxen
Location: Faisalabad

Postby lambda » Wed Dec 17, 2008 10:45 am

the command you executed and the command i wrote are not the same.

read for comprehension!
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Re: An error occur

Postby LinuxFreaK » Thu Dec 25, 2008 1:01 pm

Dear smk08,
Salam,

smk08 wrote:when i write the following rule in iptables
iptables -A INPUT -m --mac-source 00-1C-F0-A1-B8-33 -m tcp -p tcp --dport 8080 -j REJECT

The error occur
iptables v1.3.5: Couldn't load match `--mac-source':/lib/iptables/libipt_--mac-source.so: cannot open shared object file: No such file or directory


iptables -A INPUT -m mac --mac-source 00:1c:f0:a1:b8:33 -m tcp -p tcp --dport 8080 -j REJECT

Best Regards.
Farrukh Ahmed
LinuxFreaK
Site Admin
 
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
ICQ: 82075802
Website: http://www.linuxpakistan.net/wiki/index.php?pagename=LinuxFreak
WLM: f4fahmed@hotmail.com
Yahoo Messenger: f4fahmed@yahoo.com
AOL: linuxpakistan@aol.com
Location: Karachi


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron