I am using freebsd FreeBSD as a gateway, and I am trying to do filtering by MAC addresses.
For example, I want to allow the traffic from machine A with MAC address xx xx xx xx. So I created a sample firewall rule like below.
But it doesn't work on my gateway. I am still reading the "PACKET FLOW" section of the ipfw's man page. and trying to find the reason.
Some friends already told me that some traffic is in layer3 only. So I can not match them with MAC addresses. But I found that it works on PFSense.
For example, I want to allow the traffic from machine A with MAC address xx xx xx xx. So I created a sample firewall rule like below.
Code:
#allow the traffic from that machine
allow all ip from any to any MAC xx:xx:xx:xx any
#allow the traffic back to that machine
allow all ip from any to any MAC any xx:xx:xx:xx
#block all others
deny all ip from any to any
But it doesn't work on my gateway. I am still reading the "PACKET FLOW" section of the ipfw's man page. and trying to find the reason.
Some friends already told me that some traffic is in layer3 only. So I can not match them with MAC addresses. But I found that it works on PFSense.