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

    Change MAC-address of NIC

    Scheduled Pinned Locked Moved Routing and Multi WAN
    2 Posts 2 Posters 2.1k 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.
    • F Offline
      frater
      last edited by

      I have a multi LAN/WAN setup with more than 30 VLANs on a

      This pfsense machine is the SPOF (single point of failure) for a small community.
      When it goes down I have a spare machine, exactly the same, which can turned on.
      Each hour the config of my pfsense is downloaded and I will always have a fresh XML which I can put in the new machine.

      Even though I have this machine running, it will take a lot of time before it is actually working.
      This, because the NICs have different MAC-addresses.

      Furthermore I will get a different WAN IP-address on 1 of the 5 WAN-connections.
      Most is more of a nuisance than necessity, but if possible I would like to solve it.

      I was thinking about giving these commands as an "earlyshellcmd" in the config.xml

      ifconfig em0 ether 02:01:02:03:04:05
      ifconfig em1 ether 02:01:02:03:04:05
      

      BTW      In the past I tried to use the MAC-spoof option for my WAN, but somehow it doesn't work when these interfaces are VLANs. At least not with the NIC I was using.

      Has anyone tried it before and is it a good idea?

      I have put these commands already in my config, but I have no way to test it….

      1 Reply Last reply Reply Quote 0
      • jimpJ Offline
        jimp Rebel Alliance Developer Netgate
        last edited by

        VLAN MACs follow the MAC of their parent interface. Assign the parent interface of the VLANs, set IP type to none, and spoof the MAC there.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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