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

    Local created oversized IPv6 UDP packets get dropped by pfsense

    IPv6
    4
    13
    1.4k
    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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by

      So if pfsense is the source and its not fragmenting - what is it doing... Putting data larger than the MTU on the wire? Is it not adding the correct frag header?

      How exactly did you test that pfsense is not doing what its suppose to be doing?

      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.7.2, 24.11

      L 1 Reply Last reply Reply Quote 0
      • sigiS
        sigi @JKnott
        last edited by

        @jknott said in Local created oversized IPv6 UDP packets get dropped by pfsense:

        I believe he said pfSense was the source.

        Not sure about this. Because for me in a VPN always the client is initiating the connection. Therefore the VPN Concentrator should never answer with packets/fragments exceeding size of the existing back-channel. But if MS XP is taking part, there can anything happen ;-)

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

          @sigi said in Local created oversized IPv6 UDP packets get dropped by pfsense:

          Not sure about this. Because for me in a VPN always the client is initiating the connection.

          There are 2 packets here, the one coming from the source and the one created by OpenVPN, which contains the source data. Which one are we talking about? This is where Wireshark or Packet Capture come in handy. Until we know which, it's hard to tell where the problem is.

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

          sigiS 1 Reply Last reply Reply Quote 0
          • L
            lst_hoe
            last edited by

            The use case is IPSEC VPN with pfsense (Strongswan) as endpoint and Windows clients. The problem is at the key exchange with IKEv2 which is UDP by design. The client initiate the connection and the endpoint need to authenticate itself. This is done in our case with certificates (EAP-TLS). With this the response the pfsense is supposed to send is around 2000 Bytes which will be send as one UDP datagram if the clients/server does not support IKEv2 Fragmentation which is only available with Windows 10 1803 and later. So Strongswan create a UDP datagram with more bytes than the MTU is set and therefore it needs to be put on the wire as IPv6 UDP Fragments. This does not happen, a dump on the WAN interface, where Strongswan is bind to shows that this special packets are simply missing. The IPv4 case does work by the way, in this case two UDP fragmnets go out to the client and the key exchange is done.

            1 Reply Last reply Reply Quote 0
            • sigiS
              sigi
              last edited by

              According to my experience with BIND i would experiment with following SSW settings:
              charon.plugins.kernel-netlink.mss 0 MSS to set on installed routes, 0 to disable.
              charon.plugins.kernel-netlink.mtu 0 MTU to set on installed routes, 0 to disable.

              1 Reply Last reply Reply Quote 0
              • sigiS
                sigi @JKnott
                last edited by

                @jknott said in Local created oversized IPv6 UDP packets get dropped by pfsense:

                There are 2 packets here, the one coming from the source and the one created by OpenVPN

                Agree. But in my opinion all packets from OpenVPN are answers inside the session initated by the client. There is normally no session initiated from the server side. MTU/MSS happens per session (AFAIK)

                1 Reply Last reply Reply Quote 0
                • L
                  lst_hoe
                  last edited by

                  To my knowledge MSS is TCP only, not UDP. The MTU will not help if you can't set it higher than the biggest datagram which must be send in one piece. For the IKE handshake the application must send the authentication in one IP packet if IKE fragmentation at application layer is not supported on both ends. So if you are using EAP-TLS with more secure keysizes you get UDP fragments on the wire. As said it is working as expected with IPv4, only with IPv6 pfsense does not send UDP fragments over the wire.

                  1 Reply Last reply Reply Quote 0
                  • L
                    lst_hoe @johnpoz
                    last edited by

                    @johnpoz said in Local created oversized IPv6 UDP packets get dropped by pfsense:

                    So if pfsense is the source and its not fragmenting - what is it doing... Putting data larger than the MTU on the wire? Is it not adding the correct frag header?

                    How exactly did you test that pfsense is not doing what its suppose to be doing?

                    According to the capture done at the WAN interface the packet simply does not happen. The only trace is in the VPN/Strongswan log and the knowledge that the packet must exist to finish the IKE key exchange and as said the expected behaviour and capture in case of IPv4.

                    1 Reply Last reply Reply Quote 0
                    • sigiS
                      sigi
                      last edited by

                      netstat -s -p ip6 give some insights to fragment handling.. Anything strange there?

                      1 Reply Last reply Reply Quote 0
                      • L
                        lst_hoe
                        last edited by

                        It looks like FreeBSD is able to create IPv6 fragments (45 fragments created), but i have no idea where they are going to in case of the WAN interface.

                        netstat -s -p ip6
                        ip6:
                        402474348 total packets received
                        0 with size smaller than minimum
                        0 with data size < data length
                        0 with bad options
                        0 with incorrect version number
                        0 fragments received
                        0 fragments dropped (dup or out of space)
                        0 fragments dropped after timeout
                        0 fragments that exceeded limit
                        0 packets reassembled ok
                        614833 packets for this host
                        401766863 packets forwarded
                        2 packets not forwardable
                        45 redirects sent
                        746064 packets sent from this host
                        0 packets sent with fabricated ip header
                        0 output packets dropped due to no bufs, etc.
                        0 output packets discarded due to no route
                        0 output datagrams fragmented
                        45 fragments created
                        0 datagrams that can't be fragmented
                        0 packets that violated scope rules
                        0 multicast packets which we don't join

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