LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-30-2008, 03:20 AM   #1
newuser77
LQ Newbie
 
Registered: Jun 2008
Posts: 4

Rep: Reputation: 0
mac address filter help


LAB --------| eth1 RHEL5U1) eth0 |-------LAN



eth0=192.168.100.100/24
eth1=192.168.1.10/24
windows client=192.168.1.15/24 ,share folder name="windows share"

I have 2 network install in RHEL5U1.I have windows system install in LAB sharing a folder name "windows share".I mount the windows share under linux system then I share it to LAN windows client (samba).
1. I want to limit certain client in LAN(eth0) to access the share folder using mac address while allowing all LAB(eth1) client to access the linux samba share.I have writing the iptables script.But seem like not working at all.Please help !

script:
#!/bin/sh
#default policy
echo "Flushing Firewall and Deleting Chains"

iptables -F icmp_packets
iptables -t nat -X

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP


#Allow Ext traffic
iptables -A INPUT -m mac –mac-source 00:23:B3:28:C8:97 -i eth0 -j ACCEPT
iptables -A INPUT -m mac –mac-source 00:2C:23:2F9:34 -i eth0 -j ACCEPT
iptables -A INPUT -m mac –mac-source 00:1C:BF:99:B5:98 -i eth0 -j ACCEPT
iptables -A INPUT -m mac –mac-source 00:1C:23:2F:15:06 -i eth0 -j ACCEPT
iptables -A INPUT -m mac –mac-source 00:1C:BF:85:32:34 -i eth0 -j ACCEPT
iptables -A INPUT -m mac –mac-source 00:1C:23:2K9:CC -i eth0 -j ACCEPT
iptables -A INPUT -m mac –mac-source 00:1C:BF:89:76:27 -i eth0 -j ACCEPT

#Allow Int traffic
iptables -A INPUT -s 192.168.1.0/24 -i eth1 -j ACCEPT

Last edited by newuser77; 06-30-2008 at 03:24 AM.
 
Old 06-30-2008, 07:13 AM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
I think you should use the FORWARD chain.
Do you have to use MAC based filter - MACs can easily be changed.
Assuming the computers are getting their adresses via dhcp - you can assign them specific adresses by their MAC adress - and use IP based filters instead of MAC in your script.
 
  


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
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
[ urgent]Packet filter using Source MAC address aashish.verma Programming 5 06-03-2006 02:54 AM
Packet filter using MAC Address aashish.verma Linux - Networking 1 05-30-2006 07:41 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
Need to filter devices out from a firewall by MAC address bhenry Linux - Security 3 10-07-2004 11:29 PM

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

All times are GMT -5. The time now is 12:31 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