LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-10-2006, 08:29 AM   #1
eggoz
Member
 
Registered: Feb 2003
Posts: 159

Rep: Reputation: 30
MAC Filtering


I am trying to apply MAC filtering on my network. I know it can be spoofed, but I don't think anyone on this network is smart enough to try that. I have read that you can do this using Squid, which I have setup or using iptables.

According to this page (10.20), I first need to enable it. I installed it using the rpm that came with FC5. How can I check to this if this already configured?

Using iptables, this is what I have gathered,
iptables -N MAC_allow
iptables -A MAC_allow -m mac --mac-source 00:00:00:00:00:00 -j RETURN
iptables -A MAC_allow -m mac --mac-source 00:00:00:00:00:00 -j RETURN
iptables -A MAC_allow -j REJECT --reject-with icmp-net-prohibited
iptables -A FORWARD -i eth0 -o eth1 -p tcp -j MAC_allow
iptables -A FORWARD -i eth0 -o eth1 -p udp -j MAC_allow
(eth0 is local LAN, eth1 is Internet)

Is this look correct? First time I write my own iptables. Also, which way would be better. If I am correct, using squid, it will only block port 80? Thanks for the help.
 
Old 06-11-2006, 02:11 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by eggoz
I am trying to apply MAC filtering on my network. I know it can be spoofed, but I don't think anyone on this network is smart enough to try that. I have read that you can do this using Squid, which I have setup or using iptables.

According to this page (10.20), I first need to enable it. I installed it using the rpm that came with FC5. How can I check to this if this already configured?

Using iptables, this is what I have gathered,
iptables -N MAC_allow
iptables -A MAC_allow -m mac --mac-source 00:00:00:00:00:00 -j RETURN
iptables -A MAC_allow -m mac --mac-source 00:00:00:00:00:00 -j RETURN
iptables -A MAC_allow -j REJECT --reject-with icmp-net-prohibited
iptables -A FORWARD -i eth0 -o eth1 -p tcp -j MAC_allow
iptables -A FORWARD -i eth0 -o eth1 -p udp -j MAC_allow
(eth0 is local LAN, eth1 is Internet)

Is this look correct? First time I write my own iptables. Also, which way would be better. If I am correct, using squid, it will only block port 80? Thanks for the help.
the rules look okay, but it would be best if we could see the *entire* script to be sure of what is going-on there... why are you using a RETURN?? you don't have your FORWARD policy set to ACCEPT, do you?? cuz that would not be good...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MAC Filtering eggoz Linux - Networking 3 06-06-2006 03:20 AM
MAC address filtering in Slackware? houler Linux - Networking 9 05-12-2006 08:34 AM
mac address filtering gabsik Linux - Security 8 04-27-2006 09:23 AM
Questions on DHCP Filtering via MAC address brainee28 Linux - Networking 1 02-03-2005 03:11 PM
MAC address filtering firewall? gigaah Linux - Security 5 06-07-2004 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration