I'm doing some testing on my linux VM with one nic, I want to use it as some kind of a firewall which can block traffic of some clients based on a mac address.
The client itself is having the VM as a default gateway (.254), the VM itself has (.1 the actual router) as default gateway.
This is the iptable script that I'm using at the moment. I have internet on my client, but .14 is still getting internet, when using the mac address, nothing is beging blocked.
Am I missing something?
# Generated by iptables-save v1.4.14 on Sun Feb 23 12:16:26 2014 *filter :INPUT ACCEPT [869:78983] :FORWARD ACCEPT [1183:197765] :OUTPUT ACCEPT [644:128360] # Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # log iptables denied calls (access via 'dmesg' command) -P FORWARD DROP -F FORWARD -A FORWARD -i eth0 -m mac --mac-source 64:20:0c:ac:f4:49 -j DROP -A FORWARD -i eth0 -s 192.168.1.14 -j DROP -A FORWARD -i eth0 -j ACCEPT # Reject all other inbound - default deny unless explicitly allowed policy: -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT # Completed on Sun Feb 23 12:16:26 2014