Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Alias by mac address?

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 6 Posters 5.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tantamount
      last edited by

      With the ASUS Routers, it is possible to name devices based on their mac address.  The benefit of this is that when it comes time to apply firewall rules, one doesn't have to know what the current ip address is of the device – it can remain dynamic.

      So far with pfsense, the only way I can name devices is through aliases, but that requires that the ip address be fixed.  Is there a way to mirror what the ASUS router does?

      S 1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        i dont think so.
        aliasses are designed to work with pf. pf does not support mac filtering. setting fixed dhcp leases is you best way to do what you want

        1 Reply Last reply Reply Quote 0
        • DerelictD
          Derelict LAYER 8 Netgate
          last edited by

          You could create aliases using FQDNs and have the DHCP server update DNS.

          Not sure what the update frequency would be.

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • T
            Tantamount
            last edited by

            @heper:

            i dont think so.
            aliasses are designed to work with pf. pf does not support mac filtering. setting fixed dhcp leases is you best way to do what you want

            The ASUS routers runs linux, which means they uses iptables for filtering.  When I've listed the rules, they've only been ip address type rules.  This means that there is additional software doing the translation from mac to ip at some point.

            I guess I'll post this in the feature request area.  :)

            JKnottJ 1 Reply Last reply Reply Quote 0
            • S
              sceptre357 @Tantamount
              last edited by

              @tantamount you can achieve this effect easily enough by creating a Static DHCP mapping. Just map the MAC address to a specific IP address in the DHCP server settings area, then just use IP addresses. It has the same effect in the end in that you can make preferences to a specific device as based on a MAC address, thereby not needing to statically assign addresses on the client.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                As @Derelict said as long as pfSense can resolve them you can just use the hostnames directly in an alias. As long as you have enabled 'DHCP Registration' in the DNS resolver that will be true.

                I would not use that for a large network though or anywhere that dhcp leases change often as the filterdns updates might lag behind those changes with unexpected results.

                Steve

                1 Reply Last reply Reply Quote 0
                • JKnottJ
                  JKnott @Tantamount
                  last edited by

                  @tantamount

                  IPtables can do MAC filtering.

                  Several years ago, at a Linux user group, a presenter thought he could use it to filter someone elsewhere from his network. I had to correct him and advise him he would never see that MAC address.

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    Just block everything coming via the same router. 😉

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.