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

    Multiple Openvpn sites which all need to see each other

    Scheduled Pinned Locked Moved OpenVPN
    19 Posts 6 Posters 10.5k 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.
    • T
      thetallkid
      last edited by

      I have an Openvpn server and 2 sites, all with different subnets. I defined routes from client 1 to client 2 and client 2 to client 1. However, both clients can only see the server but not connect to each other.

      I've experimented with different settings, searched the forums, but haven't been able to solve this issue.

      Can Openvpn be set up in a mesh, where all sites can access the subnets of all the other sites? If so, how do I do it?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Yes, that works fine, provided each node has the proper routes, and the OpenVPN firewall rules allow the traffic through.

        Also you'd need to make sure there aren't any conflicting subnets of course.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • T
          thetallkid
          last edited by

          Subnets are 10.0.41.1, 10.0.60.1, 10.80.5.1.
          I used the wizard to get openvpn started since it does it all neatly, including the default firewall rule.

          Each of the clients can connect to the main openvpn server. They just can't talk to each other.

          Here is an example of the routes setup in the Advanced Config box and Openvpn firewall rules

          ![Screen Shot 2012-12-24 at 9.34.08 AM.jpg](/public/imported_attachments/1/Screen Shot 2012-12-24 at 9.34.08 AM.jpg)
          ![Screen Shot 2012-12-24 at 9.34.08 AM.jpg_thumb](/public/imported_attachments/1/Screen Shot 2012-12-24 at 9.34.08 AM.jpg_thumb)
          ![Screen Shot 2012-12-24 at 9.45.06 AM.jpg](/public/imported_attachments/1/Screen Shot 2012-12-24 at 9.45.06 AM.jpg)
          ![Screen Shot 2012-12-24 at 9.45.06 AM.jpg_thumb](/public/imported_attachments/1/Screen Shot 2012-12-24 at 9.45.06 AM.jpg_thumb)

          1 Reply Last reply Reply Quote 0
          • B
            bardelot
            last edited by

            The clients have to be told about the subnets for which the traffic should be directed through the OpenVPN tunnel

            Add the following in the advanced config:
            push "route 10.0.42.0 255.255.255.0";
            push "route 10.0.60.0 255.255.255.0";

            and create two client specific overrides with the following advanced config:

            1. client with 10.0.42.0 subnet
              iroute 10.0.42.0 255.255.255.0;

            2. client with 10.0.60.0 subnet
              iroute 10.0.60.0 255.255.255.0;

            1 Reply Last reply Reply Quote 0
            • T
              thetallkid
              last edited by

              iroutes in the client overrides didn't work. The two sites can still only connect to the main openvpn server but still can't connect to each other's subnets.

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by

                Maybe you also need to check the box for:
                Inter-client communication - Allow communication between clients connected to this server
                that will put the client-to-client directive into the OpenVPN server conf file.
                Also, I guess there was a typo above:

                Subnets are 10.0.41.1, 10.0.60.1, 10.80.5.1.

                But in the examples is "42" rather than "41". Just double-check which is the correct subnet address.
                Also, the unstated assumption is that 10.80.5.1 is the server, and the others are the 2 clients.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • B
                  bardelot
                  last edited by

                  @thetallkid:

                  iroutes in the client overrides didn't work. The two sites can still only connect to the main openvpn server but still can't connect to each other's subnets.

                  You need to verify the routing tables on the server and the clients.

                  Also just to make it clear because you only mentioned the iroutes, the advanced config for the server should be:
                  route 10.0.42.0 255.255.255.0;
                  route 10.0.60.0 255.255.255.0;
                  push "route 10.0.42.0 255.255.255.0";
                  push "route 10.0.60.0 255.255.255.0";

                  1 Reply Last reply Reply Quote 0
                  • T
                    thetallkid
                    last edited by

                    Update on the subnets. I changed them to make it easier to keep track of. Also I'm using 2.1 BETA1 at all 3 locations.
                    Couldn't find the option that Phil mentioned in his post: Inter-client communication - Allow communication between clients connected to this server

                    Server/Central location subnet - 10.0.41.1
                    Tunnel Network - 10.0.44.1

                    Client Site 1 - 10.80.5.1 (Client Settings โ€“> Advanced --> iroute 10.80.5.0 255.255.255.0;)

                    Client Site 2 - 10.80.7.1 (Client Settings --> Advanced --> iroute 10.80.7.0 255.255.255.0;)

                    Attached is the Advanced Config for the Server/Central location with the push settings as suggested by bardelot.
                    Still no go.

                    ![Screen Shot 2012-12-27 at 8.20.38 AM.jpg](/public/imported_attachments/1/Screen Shot 2012-12-27 at 8.20.38 AM.jpg)
                    ![Screen Shot 2012-12-27 at 8.20.38 AM.jpg_thumb](/public/imported_attachments/1/Screen Shot 2012-12-27 at 8.20.38 AM.jpg_thumb)

                    1 Reply Last reply Reply Quote 0
                    • B
                      bardelot
                      last edited by

                      You do not need the 'push "route 10.0.41.0 255.255.255.0"' option when filling out the settings as attached. I also marked the 'Inter-client communication setting' (not available with Peer to Peer mode).

                      tunnel_settings.png
                      tunnel_settings.png_thumb

                      1 Reply Last reply Reply Quote 0
                      • T
                        thetallkid
                        last edited by

                        Does the Server Mode need to be changed from Peer to Peer (Shared Key), to something else for this to work?

                        1 Reply Last reply Reply Quote 0
                        • B
                          bardelot
                          last edited by

                          Peer to Peer mode only allows communication between the server and a client. If you need communication between the clients, the easiest option is to use 'Remote Access' mode. For the 'Client Specific Overrides' you want to use SSL/TLS as well.

                          1 Reply Last reply Reply Quote 0
                          • T
                            thetallkid
                            last edited by

                            Setup a new server in Remote Access (SSL/TLS) mode. Followed the instructions in the previous posts and did the two clients. Status showed up for server and clients. However, no traffic flowed in any direction.

                            Been staring at this for awhile, so taking a break.

                            ![Remote Desktop Picture.jpg](/public/imported_attachments/1/Remote Desktop Picture.jpg)
                            ![Remote Desktop Picture.jpg_thumb](/public/imported_attachments/1/Remote Desktop Picture.jpg_thumb)
                            ![Screen Shot 2012-12-27 at 9.01.29 PM.jpg](/public/imported_attachments/1/Screen Shot 2012-12-27 at 9.01.29 PM.jpg)
                            ![Screen Shot 2012-12-27 at 9.01.29 PM.jpg_thumb](/public/imported_attachments/1/Screen Shot 2012-12-27 at 9.01.29 PM.jpg_thumb)

                            1 Reply Last reply Reply Quote 0
                            • B
                              bardelot
                              last edited by

                              Tick the "Provide a virtual adapter IP address to clients (see Tunnel Network)" checkbox. You should not enter the tunnel network in the client overrides if it is the same network.

                              1 Reply Last reply Reply Quote 0
                              • T
                                thetallkid
                                last edited by

                                I'll give the Tinc package a try,because this isn't working for me as a vpn mesh. At some point I will figure out what the correct settings are.

                                1 Reply Last reply Reply Quote 0
                                • jimpJ
                                  jimp Rebel Alliance Developer Netgate
                                  last edited by

                                  OpenVPN works fine for that, if you get all of the routes and such right.

                                  Here is a multi-site howto for SSL/TLS

                                  http://doc.pfsense.org/index.php/OpenVPN_Site-to-Site_PKI_%28SSL%29

                                  Or you could do it with shared key tunnels you'd just need one server instance per side instead of one common server instance.

                                  http://doc.pfsense.org/index.php/OpenVPN_Site-to-Site_%28Shared_Key,_2.0%29

                                  If the traffic doesn't go the way you want, it's down to a few things:

                                  • routes (AND iroutes if you use ssl/tls)
                                  • firewall rules
                                  • whether or not the VPNs actually connect and are up
                                  • whether or not you have policy routing rules forcing the LAN traffic out a WAN bypassing the VPN
                                  • If you used IPsec previously, make sure there are no overlapping p2's (and if you removed them, also check the SPD tab on IPsec status to make sure they really are gone)

                                  Checking the routing table, traceroute, and packet captures should lead to a fairly straightforward answer about where the traffic is or isn't going.

                                  Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                                  Need help fast? Netgate Global Support!

                                  Do not Chat/PM for help!

                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    kevotman
                                    last edited by

                                    Sorry to bump a dead topic, but I've been running into this exact same issue!

                                    I'm able to get any clients connecting to the main site via site-to-site, but I'm unable to have the clients see each other. I've tried to switch to Remote Access (SSL) but I'm never able to pass traffic after that change. When I tracert to the main site it stops at the client firewall.

                                    Also, does anybody know if you need to reboot after any of these changes? I only ask because I'm unable to restart the main site's firewall very often as it links 15 sites to the head office via ipsec. We just need to get off ipsec and onto OpenVPN, we also want to be able to connect to any of the external sites while we're at one of them.

                                    Please help me out, as this is driving me insane!

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mikeisfly
                                      last edited by

                                      I would try restarting the OpenVPN service to the corresponding site instead of restarting PfSense. Also make sure you create the rules allowing traffic to pass to each site. I ran into that mistake thinking that the rules where auto generated. They are only auto generated when you use the wizard.

                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        kevotman
                                        last edited by

                                        Shouldn't I just have a rule accepting all OpenVPN traffic on every client + the host, and also a rule accepting the port on the WAN?

                                        After restarting the openvpn service I'm passing traffic. Now I just need to get client to client working! :)

                                        So, I'm unable to get client to client working. I have the inter-client box checked, but they're unable to get anywhere. I've tried with push settings and without. Is there anything I'm missing?

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          kevotman
                                          last edited by

                                          Good news. It's working! It's just our one site that's not connecting properly, and of course that was the one I was using for testing.

                                          Great guides posted by everybody.

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