Networking Forums

Networking Forums > Computer Networking > Linux Networking > IP Masquerading/NAT with MAC address filtering

Reply
Thread Tools Display Modes

IP Masquerading/NAT with MAC address filtering

 
 
Matt
Guest
Posts: n/a

 
      09-05-2003, 05:27 PM
Hello,
Can anyone give me some insight here as to how to start this?
I know how to setup IP Masquerading/NAT with a linux machine.. no
problem there.

What I'm looking to do is be able to filter what goes through the nat to
the outside world based on MAC address. It's going to be an all or
nothing... either the MAC address is allowed to go out, or it isn't.

How can I enable/disable internet access on a network for a MAC address,
for computers going through a linux IP MASQ/NAT to the outside world?

~ Matt

 
Reply With Quote
 
 
 
 
Horst Knobloch
Guest
Posts: n/a

 
      09-05-2003, 06:13 PM
On Friday 05 September 2003 19:27, Matt wrote:


> What I'm looking to do is be able to filter what goes through the nat to
> the outside world based on MAC address. It's going to be an all or
> nothing... either the MAC address is allowed to go out, or it isn't.
>
> How can I enable/disable internet access on a network for a MAC address,
> for computers going through a linux IP MASQ/NAT to the outside world?


Why don't you use the Mac-match module?

ALLOWED_MACS="01:02:03:04:05:06 06:05:04:03:02:01"

iptables -P FORWARD DROP

for allowed_mac in $ALLOWED_MACS ; do
iptables -A FORWARD -i eth0 -o ppp0 -m mac \
--mac-source "${allowed_mac}" -j ACCEPT
done

and natting as usual.

root# iptables -V
iptables v1.2.6a



HTH

Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
Reply

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac Address Filtering Bill T. Wireless Networks 15 01-17-2008 09:35 AM
MAC Address Filtering & Bandwidth Limiting based on MAC Address w.kinderman Linux Networking 0 11-11-2004 10:19 PM
MAC address filtering MN-500, allow unspecified MAC address? Tony Broadband Hardware 2 07-14-2004 05:18 AM
MN-500 MAC address filtering Kenneth Broadband Hardware 3 03-04-2004 07:52 PM
mac address filtering. qwerty Wireless Internet 9 10-07-2003 11:33 PM



1 2 3 4 5 6 7 8 9 10 11