Navigation

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

    Very Confusing is OpenVPN Setup

    OpenVPN
    5
    47
    538
    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.
    • R
      rwhitney last edited by

      Hello. I'm sorry to have to write this, but all the documentation and tutorials on the internet do not explain properly the step-by-step procedure for creating a user > assigning a cert > creating a client and making the configuration downloadable from Client Export. Can someone well-versed in pfSense give the masses a step-by-step guide that we can follow?
      Thank you!

      provels 1 Reply Last reply Reply Quote 0
      • provels
        provels @rwhitney last edited by provels

        @rwhitney I followed this tutorial on YouTube many years ago. https://www.youtube.com/watch?v=VdAHVSTl1ys
        Worked a treat, as the Brits say. IIRC, there was a point where he used the wrong cert, but if I could figure it out... LOL

        Peder

        pfSense+ 22.05-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM (Fixed), 8GB VHDX (Dynamic)
        Packages : Cron, Mailreport, Notes, Nut, OpenVPN, pfBlockerNG-devel, RRD_Summary, Service Watchdog, System_Patches

        R 1 Reply Last reply Reply Quote 0
        • R
          rwhitney @provels last edited by

          @provels Thanks for the link! Looks promising.

          R 1 Reply Last reply Reply Quote 0
          • R
            rwhitney @rwhitney last edited by

            @provels - sorry but this seems too old

            1 Reply Last reply Reply Quote 0
            • R
              rwhitney last edited by

              is there no one who has been through this before? I know it is very cryptic, what steps to take. I had the entire thing setup a one point - was able to see the remote network (other servers), but waited about 6 weeks to try again, and something must have changed - now I can see the firewall and make changes, fortunately, but no other servers. I'm going Titanic! Please help me!

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

                So your connection is established successfully.

                If you are able to access the remote pfSense by its LAN address, maybe you are blocked by the destination hosts firewall.

                1 Reply Last reply Reply Quote 0
                • R
                  rwhitney last edited by rwhitney

                  348d506d-3d2d-485b-9d2a-4b64a8f9877e-image.png
                  how does this look? Wait viragomann, I see what you mean. - None of the other hosts use a f/w

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

                    That's the WAN rule allowing access to the OpenVPN server. Since the connection is up, as you say, i'm not in doubt, that this rule is working.

                    So what? Are you able to access pfSense by using its LAN address?

                    Is pfSense the default gateway in your LAN?

                    R 2 Replies Last reply Reply Quote 0
                    • R
                      rwhitney @viragomann last edited by

                      @viragomann yes I am able to connect to 10.0.8.1 (the pfSense F/W) thru the vpn and can see no other devices

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

                        I was asking for the LAN IP! You didn't mention what 10.0.8.1 is, so I don't know.
                        Are you able to access pfSense from the remote client by using the LAN IP?

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

                          https://www.youtube.com/watch?v=qscIIZ10WTQ

                          https://www.youtube.com/watch?v=iJ5GACqfIGs

                          Chattanooga, Tennessee, USA
                          The pfSense Book is free of charge!
                          DO NOT set a source 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
                          • R
                            rwhitney @viragomann last edited by

                            @viragomann no I am not able to see the LANip

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

                              So the routes on the client aren't set as the should be.
                              Have you watched the hangouts?
                              In the OpenVPN server settings you have to put your LAN network into the "Local Network/s" box to get the route pushed to the client. Have you done this?

                              R 2 Replies Last reply Reply Quote 0
                              • R
                                rwhitney @viragomann last edited by rwhitney

                                @viragomann yes I have set the route LAN network to 192.168.0.1/24

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

                                  It would be helpful to have a look at the clients routing table.

                                  R 2 Replies Last reply Reply Quote 0
                                  • Derelict
                                    Derelict LAYER 8 Netgate last edited by

                                    Is the LAN network on the client also 192.168.0.0/24?

                                    Chattanooga, Tennessee, USA
                                    The pfSense Book is free of charge!
                                    DO NOT set a source port in a port forward or firewall rule unless you KNOW you need it!
                                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                    R 1 Reply Last reply Reply Quote 0
                                    • R
                                      rwhitney @viragomann last edited by

                                      @viragomann I'll try to get to it tonight or tomorrow morning I'm in Arizona And I can send you a screenshot And thanks for your help

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rwhitney @viragomann last edited by

                                        @viragomann I'm sorry, yes pfSense is the default gateway to my LAN

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          rwhitney @Derelict last edited by rwhitney

                                          @Derelict yes I believe so If I follow you correctly the client LAN is 192.168.0.1/24

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            rwhitney @viragomann last edited by rwhitney

                                            @viragomann interesting is the static routes table is blank. Could it be that there needs to be at least one entry there for the VPN to- work properly?

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

                                              The clients LAN must not overlap the remote LAN, least of all it can be the same subnet. If so it's not possible to access the remote site.

                                              I've never seen an empty routing table on a device which has internet access. There must be at least one gateway and one route.
                                              When a OpenVPN connection is established and a route is pushed by the server to its LAN network, you should see this route pointing to the servers IP, probably 10.0.8.1, as you mentioned above you can access pfSense by that IP.

                                              R 1 Reply Last reply Reply Quote 0
                                              • R
                                                rwhitney @viragomann last edited by rwhitney

                                                @viragomann again my apologies - my local LAN is 192.168.1.1/24; the LAN I am trying to remote into is 192.168.0.1/24

                                                R 1 Reply Last reply Reply Quote 0
                                                • R
                                                  rwhitney @rwhitney last edited by

                                                  I am attaching a screenshot:
                                                  421c7cd3-6cf6-4a78-bbe1-093cafbcfee4-image.png

                                                  this is the default gateway and the Static Routes table is again blank

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

                                                    The routing table is the key here, but that one of the client!

                                                    R 2 Replies Last reply Reply Quote 0
                                                    • R
                                                      rwhitney @viragomann last edited by rwhitney

                                                      @viragomann How do I display the client routing table or which one do you need to see?

                                                      1 Reply Last reply Reply Quote 0
                                                      • R
                                                        rwhitney @viragomann last edited by

                                                        @viragomann does this help?
                                                        4cddcd4a-eb3f-48bc-857f-00a2c65bf1b3-image.png

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

                                                          The first step to configuring a VPN is understanding what it is you are actually doing.

                                                          On the client, connect the VPN. Then print the routing table.

                                                          Some common command lines:

                                                          Windows: route print
                                                          Mac: netstat -rnfinet
                                                          Linux: netstat -rn4

                                                          You can use Diagnostics > Routes in the pfSense software.

                                                          Chattanooga, Tennessee, USA
                                                          The pfSense Book is free of charge!
                                                          DO NOT set a source port in a port forward or firewall rule unless you KNOW you need it!
                                                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                                          R 1 Reply Last reply Reply Quote 0
                                                          • stephenw10
                                                            stephenw10 Netgate Administrator @rwhitney last edited by

                                                            @rwhitney said in Very Confusing is OpenVPN Setup:

                                                            I have set the route LAN network to 192.168.0.1/24

                                                            That should be 192.168.0.0/24 in the local subnets field. Unless you have set Redirect IPv4 Gateway in which case that should be not set anywhere as everything is routed.

                                                            Steve

                                                            R 1 Reply Last reply Reply Quote 0
                                                            • R
                                                              rwhitney @Derelict last edited by

                                                              @Derelict please pardon my dust as I AM learning!

                                                              ===========================================================================
                                                              Interface List
                                                                4...d0 17 c2 02 fb 3e ......Realtek PCIe GBE Family Controller
                                                               18...16 c6 3b 02 82 0f ......Microsoft Wi-Fi Direct Virtual Adapter
                                                               13...26 c6 3b 02 82 0f ......Microsoft Wi-Fi Direct Virtual Adapter #2
                                                               19...00 ff f9 1a 4d b8 ......TAP Adapter OAS NDIS 6.0
                                                               16...00 ff e2 a9 d8 ab ......TAP-Windows Adapter V9
                                                               10...74 c6 3b 02 82 0f ......Qualcomm Atheros AR9485 Wireless Network Adapter
                                                                1...........................Software Loopback Interface 1
                                                              ===========================================================================
                                                              
                                                              IPv4 Route Table
                                                              ===========================================================================
                                                              Active Routes:
                                                              Network Destination        Netmask          Gateway       Interface  Metric
                                                                        0.0.0.0          0.0.0.0      192.168.1.1     192.168.1.12     55
                                                                        0.0.0.0        128.0.0.0         10.0.8.1         10.0.8.3    291
                                                                       10.0.8.0    255.255.255.0         On-link          10.0.8.3    291
                                                                       10.0.8.3  255.255.255.255         On-link          10.0.8.3    291
                                                                     10.0.8.255  255.255.255.255         On-link          10.0.8.3    291
                                                                   98.174.x.x  255.255.255.255      192.168.1.1     192.168.1.12    311
                                                                      127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
                                                                      127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
                                                                127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
                                                                      128.0.0.0        128.0.0.0         10.0.8.1         10.0.8.3    291
                                                                    192.168.1.0    255.255.255.0         On-link      192.168.1.12    311
                                                                   192.168.1.12  255.255.255.255         On-link      192.168.1.12    311
                                                                  192.168.1.255  255.255.255.255         On-link      192.168.1.12    311
                                                                      224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
                                                                      224.0.0.0        240.0.0.0         On-link          10.0.8.3    291
                                                                      224.0.0.0        240.0.0.0         On-link      192.168.1.12    311
                                                                255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
                                                                255.255.255.255  255.255.255.255         On-link          10.0.8.3    291
                                                                255.255.255.255  255.255.255.255         On-link      192.168.1.12    311
                                                              ===========================================================================
                                                              Persistent Routes:
                                                                None
                                                              
                                                              1 Reply Last reply Reply Quote 0
                                                              • R
                                                                rwhitney @stephenw10 last edited by rwhitney

                                                                @stephenw10 setting it to 192.168.0.0/24 does not seem to make a difference - I did have it set to Redirect IPv4 Gateway, but have removed that

                                                                1 Reply Last reply Reply Quote 0
                                                                • R
                                                                  rwhitney last edited by

                                                                  Just to indicate my gratitude to everyone who has offered advice in this thread - thank you! (I am not yet connected to internal LAN however)

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

                                                                    It's still sending route all and not just 192.168.0.0/24.

                                                                    Try restarting the server end to be sure that new setting in place and then check the Windows client routing table.

                                                                    Steve

                                                                    R 1 Reply Last reply Reply Quote 0
                                                                    • R
                                                                      rwhitney @stephenw10 last edited by rwhitney

                                                                      @stephenw10 so reboot the netgate server? I will have to wait a couple of hours first

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

                                                                        No. Restart the OpenVPN process. (Status > Services, stop it and start it. This is restarted when you make a change like disabling the redirect gateway push but Steve is just being thorough.)

                                                                        Chattanooga, Tennessee, USA
                                                                        The pfSense Book is free of charge!
                                                                        DO NOT set a source port in a port forward or firewall rule unless you KNOW you need it!
                                                                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                                                        R 1 Reply Last reply Reply Quote 0
                                                                        • R
                                                                          rwhitney @Derelict last edited by rwhitney

                                                                          @Derelict I just restarted the running process for openvpn. I did just notice that I am getting a connection error: key registration failed to occur within 60 seconds... I am trying this from a Windows laptop at work through an external wirelass network. I don't have this connectivity problem from home on my linux box - just from there I still cannot see the local LAN here at work. All I can see is the firewall

                                                                          1 Reply Last reply Reply Quote 0
                                                                          • R
                                                                            rwhitney @viragomann last edited by rwhitney

                                                                            @viragomann Here is my server setting for Tunnel:
                                                                            b3c7e981-4ad8-4ed1-9e33-eda0bf62ada5-image.png

                                                                            I do not see a setting for Remote Network in OpenVPN > Server

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

                                                                              @rwhitney
                                                                              That was wrong. It should be "Local Networks".
                                                                              I'll correct it above.

                                                                              R 1 Reply Last reply Reply Quote 0
                                                                              • R
                                                                                rwhitney @viragomann last edited by

                                                                                @viragomann Oh, so I do have something correct?!!

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

                                                                                  @rwhitney
                                                                                  ☺ Yeah!

                                                                                  R 1 Reply Last reply Reply Quote 0
                                                                                  • R
                                                                                    rwhitney @viragomann last edited by

                                                                                    @viragomann
                                                                                    If I were to start from scratch, what would be the first thing to do? (setup the Cert?)
                                                                                    second: setup an openvpn server: (I think I have this set).
                                                                                    Third: setup a user?
                                                                                    Fourth: setup a user cert?
                                                                                    Fifth: download config from Client Export
                                                                                    What am I missing?

                                                                                    1 Reply Last reply Reply Quote 0
                                                                                    • First post
                                                                                      Last post