LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-23-2012, 04:05 AM   #1
dashang.trivedi
Member
 
Registered: Feb 2011
Posts: 56

Rep: Reputation: 0
ipset ( mac address match in postrouting )


I want to allow MAC address based authentication without ip address.
For that source mac address is match in PREROUTING .


ipset create macbasedusers bitmap:ip,mac range 10.104.1.0/24
ipset add macbasedusers 10.104.1.122,00:19:b9:76:b9:b8 (Currently I have add ip manually for testing).

iptables -t mangle -I PREROUTING -m set --match-set macbasedusers src,src -j ACCEPT


now in POSTROUTING this condition is not match for destination because there is no MAC address match in POSTROUTING its work on ip layer.
But my requirement is to allow flow only based on MAC ADDRESS. I want to create system in only MAC based authentication is there.


So how to match MAC ADDRESS in POSTROUTING.???
 
Old 02-24-2012, 04:16 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I am not sure how to accomplish this goal and I am not sure what your security requirements are, but I will caution you that MAC address is a really poor means for authentication because it is easily spoofed. Using a few commands, it is easy to query MAC addresses associated with an access point and then simply change your MAC address to one of these addresses.

If you really want to filter or allow only certain MAC addresses, why not drop all packets from non white listed MAC addresses at the input instead of trying to filter them at the output of the netfilter chain? If you look at the diagram in figure 14-1 of this link, I think you will see why mac filtering on the postrouting chain doesn't make a lot of technical sense.
 
1 members found this post helpful.
  


Reply



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
how do I find what MAC address web pages see as my MAC address rob.rice General 20 05-29-2010 02:08 AM
dhcp no ip address and netmask dont match route address pengy666 Linux - Wireless Networking 1 05-08-2005 09:33 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
iptables POSTROUTING doesn't match local-process replies. bentz Linux - Networking 3 03-10-2004 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:29 AM.

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