A Digital Age Deserves A Digital Leader

Iptables MAC filtering

Iptables MAC filtering

Postby sceaser » Mon Apr 28, 2008 8:25 pm

Hello fellow computer enthusiasts , Im am attempting to filter MAC addresses
using iptables , I have 3 MAC addresses entered into the script I plan to run , the 3 lines are allow port 22 MAC ******** , ect , but I need a little help with the Drop commands , If not specifed MAC addresses 1 ,2 or 3 port 22 drop ??
Does anyone have some help for da sceaser ???

I am running Redhat Enterprise Linux 5 ,
Main Rig Multiscreen^5_KVM+3 and Extra for Laptop, X4 AMD MSI Windows 7
Moblie Hp NX7400 Ubuntu
Mini Hp Ubuntu
Server Custom X6 AMD Linux Server
Server Hp Proliant X4x2 Linux Server
3X Dell Dual Core 3.0GHZ Linux Server
PRO Level 2
User avatar
Posts: 49
Joined: Tue Dec 28, 2004 6:48 pm
Location: MARS

Postby imnuts » Tue Apr 29, 2008 4:24 am

I don't know the exact command, but I'm guessing that iptables is similar to ipfw from FreeBSD in how it applies rules. What you'll want to do is put the three allow commands as the first three rules, then the final filter will be to drop everything else. I don't know what it would look like exactly, but that is likely how it would be done. It's also possible that the lower number commands have lower priority (I forget as I haven't ever really used it), in which case just switch the order of your commands.
Image
PRO SUPREME
User avatar
Posts: 7457
Joined: Wed Mar 24, 2004 5:19 am
Location: Boothwyn, Pennsylvania
Real Name: Mark

Return to Other Operating Systems

Who is online

Users browsing this forum: No registered users and 2 guests

cron
cron