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

    FILTERING PORT FORWARD BY MAC ADDRESS

    Scheduled Pinned Locked Moved NAT
    5 Posts 3 Posters 1.9k 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.
    • A
      advcorp
      last edited by

      Hello I am writing to see if, in the port forward, can I filter access to a port based on the MAC address?
      Best regards

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        When exactly would this be required??  What are you trying to accomplish with it?  On the wan side, which is normally internet access the only mac address seen would be the mac of the gateway.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • P
          perth
          last edited by

          An example of a reasonable reason for trying this would be what I'm currently trying to do. Set up a port forward to a host receiving its IP from DHCP, and only to that host (not a subnet, for example). The MAC address is the (most) stable network identifier in this scenario, it also provides the highest reliability of uniqueness.

          What it looks like will be required is port forwarding to a FQDN, as made available by a local DNS server updated by DHCP. This will most likely be hostname based port forwarding; though one could configure thing differently I suppose (DHCP providing a static IP to the target MAC being one example).

          pfSense provides the feature sets required to pull off DHCP->DNS->FQDN NAT/port forward.
          I'll post again when I have instructions…

          Edit: Useful stuff: https://doc.pfsense.org/index.php/DNS_Forwarder
          https://doc.pfsense.org/index.php/Using_FQDNs_in_Aliases
          https://doc.pfsense.org/index.php/DHCP_Server

          Getting boozed and going to bed now ;)

          Between A and B there's C.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            huh?  That is not what the OP asked..

            Your taking about just making sure you always forward to the same host, even if its IP would change.  And this is done via sure a dhcp reservation so it never changes.. Or just setup a static on the IP your going to forward too.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • P
              perth
              last edited by

              Huh? What? That's totally… rereads OP

              :|

              lol whoops.

              Between A and B there's C.

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