Use firewall-cmd to filter by MAC address?

Anthony Messina amessina at messinet.com
Wed Dec 25 00:00:38 UTC 2013


On Saturday, December 21, 2013 01:31:30 AM Michael Hannon wrote:
> Greetings. In a previous version of Fedora I had iptables rules of the
> form:
> 
> -A INPUT -p tcp --destination-port 25 -m mac --mac-source \
> AA:BB:CC:DD:EE:FF -j ACCEPT
> 
> in order to accept email only from selected local systems.
> 
> I've just installed Fedora 20, and I'm trying to implement the same kind of
> thing using:
> 
> firewall-cmd
> 
> but I've been unable to figure out how to do this. Any thoughts?
> 
> Thanks,
> 
> -- Mike

I believe the firewalld devs are working on this, but for now, you can 
manually enter something like the following in /etc/firewalld/direct.xml.  Of 
course, you'll need to unwrap the lines and choose the right chain for your 
system (it might not be IN_internal_allow).  I use something like this for my 
HDHomeRun tuners.

<?xml version="1.0" encoding="utf-8"?>
<direct>
  <passthrough ipv="ipv4">-t filter -A IN_internal_allow -m mac --mac-source \ 
AA:BB:CC:DD:EE:FF -j ACCEPT</passthrough>
  <passthrough ipv="ipv6">-t filter -A IN_internal_allow -m mac --mac-source \ 
AA:BB:CC:DD:EE:FF -j ACCEPT</passthrough>
</direct>

Merry Christmas!
-A

-- 
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20131224/5446efeb/attachment.sig>


More information about the users mailing list