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:
What I want is:
- I only want registered mac addresses to be able to have an internet/network connection.
- 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.