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

    Unable to reach LAN after succesful connection

    Scheduled Pinned Locked Moved OpenVPN
    19 Posts 4 Posters 1.8k 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.
    • J
      Joschide
      last edited by

      @ega:

      Are you using TCP or UDP?

      Put a image of your server configuration

      I'm using UDP.  Attached is the openVPN server edit page.

      P1.PNG
      P1.PNG_thumb
      P2.PNG
      P2.PNG_thumb
      P3.PNG
      P3.PNG_thumb

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        Your telling the client to use the tunnel as their default gateway.. So no you don't really need push any specific routes.

        What network is on the remote side and what is your lan.. Common issues is remote is 192.168.0.0/24 and your also on 192.168.0.0/24 on your lan.. Why would the client go down the tunnel even if default gateway when to the remote client that network is local.

        Do you want these remote clients to use your tunnel for their internet as well while they are connected to you, or only to access your lan?  If just access lan - then uncheck use default gateway and put in your local network so that will be handed to the client. You can then view that in a route print on the client side.  Make sure they run the openvpn as admin or you can have issues with routes being added, etc.

        Also what is the firewall rules on your openvpn tab?

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

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

          @Joschide:

          I believe my problem is LAN is not the gateway for that network.

          That will be the problem.
          Since you LAN hosts don't know the subnet of the OpenVPN tunnel they will send their response to the default gateway.

          You can easily resolve this by adding an Outbond NAT rule for VPN tunnel to LAN.
          To do so, you have to switch Outbond NAT to "Hybrid Outbound NAT rule generation" or "Manual Outbound NAT rule generation" at first and save this.
          Then add a rule like:
          Interface=LAN, Source=<your openvpn="" tunnel="" network="">, Translation=Interface address

          This will translate the VPN packets source address to the pfSenses LAN address, so the host on LAN will send their response to LAN address and pfSense routes it to the VPN client.</your>

          1 Reply Last reply Reply Quote 0
          • J
            Joschide
            last edited by

            Is it possible to give the client a valid IP from the LAN network?  Preferrebly, I'd want to use the DHCP server on the LAN (it's an SBS box).  I'm able to see the ping request from a firewall on the LAN and it is being blocked because it is coming over as the tunnel network (10.0.8.*)..

            My LAN network is 192.168.16.0/24

            Thank you,
            Joschi

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              you could use TAP vs TUN – but that really is not a very good idea..

              "I'm able to see the ping request from a firewall on the LAN"
              So your traffic is being blocked by the client firewall and not pfsense then?

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • J
                Joschide
                last edited by

                @viragomann:

                You can easily resolve this by adding an Outbond NAT rule for VPN tunnel to LAN.
                To do so, you have to switch Outbond NAT to "Hybrid Outbound NAT rule generation" or "Manual Outbound NAT rule generation" at first and save this.
                Then add a rule like:
                Interface=LAN, Source=<your openvpn="" tunnel="" network="">, Translation=Interface address

                This will translate the VPN packets source address to the pfSenses LAN address, so the host on LAN will send their response to LAN address and pfSense routes it to the VPN client.</your>

                I'm able to ping by IP address now.  Thank you.

                I'm not able to ping by FQDN yet.  The client isn't getting the right IP address.  Can I Push the LAN DNS to the client?

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

                  Yeah. You can check "Provide a DNS server list to clients" in the server config and enter you LAN DNS there. But remember that if you do that the client will only use this DNS server. So ensure that it can resolve everthing, what your clients need.

                  1 Reply Last reply Reply Quote 0
                  • J
                    Joschide
                    last edited by

                    @viragomann:

                    Yeah. You can check "Provide a DNS server list to clients" in the server config and enter you LAN DNS there. But remember that if you do that the client will only use this DNS server. So ensure that it can resolve everthing, what your clients need.

                    Hmm, I already have that set in the client configuration.  I also have Redirect gateway checked.

                    P1.PNG_thumb
                    P1.PNG

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

                      The DNS server is also part of your LAN network, which the outbound NAT rule refer to?

                      Do an nslookup at the client to see if the correct DNS server is accessed.

                      1 Reply Last reply Reply Quote 0
                      • J
                        Joschide
                        last edited by

                        @viragomann:

                        The DNS server is also part of your LAN network, which the outbound NAT rule refer to?

                        Do an nslookup at the client to see if the correct DNS server is accessed.

                        Correct, the DNS server (part of SBS) is on the LAN.  nslookup from the client says it's using 127.0.1.1 as server.

                        1 Reply Last reply Reply Quote 0
                        • J
                          Joschide
                          last edited by

                          I specified the DNS server on the lan with nslookup and it worked.  However, I had to specify pcname.domain.local in order for it to work.

                          Could it have something to do with the General Setup page?  See attached

                          P1.PNG
                          P1.PNG_thumb

                          1 Reply Last reply Reply Quote 0
                          • J
                            Joschide
                            last edited by

                            After some fiddling, I've managed to get it working on my iphone  ;D  However, both linux and windows clients still aren't resolving internal servers properly.  My iPhone is working great.  can pull up internal servers, check mail, etc..

                            What could that be???

                            1 Reply Last reply Reply Quote 0
                            • J
                              Joschide
                              last edited by

                              @Joschide:

                              After some fiddling, I've managed to get it working on my iphone  ;D  However, both linux and windows clients still aren't resolving internal servers properly.  My iPhone is working great.  can pull up internal servers, check mail, etc..

                              What could that be???

                              I should add I can get around using IP addresses from the linux and windows clients.

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

                                I had a similar problem, I can get connected but can access LAN resources, this happend when the conection was made by a NAT, when the device had a public IP, I can reach local resources.

                                The solution that worked for me, was set TCP as protocol for the VPN, the explanation its that some routers can´t give appropiate backward traffic for UDP, this its solved using TCP protocol, so can be solved adding a static route in the router (but I didnt do this, first tried the simplest solution  :))

                                I suggest change the server configuration, export a new user and try again.

                                Si compartes dinero queda la mitad, si compartes conocimiento queda el doble.-

                                1 Reply Last reply Reply Quote 0
                                • J
                                  Joschide
                                  last edited by

                                  @ega:

                                  I had a similar problem, I can get connected but can access LAN resources, this happend when the conection was made by a NAT, when the device had a public IP, I can reach local resources.

                                  The solution that worked for me, was set TCP as protocol for the VPN, the explanation its that some routers can´t give appropiate backward traffic for UDP, this its solved using TCP protocol, so can be solved adding a static route in the router (but I didnt do this, first tried the simplest solution  :))

                                  I suggest change the server configuration, export a new user and try again.

                                  Thank you for your suggestion.  I will try that.

                                  1 Reply Last reply Reply Quote 0
                                  • johnpozJ
                                    johnpoz LAYER 8 Global Moderator
                                    last edited by

                                    "nslookup from the client says it's using 127.0.1.1 as server."

                                    Your clients said they were using loopback address as their dns?  Where they running any sort of dns server that forwarded.. That makes no sense at all..

                                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                                    If you get confused: Listen to the Music Play
                                    Please don't Chat/PM me for help, unless mod related
                                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      Joschide
                                      last edited by

                                      @johnpoz:

                                      "nslookup from the client says it's using 127.0.1.1 as server."

                                      Your clients said they were using loopback address as their dns?  Where they running any sort of dns server that forwarded.. That makes no sense at all..

                                      This is from a linux client.  I have to specify nslookup someIP dnsIP and it works.

                                      My windows clients are now working correctly!

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