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

    OpenVPN Routing Issue

    Scheduled Pinned Locked Moved OpenVPN
    17 Posts 4 Posters 3.2k 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.
    • N
      nirav.solanki
      last edited by

      Hello all,

      We have created OpenVPN server in Pfsense.
      For reference purpose, We have attached screenshot of the infrastructure.

      Scenario:

      Home users get connected to OpenVPN server through OpenVPN client.
      VPN Network : 10.0.8.0/24
      Office LAN Network : 192.168.0.0/24
      Home user network : any network apart from 192.168.0.0/24

      We have a remote site where PfSense is installed in Xenserver as a Virtual Machine and the local LAN is behind this PfSense.
      Remote Local LAN : 192.168.55.0/24

      Now the issue is,
      Through OpenVPN client,we can connect to the local LAN at the office through VPN but we can't connect to the remote site ( 192.168.55.0/24 ).
      ![OpenVPN Tunnel.png](/public/imported_attachments/1/OpenVPN Tunnel.png)
      ![OpenVPN Tunnel.png_thumb](/public/imported_attachments/1/OpenVPN Tunnel.png_thumb)

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

        i have pretty much the same setup. But i use openvpn instead of ipsec to connect the pfsense boxes and it works fine. Is this a possibility for you to switch from ipsec to openvpn ?

        1 Reply Last reply Reply Quote 0
        • N
          nirav.solanki
          last edited by

          IPSec tunnel is for site to site VPN connection for connectivity between our office and remote site.
          So we can connect to our servers with the local IP addresses.
          Home users need to connect through OpenVPN client to our OpenVPN server and then they want to connect to any of the servers that are connected through IPSec tunnel.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            So all your OpenVPN clients appear to the office network as tunnel network addresses on 10.0.8.0/24? Remote Access-style so no remote networks there?

            Did you add an IPsec Phase 2 for 10.0.8.0/24 <==> 192.168.55.0/24 on both sides of the IPsec tunnel?

            If the OpenVPN clients are not set with Redirect Gateway did you add 192.168.55.0/24 to the local networks in the OpenVPN server?

            Do the firewall rules on OpenVPN and IPsec pass the necessary traffic?

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • N
              nirav.solanki
              last edited by

              So all your OpenVPN clients appear to the office network as tunnel network addresses on 10.0.8.0/24? Remote Access-style so no remote networks there?

              -> There are no remote networks there. We just want to connect from our home networks through our local PfSense.

              Did you add an IPsec Phase 2 for 10.0.8.0/24 <==> 192.168.55.0/24 on both sides of the IPsec tunnel?

              -> Have added Phase 2 entry for 10.0.8.0/24 on remote side. Local side I have already added Phase 2 entry for 192.168.55.0/24.

              If the OpenVPN clients are not set with Redirect Gateway did you add 192.168.55.0/24 to the local networks in the OpenVPN server?

              -> Have already added the network 192.168.55.0/24 in the local networks section in OpenVPN server

              Do the firewall rules on OpenVPN and IPsec pass the necessary traffic?

              -> The default rules are set for OpenVPN. No additional firewall rules have been configured as we can easily communicate with remote side from our local LAN ( 192.168.0.0/24 )

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                Then post up because if it is all as you say it would be working.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • N
                  nirav.solanki
                  last edited by

                  Thank you for your reply.

                  Do I need to add routes for VPN networks on the remote side or any extra configuration on OpenVPN server ?

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    As already discussed, there needs to be an IPsec phase 2 on the remote side for the OpenVPN tunnel network (so traffic from LAN to the OpenVPN tunnel network is "interesting" to IPsec) and there needs to be an OpenVPN "Local Network" for the remote side in the OpenVPN server (That adds a route to the client so it knows to route traffic for the remote side through OpenVPN.)

                    And the firewall rules need to pass the traffic.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • N
                      nirav.solanki
                      last edited by

                      Have added Phase 2 entries for VPN network ( 10.0.8.0/24 ) and remote network ( 192.168.55.0/24 ) on both local and remote side.
                      Needed to add manual route for network 192.168.55.0/24 on windows system which is OpenVPN client.
                      Now I was able to communicate to the remote LAN systems.

                      PfSense doesn't push routes on client's machine. Is there any issue with the PfSense openvpn configuration ?

                      1 Reply Last reply Reply Quote 0
                      • DerelictD
                        Derelict LAYER 8 Netgate
                        last edited by

                        pfSense OpenVPN pushes routes just fine. Has to use SSL/TLS mode though, not PSK, but that is how OpenVPN works.

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • N
                          nirav.solanki
                          last edited by

                          Had used SSL/TLS mode but then also have to give manual routes in windows client machine to be able to get connected.

                          1 Reply Last reply Reply Quote 0
                          • DerelictD
                            Derelict LAYER 8 Netgate
                            last edited by

                            Must've done something wrong.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

                            1 Reply Last reply Reply Quote 0
                            • N
                              nirav.solanki
                              last edited by

                              I have sent attachments of my configuration, openvpn rules, phase 2 entries in ipsec tunnel on local and remote site.

                              1.png
                              1.png_thumb
                              2.png
                              2.png_thumb
                              3.png
                              3.png_thumb
                              4.png
                              4.png_thumb
                              ![Local Site Phase 2.png](/public/imported_attachments/1/Local Site Phase 2.png)
                              ![Local Site Phase 2.png_thumb](/public/imported_attachments/1/Local Site Phase 2.png_thumb)
                              ![Remote Site Phase 2.png](/public/imported_attachments/1/Remote Site Phase 2.png)
                              ![Remote Site Phase 2.png_thumb](/public/imported_attachments/1/Remote Site Phase 2.png_thumb)

                              1 Reply Last reply Reply Quote 0
                              • A
                                awair
                                last edited by

                                You don't seem to be consistent with your local/remote IPs:

                                Are you using 192.168.5.0/24 or 192.168.0.0/24? (See Phase 2 images)

                                2.4.3 (amd64)
                                and given up on the SG-1000

                                1 Reply Last reply Reply Quote 0
                                • DerelictD
                                  Derelict LAYER 8 Netgate
                                  last edited by

                                  Those examples don't show the Phase 2 in question (OpenVPN Tunnel <==> Far side LAN).

                                  There are usually options to not pull routes on OpenVPN clients. It is Don't pull routes in pfSense.

                                  Chattanooga, Tennessee, USA
                                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                  1 Reply Last reply Reply Quote 0
                                  • N
                                    nirav.solanki
                                    last edited by

                                    I have two PfSense firewalls running on the same versions 2.3.2
                                    I have entered IPSec 2nd Phase entries of VPN Network ( 192.168.5.0/24 ) and Remote Firewall ( 192.168.55.0/24 ) on both sides.
                                    When I connect to VPN, I can connect to all the systems behind the LAN.

                                    But the same process I am doing on the PfSense running version 2.2, I am not able to connect.
                                    Is PfSense versioning really a big concern ?

                                    1 Reply Last reply Reply Quote 0
                                    • DerelictD
                                      Derelict LAYER 8 Netgate
                                      last edited by

                                      Yes. Upgrade.

                                      Chattanooga, Tennessee, USA
                                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

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