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

    OpenVPN External Connection

    Scheduled Pinned Locked Moved General pfSense Questions
    40 Posts 5 Posters 2.3k 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.
    • L
      LMorefield @stephenw10
      last edited by

      @stephenw10
      I was indeed trying to connect. I have logging enabled, I've never seen any attempt in the log unless I disable the firewall which then the log will show the connection.
      dd05e41f-3898-4696-919e-7593abcef2b0-image.png

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

        @LMorefield
        Try to set the source in the WAN rule to "any" instead of 0.0.0.0.

        On OpenVPN you only need a rule to allow access from the tunnel network to your LAN subnet.
        The rule for port 1194 is not needed there.

        L 1 Reply Last reply Reply Quote 0
        • L
          LMorefield @viragomann
          last edited by LMorefield

          @viragomann
          981c9963-5171-4cbe-ae25-763e9ee5e00f-image.png

          2e81dd90-e0dc-40fa-84c7-77b9d4505bf8-image.png

          I'm currently trying to connect, however, nothing is registering in the logs for OpenVPN.
          7ed7e3ab-c562-4c73-94a1-f028dcb773ef-image.png

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

            @LMorefield
            What shows the client log?

            L 1 Reply Last reply Reply Quote 0
            • L
              LMorefield @viragomann
              last edited by

              @viragomann
              0197200c-fc15-4c43-bc8e-cb92609371b1-image.png

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                You only need one of those rules on WAN, they are the same.

                You can see there are 0 states and 0 bytes shown on those rules implying no traffic has hit them.

                You can't test the a UDP port like that since nothing is expected to rely there.

                I would run a packet capture on the WAN filtered by port 1194 and see if any traffic is arriving from the client at all. It might be blocked somewhere upstream.

                L 1 Reply Last reply Reply Quote 0
                • L
                  LMorefield @stephenw10
                  last edited by LMorefield

                  @stephenw10

                  I got rid of one of the rules on WAN. Ran a packet capture, below are the results.

                  520eaa57-77e5-4b32-80a8-22bb07e16d19-image.png

                  It looks like OpenVPN is listening on 1194

                  7fbe1251-7448-4842-a921-a76291a0d9f2-image.png

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

                    @LMorefield
                    So the packets from the client are arriving, but your OpenVPN server doesn't respond. If there is nothing to see in the logs of the clients access the server obviously doesn't get the packet or is dead meanwhile.

                    Did you forward the packets to anywhere else by any chance?
                    Do you have any port forwarding rules?

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      LMorefield @viragomann
                      last edited by LMorefield

                      @viragomann

                      I didn't forward the packets elsewhere when doing the packet capture.
                      These are the port forwarding rules I have setup.

                      b013b437-8f49-4fab-b992-553f5ea1c07b-image.png

                      a8331d68-1e25-40de-9577-beb5f4980ff4-image.png

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

                        @LMorefield
                        But your screenshot shows port forwarding of UDP 1194 on WAN. So remove or disable this rule.
                        You server is listening on the WAN IP. If you want to use any other change the server settings.

                        The outbound NAT rule affects outbound connections only. It has no impact on the VPN server.

                        L 1 Reply Last reply Reply Quote 0
                        • L
                          LMorefield @viragomann
                          last edited by LMorefield

                          @viragomann Done!
                          54dc028d-6984-40b0-97d6-99d62f11b677-image.png

                          I went back to start capturing packets and the VPN actually connected. It says no internet access and isn't allowing me to access anything, but it's finally connected!

                          I disconnected an reconnected multiple times to ensure it's connecting.

                          Thanks again for your help!

                          Any suggestions on how to continue configuring so I can access my network and workstation and utilize rdp?

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

                            @LMorefield
                            You OpenVPN rules allow access to the WAN subnet only. So I assume, this is what you want. And you don't want to redirect the whole upstream traffic from the client over the VPN.

                            So did you have checked "redirect gateway" in the server settings?
                            If so remove this check and state you LAN subnet at "local networks".

                            Also if you provide a DNS server in the VPN settings, ensure that you allow access to it.

                            L 1 Reply Last reply Reply Quote 0
                            • L
                              LMorefield @viragomann
                              last edited by LMorefield

                              @viragomann I'm looking to utilize the network once I remote into it, and mainly to access my workstation remotely using RDP. If the traffic going through the VPN is adverse, I can do without routing the traffic through the VPN.

                              I could not find the "redirect gateway" setting in the server settings.

                              I added DNS servers in the VPN settings and opened it up I believe.

                              4625e408-7f91-4ad6-8c3e-46366a84ce91-image.png

                              f0a52c1f-b495-4d55-83a9-ebc4c242d9d5-image.png

                              cfd36511-8ca2-416c-889e-91e23814bf21-image.png

                              f568ba56-ce9f-46cb-866e-f6a2478a22fa-image.png

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

                                @LMorefield said in OpenVPN External Connection:

                                If the traffic going through the VPN is adverse, I can do without routing the traffic through the VPN.

                                This depends on your needs. Some want to redirect all traffic over the VPN to use the servers WAN IP to go out to the internet.
                                If you only intend to access the local networks stay with split tunneling.

                                I could not find the "redirect gateway" setting in the server settings.

                                It "Redirect IPv4 gateway" and "Reirect IPv6 gateway". It's not checked.

                                I added DNS servers in the VPN settings and opened it up I believe.

                                Stating public DNS server requires, that the client has access to them. But I guess, this might be given.

                                So I'd expect, that the client has no issues with internet access with these settings.

                                BTW: there is no need to state "comp-lzo" in the custom options. This can be set at "allow compression".

                                L 1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by stephenw10

                                  Do you see states and/or bytes on the pass rule on WAN?

                                  Anything logged now?

                                  Edit: Ooops missed some posts.

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    LMorefield @viragomann
                                    last edited by

                                    @viragomann and @stephenw10

                                    I pinged internal IP's from the external connection and received, " Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)"

                                    When I did the packet capture from pfSense using icmp as the protocol, the packet capture captured all of the pings, eight total, four for each IP address.

                                    251ef364-2e7f-4b7c-8f56-dbd511e98c2c-image.png

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      The destination there is some internal host on your LAN subnet? 10.12.192.0/24?

                                      There's no need to obscure that, it's a private subnet. No one can route to it externally.

                                      The destination host may not reply to pings from outside it's own subnet. pfSense will though, you should be able to ping the LAN IP.

                                      L 1 Reply Last reply Reply Quote 0
                                      • L
                                        LMorefield @stephenw10
                                        last edited by

                                        @stephenw10 Haha, I wasn't too sure. And yes, here it is unobscured. Are you able to walk me through how to access the network now that I'm connected?

                                        cc752218-0191-45a7-b1ff-7ffcfaccf7da-image.png

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          OK try running that pcap on the LAN interface. Make sure those pings are leaving there.

                                          What are those hosts on LAN, .1 and .241?
                                          If .1 is the LAN IP that should reply given the rules on OpenVPN.

                                          L 1 Reply Last reply Reply Quote 0
                                          • L
                                            LMorefield @stephenw10
                                            last edited by

                                            @stephenw10 The .1 is the pfSense gateway, the .241 is one of my desktops. I tried on LAN and got nothing for the pcap. Neither went through.

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