2

I am newbie.
I tried DHCP Mac filtering is not enough to secure our networks and I think iptables will...
This is my concept:
I set a new laboratory (LAB) network. My other network is connected to a LAB server running Ubuntu 12.04 Linux as a router. And my LAB server is connected to the switch for LAN PCs. here is the image:

My LAB Network

What I want is:

  1. I only want registered mac addresses to be able to have an internet/network connection.
  2. I want those registered mac addresses connected only to the a specific network address for file sharing.
    • I want to know what are the steps should I follow. Do I have to: Flush all the iptables rules first then set default policies to DROP or set default policies after mac filtering.

I did some research related to these.

--Flushing All IPTABLES Rules (all connections lost)

iptables -F        
iptables -X        
iptables -t nat -F        
iptables -t nat -X        

--Setting Default Policies To DROP (same)

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

--MAC Address Filtering (the rule save but still doesn't work)
*list of mac addresses save to a mac_addresses_file*

cat mac_addresses_file | while read macfile        
do        
iptables -A FORWARD -m mac --mac-source $macfile -m state --state NEW -j ACCEPT        
iptables -I INPUT -m mac --mac-source $macfile -m state --state NEW -j ACCEPT        

Then Set default policies to DROP


I am hoping for your help and we will work it out, guys.
Thanks

2
  • Here are some of the links. link2 link3
    – rjbarsal
    Jul 6, 2013 at 17:26
  • 1
    This question isn't really Ubuntu specific, this question might be more relevant for ServerFault or similar.
    – papukaija
    Jul 6, 2013 at 19:42

0

You must log in to answer this question.

Browse other questions tagged .