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 @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
                        • stephenw10S
                          stephenw10 Netgate Administrator @LMorefield
                          last edited by

                          @LMorefield said in OpenVPN External Connection:

                          .1 is the pfSense gateway

                          You mean the LAN interface address? There shouldn't be a gateway on LAN.

                          You should see at least the pings to .241 on the LAN pcap though. 🤔

                          Your pass rule on openvpn is still the same? No gateway set?

                          Do you see any states open for that ping?

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

                            @stephenw10
                            .1 is where I go to login to PF sense, so I guess the LAN interface address. I ran the pcap on the LAN interface address and received the following. I tried pinging it four times.

                            89169637-1177-4b52-9ded-d1f2e1231c38-image.png

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

                              You ran pings to 10.12.192.241 from an openvpn client?

                              It's interesting that that host is sending icmp notifications back to the firewall that something is trying to access udp ports on it.

                              Are you seeing states created? Do you see states/bytes on the firewall rule on openvpn?

                              If not then it's being blocked by something. Floating rules maybe?

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

                                @stephenw10
                                Yes, was sending pings externally from an OpenVPN client to .241.

                                There's 0/234 bytes

                                be25145c-5644-467f-b282-bcb5370b6b0d-image.png

                                No floating rules.

                                42426723-5370-4539-97d2-534b55022e81-image.png

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

                                  @stephenw10 @viragomann
                                  I just created a rule allowing port 53(DNS) which may not have had an effect, but I also created an ICMP rule in OpenVPN and I can now successfully ping the .241.

                                  b9edbf61-ca0c-48a5-9081-cb43cc657ca4-image.png

                                  1 Reply Last reply Reply Quote 0
                                  • RicoR
                                    Rico LAYER 8 Rebel Alliance
                                    last edited by

                                    Your first Rule only allows UDP...

                                    -Rico

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

                                      @Rico
                                      Awesome! That now allows me to access the LAN interface. Thanks! Any settings I need to change to allow me to RDP into my workstation?

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

                                        You have to pass TCP traffic for that. But I would just change that first rule to pass 'any' protocol to 'LAN subnets' and remove the other two rules.

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

                                          @stephenw10 Done and it's working!

                                          From the recent posts, is there anything I need to clear up to keep from getting hacked?

                                          Thank you all again for your help, I appreciate you! I can't upvote yet or I'd be giving them!

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

                                            I would consider putting OpenVPN on a different port. It's extremely unlikely you would be hacked that way but you will see connection attempts and possibly blocked traffic on the default port.

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