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

    Unable to connect to different networks with OpenVPN!

    Scheduled Pinned Locked Moved OpenVPN
    11 Posts 3 Posters 1.0k 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.
    • E
      enesas
      last edited by

      Unable to connect to different networks with OpenVPN

      I connect to pfsense with openvpn configuration but I can't access server in local network.

      Open vpn network: 192.168.2.0/24
      local network : 192.168.1.0/24

      What I've tried:
      When I add "192.168.1.0/24" ip to openvpn> IPv4 Local network(s), I can only connect to the pfsense interface. Other local servers are not pinged.
      -Custom options> "route 192.168.1.50 255.255.255.0" (server adress)
      I added the rule.
      no connection.
      NAT > Outbound
      "Allow access" rule to local network from openVPN.
      but still no access.

      can you help me?

      1 Reply Last reply Reply Quote 0
      • the otherT
        the other
        last edited by

        Hey,
        what IP adress range is the network from which you call in and connect to the openVPN net?
        All three need to differ, for example:
        I am at my friend's house, use his LAN with 172.16.50.0/24
        My openVPN network uses 10.0.52.0/24
        My own LAN (which I try to reach) has 192.168.50.0/24

        It occurs quite often when using the default router config that 192.168.0.0/24 is set...resulting in a problem as you described.
        Hope you get what I mean (sorry for my poor langua skills)...
        ;)

        the other

        pure amateur home user, no business or professional background
        please excuse poor english skills and typpoz :)

        E 1 Reply Last reply Reply Quote 0
        • E
          enesas @the other
          last edited by

          @the-other Thank you for taking the trouble to write.

          yes all 3 networks Separate networks. So the thread spacing is different.
          remote pc : 192.168.10.0/24
          openVPN : 192.168.2.0/24
          local network(the network where the server is located- the network I want to access): 192.168.1.0/24

          the otherT 1 Reply Last reply Reply Quote 0
          • the otherT
            the other @enesas
            last edited by

            @enesas Hey,
            that's what a forum is good for...isn't it? :)

            When you say "other local servers" are not pinged...do these other servers have a firewall (like that Windows stuff) included?
            Maybe the problem is caused by those? My NAS for instance will not allow any PINGs, so the packet goes thru pfsense...hits NAS's firewall and gets dropped there. Just another small idea...

            Here openVPN (on pfs) works just fine, since I have no site2site but a roadwarrior setting, I work with push "route". If I remember correctly, I did not change any NAT rules.

            the other

            pure amateur home user, no business or professional background
            please excuse poor english skills and typpoz :)

            E 1 Reply Last reply Reply Quote 0
            • E
              enesas @the other
              last edited by

              @the-other
              Yes
              I can ping locally.
              I can't access common files outside of ping.

              V 1 Reply Last reply Reply Quote 0
              • V
                viragomann @enesas
                last edited by

                @enesas
                Is pfSense which is running the OpenVPN server the default gateway in the local network or is there another default gateway?

                E 1 Reply Last reply Reply Quote 0
                • E
                  enesas @viragomann
                  last edited by

                  @viragomann pfsense default gateway

                  V 1 Reply Last reply Reply Quote 0
                  • V
                    viragomann @enesas
                    last edited by

                    @enesas
                    So possibly your server is blocking the access from outside of its subnet.

                    You can simply check that out on the local pfSense with Diagnostic > Ping.
                    Just ping the server. You should get responses.
                    Then change the source to OpenVPN and ping again. What do you get now?

                    E 1 Reply Last reply Reply Quote 0
                    • E
                      enesas @viragomann
                      last edited by

                      @viragomann
                      I'm really surprised.

                      I did as you said from pfsense, it's pinging both of them.
                      i.e. both local and OpenVPN leg.

                      but not remotely.

                      V 1 Reply Last reply Reply Quote 0
                      • V
                        viragomann @enesas
                        last edited by

                        @enesas
                        Well, so the server is responding to outside requests and it should also work from the VPN client.

                        In the OpenVPN server setting, did you enter 192.168.1.0/24 (the network where your servers are located at "IPv4 Local Network/s"?

                        1 Reply Last reply Reply Quote 0
                        • E
                          enesas
                          last edited by

                          Problem solved for now:
                          The problem was solved when I deleted the VPN server I created and created it again. (VPN>openvpn> servers)

                          Later I realized that; If you add the openVPN interface from the interface section, this problem happens. Even if you delete the related interface later, the problem is not solved. However, when I delete the server from VPN>openVPN and add it again, it is fixed.

                          To everyone
                          thank you

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