Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Networking > Matching MAC addresses to IP numbers

Forgot Password?
 Linux Networking   Hardware/Software related, Modems, Internet connection sharing, IPTables etc.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 01-21-2007   #1 (permalink)
Just Joined!
 
Join Date: Dec 2004
Location: Oakland, Ca
Posts: 2
Matching MAC addresses to IP numbers

Hi,

I have a network behind a firewall using IP tables and Squid w/squidGuard. I have access tables that only let certain IP numbers outside access and a while list for what everyone else can do. The problem is, a couple a guys think they know something about windows and change the IP number temporarily to someones that has full access. We've notice this when that person get the error message that his IP number is already being used on the network.

I'm running Fedora 6, and what I would really like to do is be able to match the MAC address to an assiciated IP address from a table in a file before deciding what to do with the packet.

I know these guys have no idea about whats going on outside of the windows network interface.

Thanks
Todd
tsimi is offline  


Reply With Quote
Old 01-21-2007   #2 (permalink)
Linux Newbie
 
framp's Avatar
 
Join Date: Jul 2006
Posts: 222
Try iptables and drop ip addresses which don't use the right mac address.
__________________
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds
framp is offline   Reply With Quote
Old 01-21-2007   #3 (permalink)
Just Joined!
 
Join Date: Dec 2004
Location: Oakland, Ca
Posts: 2
Hi framp,

That's exactly what I'd like to do. The problem is I don't know how to impliment that. Where do I put the information that associates an IP number to it's coresponding MAC address.

Also, how do I tell iptables to use this info and compare the two.

Thanks much

Todd
tsimi is offline   Reply With Quote
Old 01-21-2007   #4 (permalink)
Linux Newbie
 
framp's Avatar
 
Join Date: Jul 2006
Posts: 222
It's an interesting problem. So I just did some quick tests. I tried
Code:
iptables -I INPUT -i nic0 -s 192.168.0.6 -m mac --mac-source 00:50:fc:a6:f1:06 -j DROP
The two conditions are ANDed, i.e. if the client has 192.168.0.6 AND mac 00:50:fc:a6:f1:06 the condition fires.

So you have to have for every ip/mac pair one ACCEPT rule and finally a DROP rule for everything else. That should work
__________________
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds
framp is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:16 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2