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

Remote access openvpn server can't access peer to peer openvpn servers

Scheduled Pinned Locked Moved OpenVPN
11 Posts 2 Posters 450 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.
  • S
    Shuldyk Andrii
    last edited by Jun 20, 2024, 1:56 PM

    Hi everyone!
    Firstly, I want to say that I'm complete noob with pfsense, so maybe my problem is easy to solve, but I cannot understand what to do for a few days.
    I have this problem: I need to connect 5 remote offices and remote user to the main office. I need to be able to manage any server using my phone.
    I've already created 2 openvpn servers. First server connects main server and remote user using "Remote Access ( SSL/TLS + User Auth )" mode. Tunnel network: 10.0.8.0/24. Second server connects five remote servers to the main one using "Peer to Peer ( SSL/TLS )" mode. All of them are running pfsense. Their IPs:
    10.35.32.1 - main server
    10.35.36.1
    10.35.37.1
    10.35.38.1
    10.35.39.1
    10.35.40.1

    I have already connected these servers with one another using ipsec, but I need to use openvpn.
    problem.png

    V 1 Reply Last reply Jun 21, 2024, 10:20 AM Reply Quote 0
    • V
      viragomann @Shuldyk Andrii
      last edited by Jun 21, 2024, 10:20 AM

      @Shuldyk-Andrii said in Remote access openvpn server can't access peer to peer openvpn servers:

      Second server connects five remote servers to the main one using "Peer to Peer ( SSL/TLS )" mode.

      Which tunnel network?

      Did you configure CSO for each? Is so, can you show them, please?

      Their IPs:
      10.35.32.1 - main server
      10.35.36.1
      10.35.37.1
      10.35.38.1
      10.35.39.1
      10.35.40.1

      Are these the virtual VPN IPs or local ones?

      Can you show all VPN server and client settings, please?

      S 1 Reply Last reply Jun 21, 2024, 11:00 AM Reply Quote 0
      • S
        Shuldyk Andrii @viragomann
        last edited by Shuldyk Andrii Jun 21, 2024, 11:17 AM Jun 21, 2024, 11:00 AM

        @viragomann
        Thank you!

        Which tunnel network?

        The peer to peer tunnel network is 10.35.101.0/24.

        Did you configure CSO for each? Is so, can you show them, please?

        Yes, I have configured cso for all of 5 remote servers. Here is one of them(everyone is configured in the same way):
        39323c60-0e99-4ed2-9bde-3df8452d5994-image.png
        c039d2a0-08c9-4348-bc3c-4af03ce940b9-image.png

        Are these the virtual VPN IPs or local ones?

        They are local ones

        Can you show all VPN server and client settings, please?

        Of course, here is remote access server settings:
        12576cee-02bf-4c9a-9dab-a6a60c90209b-image.png
        4fa6d9eb-e7d0-4bfe-909d-7a898d3d2d85-image.png
        ee2b9eaa-2a54-4369-8073-f880509d8818-image.png
        840af5d9-e45d-4b1d-b947-21c604d7669b-image.png
        39a83e9b-0a26-44ea-a89a-bbcd7e17bca9-image.png
        a725bae0-2564-4eb2-82ec-4e389fb3a7c8-image.png

        And the peer to peer one:
        f858f536-daae-4779-9747-e5b1c5a7c11d-image.png
        0b055978-9e6e-4c2b-8acc-37e3207d9f15-image.png
        473555a4-66bb-46c4-a83e-ba879010892f-image.png
        5fda94df-0107-4cc4-8b12-80fa8b748e2b-image.png
        425737d2-4056-4887-96f9-bd8daacda04b-image.png

        V 1 Reply Last reply Jun 21, 2024, 11:29 AM Reply Quote 0
        • V
          viragomann @Shuldyk Andrii
          last edited by Jun 21, 2024, 11:29 AM

          @Shuldyk-Andrii
          Should work so far. But on the 10.35.36.1 you have also enter the remote networks for proper routing.
          If you only want it to communicate with the main office and the access server clients put this into the "Remote networks" box:

          10.35.32.0/24,10.0.8.0/24
          

          If you also want to reach the other branches you need to add their local networks as well.

          If it still doesn't work, check the routing tables of the remote access client and the pfSense C.

          S 2 Replies Last reply Jun 21, 2024, 12:13 PM Reply Quote 0
          • S
            Shuldyk Andrii @viragomann
            last edited by Jun 21, 2024, 12:13 PM

            @viragomann said in Remote access openvpn server can't access peer to peer openvpn servers:

            10.35.32.0/24,10.0.8.0/24

            Unfortunately, it didn't help.

            If it still doesn't work, check the routing tables of the remote access client and the pfSense C.

            I've already checked routing tables and think it's okay, here how it looks in C:
            e11e6d1b-f2f0-42f3-a260-97a535838736-image.png
            1b6a0844-6ba6-49c6-be65-0f0488e91381-image.png

            V 1 Reply Last reply Jun 21, 2024, 12:23 PM Reply Quote 0
            • S
              Shuldyk Andrii @viragomann
              last edited by Jun 21, 2024, 12:18 PM

              @viragomann
              I am actually trying to use this code now in the remote access server:

              push "route 10.35.36.0 255.255.255.0"route add -net 10.35.36.0/24 gw 10.35.101.6
              push "route 10.35.37.0 255.255.255.0"route add -net 10.35.37.0/24 gw 10.35.101.7
              push "route 10.35.38.0 255.255.255.0"route add -net 10.35.38.0/24 gw 10.35.101.8
              push "route 10.35.39.0 255.255.255.0"route add -net 10.35.39.0/24 gw 10.35.101.9
              push "route 10.35.40.0 255.255.255.0"route add -net 10.35.40.0/24 gw 10.35.101.10
              

              But I have next error:
              c99ef95e-8c29-4a73-84ba-68948ac3a696-image.png

              My chief system administrator said he had already solved this problem a few years ago, but he doesn't remember exactly how. The only thing he remembers that he has used something like this code.

              Maybe you can know what can be done to this?

              1 Reply Last reply Reply Quote 0
              • V
                viragomann @Shuldyk Andrii
                last edited by Jun 21, 2024, 12:23 PM

                @Shuldyk-Andrii
                The routes of all involved devices can impact the routing. So C, main and access client.
                And the point of interest is not a single route only, but the whole IPv4 routing table. There may be other routes interfere with the needed ones.

                I am actually trying to use this code now in the remote access server:

                push "route 10.35.36.0 255.255.255.0"route add -net 10.35.36.0/24 gw 10.35.101.6
                push "route 10.35.37.0 255.255.255.0"route add -net 10.35.37.0/24 gw 10.35.101.7

                These command have wrong syntax and you should not use them anyway. Instead the pfSense GZU provide the "Local Networks" and "Remote Networks" boxes to set the routing.

                S 1 Reply Last reply Jun 24, 2024, 6:44 AM Reply Quote 0
                • S
                  Shuldyk Andrii @viragomann
                  last edited by Jun 24, 2024, 6:44 AM

                  @viragomann
                  So, routing table of C:
                  7df4ee86-a148-4e32-a0e2-ea0263b445ce-image.png

                  Main server's table:
                  a39e1dd1-2412-4a00-be95-e260af8e22d1-image.png

                  And access client:
                  fadd6ede-b90f-4c46-953d-dbc4eb1bf7b0-image.png

                  V 1 Reply Last reply Jun 24, 2024, 7:30 AM Reply Quote 0
                  • V
                    viragomann @Shuldyk Andrii
                    last edited by Jun 24, 2024, 7:30 AM

                    @Shuldyk-Andrii
                    So at C there is a static route in place, pointing the access server tunnel pool 10.0.8.0/24 to the default gateway for whatever reason. Obviously this route have precedence over the OpenVPN route.

                    8cbbc19f-1b7f-4f6e-8f91-887dbb4265bf-image.png

                    I don't think, that this route is really needed, since the default gateway has a public IP address and might not route private subnets anyway.

                    S 1 Reply Last reply Jun 24, 2024, 10:51 AM Reply Quote 0
                    • S
                      Shuldyk Andrii @viragomann
                      last edited by Jun 24, 2024, 10:51 AM

                      @viragomann
                      Okay, it works when I connect using remote server's virtual vpn ip(e.g. 10.35.101.5), but it doesn't work using local one(e.g. 10.35.36.1). Can it be made in the way I could use local IPs? Or I should just give them static virtual IPs?

                      V 1 Reply Last reply Jun 24, 2024, 11:23 AM Reply Quote 0
                      • V
                        viragomann @Shuldyk Andrii
                        last edited by Jun 24, 2024, 11:23 AM

                        @Shuldyk-Andrii
                        Ah ya, also your client doesn't have proper routes.

                        Did you enter the local networks of C - G into the "Local Networks" box of the access server settings?
                        You can combine all your subnets by entering 10.35.32.0/20. So the server will push the route for 10.35.32.0 - 10.35.47.255, which include local network of A as well.

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