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

IPv6 Policy Routing and OpenVPN

Scheduled Pinned Locked Moved IPv6
18 Posts 3 Posters 1.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.
  • C
    Cathal1201
    last edited by Cathal1201 Apr 7, 2020, 4:41 PM Apr 7, 2020, 2:49 PM

    Hello Everyone,

    I have a PFSENSE 2.4.5 with three internal interfaces (LAN, GAME and HOUSE) and a WAN. Everyone receives IPv6 from the ISP via TRACK Interface. Each interface has a different IPv6 Prefix ID (1, 50, 100) and I have configured DHCPv6 to share addresses from :: 8: 20 to :: 8: 2000 as well as set Router Advertisements to Managed so that it is always handled by DHCPv6 - so no stateless autoconfig.

    It works really well and I can route between interfaces and out to the internet without any problems.

    NOW here comes problems - I made an OPENVPN tunnel against https://www.OVPN.com where I got the openvpn
    tunnel up and running. That interface is called OPT1. I received an IPv6 address on the interface. In addition, I also have an IPv4 tunnel address on OPT1.
    I have created a Route Policy that allows HOUSE interface to route via OPT1_VPNV6. The same thing I've done on IPv4 and it works! BUT it does not work on IPv6.

    I can't route via OPT1_VPNV6 - it seems I made a config error somewhere, but I simply can't figure out where!

    Is there anything I've overlooked? Why doesn't Policy Routing work? Do I need to mess with NDP?. I already think IPv6 is difficult. I think I've looked through all the logs but can't figure out why it doesn't work. The ISP says it "should" work as others have similar setups.

    Please help!

    BR

    P 1 Reply Last reply Apr 7, 2020, 3:41 PM Reply Quote 0
    • P
      pfadmin @Cathal1201
      last edited by Apr 7, 2020, 3:41 PM

      @Cathal1201 said in IPv6 Policy Routing and OpenVPN:

      v6.

      The prefix ID is hexadecimal, so 100 is not allowed for a /56 (I guess you get a /56) , only 0 to ff is allowed

      pfadmin

      C 1 Reply Last reply Apr 7, 2020, 4:29 PM Reply Quote 0
      • C
        Cathal1201 @pfadmin
        last edited by Cathal1201 Apr 7, 2020, 4:30 PM Apr 7, 2020, 4:29 PM

        @pfadmin

        Thanks for your reply, but I receive a / 64 from my ISP on each "tracked" interface, so the prefix ID can be 100, right?

        hexadecimal from 0 to ffff

        1 Reply Last reply Reply Quote 0
        • P
          pfadmin
          last edited by Apr 7, 2020, 4:42 PM

          No. It depends on what prefix you receive. Is it /48, /56 or /60. So with /56 you can choose between 00 and ff and then you have 256 subnets with one /64 for each LAN Interface.

          C 1 Reply Last reply Apr 7, 2020, 5:57 PM Reply Quote 0
          • C
            Cathal1201 @pfadmin
            last edited by Apr 7, 2020, 5:57 PM

            @pfadmin

            How do I check what prefix I receive? I'm not sure.

            1 Reply Last reply Reply Quote 0
            • C
              Cathal1201
              last edited by Apr 7, 2020, 6:08 PM

              @pfadmin said in IPv6 Policy Routing and OpenVPN:

              /48, /56 or /60

              I just read that I receive a /48 net on my ISP's website. Just info.

              J 1 Reply Last reply Apr 7, 2020, 7:07 PM Reply Quote 0
              • J
                JKnott @Cathal1201
                last edited by Apr 7, 2020, 7:07 PM

                @Cathal1201 said in IPv6 Policy Routing and OpenVPN:

                I just read that I receive a /48 net on my ISP's website. Just info.

                Then you'll only get 65536 /64s. 😉

                Your prefix ID range should be 0 - ffff.

                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...

                C 1 Reply Last reply Apr 7, 2020, 7:11 PM Reply Quote 0
                • P
                  pfadmin
                  last edited by Apr 7, 2020, 7:10 PM

                  @Cathal1201 said in IPv6 Policy Routing and OpenVPN:

                  I just read that I receive a /48 net on my ISP's website. Just info.

                  Then you should hint a /48 and then 100 is allowed. You can do paket sniffing on WAN and then reconnect. Somewhere you should find the prefix in the dhcp6 answer from ISP.

                  J C 2 Replies Last reply Apr 7, 2020, 7:20 PM Reply Quote 0
                  • C
                    Cathal1201 @JKnott
                    last edited by Apr 7, 2020, 7:11 PM

                    @JKnott said in IPv6 Policy Routing and OpenVPN:

                    Then you'll only get 65536 /64s. 😉

                    Only :-)

                    Your prefix ID range should be 0 - ffff.

                    I have changed my prefix to LAN (1), GAME (2) and HOUSE (ff) - but no effect on the policy routing issue. :-(

                    1 Reply Last reply Reply Quote 0
                    • J
                      JKnott @pfadmin
                      last edited by Apr 7, 2020, 7:20 PM

                      @pfadmin said in IPv6 Policy Routing and OpenVPN:

                      Then you should hint a /48 and then 100 is allowed. You can do paket sniffing on WAN and then reconnect. Somewhere you should find the prefix in the dhcp6 answer from ISP.

                      Use Packet Capture and filter on port 546 or 547. There will be some XID lines and you can dig through them with Wireshark.

                      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...

                      C 1 Reply Last reply Apr 7, 2020, 7:59 PM Reply Quote 0
                      • C
                        Cathal1201 @pfadmin
                        last edited by Apr 7, 2020, 7:20 PM

                        @pfadmin said in IPv6 Policy Routing and OpenVPN:

                        Then you should hint a /48 and then 100 is allowed. You can do paket sniffing on WAN and then reconnect. Somewhere you should find the prefix in the dhcp6 answer from ISP.

                        I'm "hinting" my ISP for /48 and get all my IP subnets assigned to the LAN, GAME and HOUSE without any issues. They get a /64 each. That part works just fine. All my test on various IPv6 testsites show that it works.

                        Why would this be an issue when it comes to my policy routing problem to OpenVPN interface? The OpenVPN (OPT1) get an /80 address. Does that matter?

                        I still have the same problem....

                        1 Reply Last reply Reply Quote 0
                        • C
                          Cathal1201 @JKnott
                          last edited by Apr 7, 2020, 7:59 PM

                          @JKnott said in IPv6 Policy Routing and OpenVPN:

                          546 or 547

                          I guess this is it?

                          85f7c369-58f7-42d4-a5d2-dc9ca4af6495-image.png

                          J 1 Reply Last reply Apr 7, 2020, 8:05 PM Reply Quote 0
                          • J
                            JKnott @Cathal1201
                            last edited by Apr 7, 2020, 8:05 PM

                            @Cathal1201

                            Yep.

                            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...

                            C 1 Reply Last reply Apr 7, 2020, 8:49 PM Reply Quote 0
                            • C
                              Cathal1201 @JKnott
                              last edited by Apr 7, 2020, 8:49 PM

                              @JKnott @pfadmin

                              Two small lines, but the first isn't working

                              0309f67a-09d4-4654-9137-669061780605-image.png

                              A packet trace shows that I have many retransmissions on OPT1

                              59210920-e4a4-4dd5-9259-4b0a5561a820-image.png

                              Does it point to the VPN provider, that I can't route?

                              I'm really at a dead end and way over my abilities ☺

                              J 1 Reply Last reply Apr 7, 2020, 8:53 PM Reply Quote 0
                              • J
                                JKnott @Cathal1201
                                last edited by Apr 7, 2020, 8:53 PM

                                @Cathal1201

                                All my rules have * or default for gateway. I didn't specify anything for any of them.

                                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
                                • P
                                  pfadmin
                                  last edited by Apr 8, 2020, 6:59 AM

                                  So prefix is ok, it came as idea because original you don't tell the prefix length.

                                  So, your rules seams to be ok. I don't know enough about policy routing, but the docs look the same.
                                  I think, you use the wrong IPv6 adress as gateway. It should be a fe80:: link local, because it's IPv6. But this is not that clear to me. Only guess. Look at the Routing Tab, the WAN IPv6 Gateway is fe80:xxxx...

                                  Delete for testing the source and test it. When it works, "HOUSEVLAN net" delivers the wrong IPv6 Net.

                                  C 1 Reply Last reply Apr 8, 2020, 7:03 PM Reply Quote 0
                                  • C
                                    Cathal1201 @pfadmin
                                    last edited by Apr 8, 2020, 7:03 PM

                                    @pfadmin said in IPv6 Policy Routing and OpenVPN:

                                    Interface OPT1
                                    dbf72b8a-2364-4264-802c-9f266c681542-image.png

                                    Gateway from VPN provider
                                    0327b3c6-10b3-44a2-8d48-9b624f10fb5c-image.png

                                    536e8f56-0e03-4ae8-b2a9-768de11d9e53-image.png

                                    I think, you use the wrong IPv6 adress as gateway. It should be a fe80:: link local, because it's IPv6. But this is not that clear to me. Only guess. Look at the Routing Tab, the WAN IPv6 Gateway is fe80:xxxx...

                                    And everything looks good, I don't see why I should use Local-Link address instead?

                                    From my desktop, I can ping the interface OPT1, but not the OPT1_VPNV6 address. That points to at routing problem for sure, but the routing table is confusing to me.

                                    e781b59c-71f6-40a5-bd09-5cfd78300b38-image.png

                                    ba4520fa-43be-4f45-9dec-226908249b2f-image.png
                                    How can I change the gateway address?

                                    Delete for testing the source and test it. When it works, "HOUSEVLAN net" delivers the wrong IPv6 Net.

                                    What do you mean?

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      pfadmin
                                      last edited by pfadmin Apr 8, 2020, 7:37 PM Apr 8, 2020, 7:36 PM

                                      @Cathal1201 said in IPv6 Policy Routing and OpenVPN:

                                      Delete for testing the source and test it. When it works, "HOUSEVLAN net" delivers the wrong IPv6 Net.

                                      What do you mean?

                                      Configure "*" as Source and not "HOUSEVLAN net", test it. If it works, Problem is within "HOUSEVLAN Net". If not, rewind it back to "HOUSEVLAN net".

                                      Link Local are often use to route, but that is not that clear to me as I could explain it to you.

                                      Try this first:
                                      Ok, think about the Gateway. Did it know, where the network of your desktop is? You reach Opt1 because pfsense is your default gateway. You reach OPT1_VPNV6 from OPT1 because its the same network. You reach OPT1_VPNV6 from desktop because your default gateway knows the OPT1_VPNV6 Network, BUT OPT1_VPNV6 don't know about the Network of your desktop. The answer is send to gateways default gateway. This is often the problem with IPv4 and I guess it is IPv6 too.

                                      1 Reply Last reply Reply Quote 0
                                      18 out of 18
                                      • First post
                                        18/18
                                        Last post
                                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                        This community forum collects and processes your personal information.
                                        consent.not_received