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

    Allow onbound IPv6 traffic for specific host, how?

    Scheduled Pinned Locked Moved Firewalling
    9 Posts 2 Posters 438 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.
    • -flo- 0-
      -flo- 0
      last edited by

      I have a host ´nc´ which I want to allow inbound IPv6 traffic to.

      How do I create a firewall rule for this?

      My LAN interface is configured to track WAN for a prefix and it gets configured with a prefix just fine. The host ´nc´ assigns itself a static IPv6 address based on its MAC.

      If I could match the fixed host-part of the IPv6 address I would be fine. However it seems this is not possible? Surely there is another way to do this?

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @-flo- 0
        last edited by Gertjan

        @flo-0 said in Allow onbound IPv6 traffic for specific host, how?:

        How do I create a firewall rule for this?

        Create a WAN 'pass' firewall rule :

        46d8669b-332c-470b-ad5f-6ae2fbf988e5-image.png

        where "2a01 : abcd : ef01 : 1234 :: 56" is the IPv6 of your LAN device.

        No NAT needed ;)

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        -flo- 0- 1 Reply Last reply Reply Quote 0
        • -flo- 0-
          -flo- 0 @Gertjan
          last edited by

          @Gertjan

          The host part of the IPv6 address (in your example this would be the ::56) is fixed, however the prefix (2a01🔡ef01🔢:) may change from my provider, for example to 2a01🔡ef01:1235::. Traffic to the host will then be blocked.

          How can I write a rule which works for any prefixes but only for one specific host part?

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @-flo- 0
            last edited by Gertjan

            @flo-0 said in Allow onbound IPv6 traffic for specific host, how?:

            however the prefix (2a01🔡ef01🔢:) may change from my provider, for example to 2a01🔡ef01:1235::

            Ah, ok, I get it.
            Your ISP changes the prefix for 'some reason'. They loved to do that with our IPv4 back in the good old days. My IPv4 is now static, as I checked the option "don't change it anymore".
            For the IPv6 I haven't that option, so mine can also change.
            Upgraded my ISP fiber capable router yesterday, the prefix was still the same.

            A solution ( ? ) Try this :

            Create a firewall Alias, and use "diskstation2.rented-domaine-name.net" (your device) as the FQDN. It will get resolved every 5 minutes

            48198afe-eab1-4b7e-b443-3d088511df57-image.png

            which means that the alias "diskstation2" will contain the IPv4 and IPv6 of your LAN device.
            Use this alias in your firewall rule.

            The prefix changes ? No issue, max 5 minutes later the alias changes and the firewall rules get reloaded, and you have access again.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 1
            • -flo- 0-
              -flo- 0
              last edited by

              Ah, so you have your server registered with a name server and pfSense retrieves the address from there into the alias. This is smart!

              Actually my ISP does not change addresses frequently. They stopped forcing a daily disconnect already years ago and the IP4 address stays fix for very long times. I'm not sure about the prefix because until now I never paid much attention to this.

              The problem is that the ISP does not guarantee to keep the addresses and prefixes fix. This means if I use such a "nearly fixed" address or prefix I have a ticking bomb in my setup. If eventually the ISP decides to change something I will long have forgotten about this and solving this will then take a long time.

              -flo- 0- GertjanG 2 Replies Last reply Reply Quote 0
              • -flo- 0-
                -flo- 0 @-flo- 0
                last edited by

                @flo-0

                Ok, this works like a charm!

                1 Reply Last reply Reply Quote 1
                • GertjanG
                  Gertjan @-flo- 0
                  last edited by

                  @flo-0 said in Allow onbound IPv6 traffic for specific host, how?:

                  you have your server registered with a name server

                  Actually, correct.
                  Just for me, as when I'm outside, driving in my car, I have it (the media stuff) connect to my mp3 bank, which is a actually my NAS @home.

                  Bit this isn't needed.
                  If you set up a static DHCPv6 lease, pfSEnse 'knows' the IPv4 and IPv6 of every device.
                  See for yourself :

                  cat /etc/hosts
                  

                  A snippet from mine :

                  9b034b72-69ce-4393-ab3c-cd612834217c-image.png

                  This file is also loaded into 'unbound', so, no surprise :

                  0aa1a7bf-4601-4227-99f9-92b797d4ef4d-image.png

                  Thus : make an alias out of it, and use this alias in the firewall rule as the "destination" address.
                  Take note : for IPv4 this doesn't make any sense, as (my example) 192.168.1.33 can't be used on the outside (Internet), but an IPv6 is very valid on my LAN, and the entire Internet.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  -flo- 0- 1 Reply Last reply Reply Quote 0
                  • -flo- 0-
                    -flo- 0 @Gertjan
                    last edited by

                    @Gertjan
                    Ok, understood. I would need to try this as well.

                    Regarding IP4: I'm exposing services based on IP4 since years, so I have a good understanding here. But I believe it's time to become more "IPv6 fluent" :-).

                    GertjanG 1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan @-flo- 0
                      last edited by Gertjan

                      @flo-0

                      Good for you 👍

                      www.amazone.com www.cnn.com www.whitehouse.gov www.apple.com www.microsoft.com www.netflix.comto to name some big players all switched.
                      google.com adopted it years ago.
                      Others, like twitter or truthsocial.com have still issues .... ^^

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

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