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

    Site2Site OpenVPN only works with /30 IPv4 Tunnel Network?

    Scheduled Pinned Locked Moved OpenVPN
    18 Posts 4 Posters 1.6k 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.
    • U
      Upper Deck
      last edited by Upper Deck

      Hi there,

      I'm working on an OpenVPN-based Site-to-Site VPN.

      Something very weird happened. If I set my IPv4 Tunnel Network to be 10.10.10.0/30, the server site and client site access each other normally..
      If I set IPv4 Tunnel Network to be 10.10.10.0/24, only the virtual address of tunnels can be pinged. All sites cannot reach each other.

      There is no valuable information in the log. With IPv4 Tunnel Network /24, there is no Site-to-Site traffic and no error/warning messages in the log. With /30, traffic is normal between all sites, but a warning keeps appearing:

      WARNING: 'ifconfig' is present in local config but missing in remote config, local='ifconfig 10.10.10.1 10.10.10.2'
      

      /30 works fine but it cannot hold enough client sites. How can I get Site-to-Site VPN to work properly with /24?

      Thak you.

      UD

      N bingo600B 2 Replies Last reply Reply Quote 0
      • N
        netblues @Upper Deck
        last edited by

        @upper-deck Well, this isn't certainly the issue
        tunnel network is normaly a /24.
        What do you have at client settings/ topology?
        Net 30 or subnet?

        What are you using on the other end?

        U 1 Reply Last reply Reply Quote 0
        • U
          Upper Deck @netblues
          last edited by

          Hi @netblues,

          I set it up following this guide strictly: OpenVPN Site-to-Site Configuration Example with SSL/TLS.

          All settings:
          Untitled-2.png

          N 1 Reply Last reply Reply Quote 0
          • N
            netblues @Upper Deck
            last edited by

            @upper-deck What are you using on the other end?
            How many devices are you connecting?

            U 1 Reply Last reply Reply Quote 0
            • U
              Upper Deck @netblues
              last edited by

              Hi @netblues

              Currently I only have one working client set up. The goal is to setup 3 site-to-site clients.

              The first client settings:
              Untitled-1.png

              Thank you.

              UD

              1 Reply Last reply Reply Quote 0
              • N
                netblues
                last edited by

                Try removing tunnel network on all clients

                Server is responsible to assinging ip's.
                You create ip conflicts since all clients are assigning the same ip to their side.

                U 1 Reply Last reply Reply Quote 0
                • U
                  Upper Deck @netblues
                  last edited by

                  Hi @netblues,

                  Once the tunnel network removed from the client configuration, the client connected normally but lost its virtual address.

                  Untitled-1.png

                  1 Reply Last reply Reply Quote 0
                  • N
                    netblues
                    last edited by

                    And you have a normal /24 at the server tunnel network?

                    Have you restarted openvpn service both ends after changes?

                    Have you assigned an interface to the vpn server/client for better monitoring/management?

                    U 1 Reply Last reply Reply Quote 0
                    • U
                      Upper Deck @netblues
                      last edited by

                      @netblues said in Site2Site OpenVPN only works with /30 IPv4 Tunnel Network?:

                      And you have a normal /24 at the server tunnel network?

                      Yes. But using /24 still causes all sites to not be able to access each other.

                      Have you restarted openvpn service both ends after changes?

                      Thanks for reminding. The virtual address is normal after restarting.

                      Have you assigned an interface to the vpn server/client for better monitoring/management?

                      Yes. Everything looks ok.
                      Untitled-2.png

                      1 Reply Last reply Reply Quote 0
                      • bingo600B
                        bingo600 @Upper Deck
                        last edited by bingo600

                        @upper-deck
                        Why not just create a /30 server for each site ?

                        I have 6 x Site to site (S2S) - /30 OVPN servers , and they give me no grief, and since they're "Point to point", all info can be given directly in the definitions.

                        I have no experience with /24 S2S , just use /24 for "Client Connects .. "dialin"

                        But since your desired "/24 Server" is a "one to many" i would expect you have to use Client Side Overrides (CSO) , in order to define the Site specific info , like routes etc ....

                        I absolutely prefer /30 , or more correctly Point-To-Point for (S2S).
                        And i "think" i get the advantage of having multiple servers , where each can run simultaneously on an available "CPU... Thread".
                        I have an idea (hope) that this would improve the "OpenVPN" is "locked to one Core" performance. Since several servers, each can use an available "Core" if needed.

                        Edit:
                        I have i5's or i3's with 4 "threads" , and 8GB Ram, so "multi OVPN server" resources is not an issue for me.

                        /Bingo

                        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                        pfSense+ 23.05.1 (ZFS)

                        QOTOM-Q355G4 Quad Lan.
                        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                        N 1 Reply Last reply Reply Quote 0
                        • N
                          netblues @bingo600
                          last edited by

                          @bingo600 What you suggest is valid, however doesn't correct the mis- configuration issue of the op.

                          And certainly having 3 servers is more difficult to administer than one.

                          On the performance side, I would ditch openvpn altogether and opt for wireguard.

                          bingo600B U 2 Replies Last reply Reply Quote 0
                          • bingo600B
                            bingo600 @netblues
                            last edited by bingo600

                            @netblues said in Site2Site OpenVPN only works with /30 IPv4 Tunnel Network?:

                            @bingo600 What you suggest is valid, however doesn't correct the mis- configuration issue of the op.

                            I just commented on the /30 vs /24 S2S setup.

                            And certainly having 3 servers is more difficult to administer than one.

                            IMHO that's not correct, since you don't have to do the CSO's on a P2P /30.
                            I would say they're comparable in complexity.

                            On the performance side, I would ditch openvpn altogether and opt for wireguard.

                            I don't trust wireguard (yet) ...
                            OpenVPN is proved "easy and stable", and for my ISP BW 300Mb/s i have no problem "filling the line".

                            For squeezing the last drop out i'd go IPSEC.

                            /Bingo

                            If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                            pfSense+ 23.05.1 (ZFS)

                            QOTOM-Q355G4 Quad Lan.
                            CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                            LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                            1 Reply Last reply Reply Quote 0
                            • U
                              Upper Deck @netblues
                              last edited by

                              @netblues

                              I did some more tests. Under the premise of keeping other settings all the same, if the IPv4 Tunnel Network goes to /30, both the server and client networks are normal; as long as the IPv4 Tunnel Network is set to /24, the server and client will not be able to access each other. Except for the IPv4 Tunnel Network /24 /30 settings of the server-side and client-side, other configurations remain the same.

                              Also, I found a very interesting fact. When /30 is set, the Status page of OpenVPN displays server information. When /24 is set, the Status page displays the client connection information. Perhaps when the IPv4 Tunnel Network is set to /24, pfSense also thinks that the server-client VPN mode is used?

                              Untitled-1.png

                              bingo600B 1 Reply Last reply Reply Quote 0
                              • bingo600B
                                bingo600 @Upper Deck
                                last edited by

                                @upper-deck said in Site2Site OpenVPN only works with /30 IPv4 Tunnel Network?:

                                Also, I found a very interesting fact. When /30 is set, the Status page of OpenVPN displays server information. When /24 is set, the Status page displays the client connection information. Perhaps when the IPv4 Tunnel Network is set to /24, pfSense also thinks that the server-client VPN mode is used?

                                Easy explained ...
                                When /30 is used pfSense knows it's a Point-to-Point.
                                And uses the info directly from the Server/Client definition.

                                /Bingo

                                If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                pfSense+ 23.05.1 (ZFS)

                                QOTOM-Q355G4 Quad Lan.
                                CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                1 Reply Last reply Reply Quote 0
                                • U
                                  Upper Deck
                                  last edited by

                                  Still can't figure out why the /24 tunnel network doesn't work.

                                  N 1 Reply Last reply Reply Quote 0
                                  • N
                                    netblues @Upper Deck
                                    last edited by

                                    @upper-deck I thought it did from what you said

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by stephenw10

                                      It's because when you set the server to use /24 topology you need to add client specific overrides for each client site with the remote subnets set. Doing so adds iroutes in OpenVPN so the daemon knows which subnets are at which clients. Note the 'Routing Table' button in the above screenshot for /24. That will display the iroutes and they must exist.
                                      https://docs.netgate.com/pfsense/en/latest/recipes/openvpn-s2s-tls.html#create-client-specific-overrides

                                      When you use /30 there can be only one client so the daemon assume all remote subnets are there.

                                      Steve

                                      U 1 Reply Last reply Reply Quote 2
                                      • stephenw10S stephenw10 moved this topic from General pfSense Questions on
                                      • U
                                        Upper Deck @stephenw10
                                        last edited by

                                        @stephenw10

                                        Orz

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