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

    oVPN client: TLS key not valid

    Scheduled Pinned Locked Moved OpenVPN
    12 Posts 2 Posters 1.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.
    • O
      orangehand @johnpoz
      last edited by

      @johnpoz
      Many thanks

      I am following the instructions at https://docs.netgate.com/pfsense/en/latest/recipes/openvpn-s2s-tls.html#recipe-openvpn-s2s-tls-examplesettings to configure a remote pfsense behind cgnat to connect to their main office pfsense.

      In there it says:
      The next task is to export the certificates and keys which the client requires when connecting to the OpenVPN server.

      Navigate to System > Cert Manager, CAs tab
      Click fa-certificate on the row for the CA to export its certificate
      Navigate to System > Cert Manager, Certificates tab
      Click fa-certificate on the row for each client certificate to export the certificates
      Click fa-key on the row for each client certificate to export the private key for the client certificates.

      When I slavishly copy the steps and then paste in the key obtained in the last step into the remote client ovpn setup I get the error.

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

        @orangehand not sure what your exporting, but the tls key would not be in the cert manager.. But clicking the export cert and or key would export a .crt or .key file that you can open with any text editor..

        buttons.jpg

        The tls key would be in the ovpn file you got or export.. Like I showed in my previous port

        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

        O 1 Reply Last reply Reply Quote 0
        • O
          orangehand @johnpoz
          last edited by

          @johnpoz exactly what I did (clicked the key icon), opened it in 3 different text editors, then pasted it into the client config. On save I get the error.

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

            @orangehand that is not the TLS key, that is the KEY to a cert or CA.. They are completely different things.. So no posting a cert key into the tls section is never going to work.

            you would find the tls key in your server config for openvpn, or in the ovpn file you have.. They are NOT in the cert manager..

            tlskey.jpg

            From the link you posted

            tlskeylink.jpg

            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

            O 1 Reply Last reply Reply Quote 0
            • O
              orangehand @johnpoz
              last edited by

              @johnpoz Thank you so much. I had totally misinterpreted the instructions.
              However, although pfSense remote can ping hosts at the other end, I cannot ping them from a LAN client at the remote end. Any guesses?

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

                @orangehand said in oVPN client: TLS key not valid:

                I cannot ping them from a LAN client at the remote end.

                where are you trying to ping, and what are the networks involved..

                192.168.1/24 - pfsenseA -- vpn tunnel 172.16.0/24 -- pfsenseB - 192.168.2/24

                So that is example s2s setup.. Who can not ping who.. And do you have routes on both ends pointing to the other network down the vpn, etc

                also don't forget possible host firewall.. Just because the routes are there and pfsense allows traffic if say 192.168.1.x tried to ping 192.168.2.y doesn't mean that 2.y is going to answer the ping from some remote network, etc.

                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

                O 1 Reply Last reply Reply Quote 0
                • O
                  orangehand @johnpoz
                  last edited by

                  @johnpoz
                  remote client 10.0.169.0/24 -- 10.0.89.0/24 oVPN tunnel -- 10.0.69.0/24 main office server

                  I'm pinging 10.0.69.16 from remote client pfsense at 10.0.169.1 and get a response. Ping from client on remote lan no response.

                  There is nothing in the remote routing table for destination 10.0.69.0/24, but the guide doesn't say that one needs to deal with routing, hence I haven't!

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

                    @orangehand said in oVPN client: TLS key not valid:

                    I'm pinging 10.0.69.16 from remote client pfsense at 10.0.169.1 and get a response. Ping from client on remote lan no response.

                    That screams .16 firewall to me, or .16 not using pfsense as its default gateway.

                    You mean from 69.1 you get a response?

                    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

                    O 1 Reply Last reply Reply Quote 0
                    • O
                      orangehand @johnpoz
                      last edited by

                      @johnpoz yes, I get a response from 10.0.69.1 AND 10.0.169.1 at the remote end

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

                        @orangehand where exactly are you pinging from.. 169.1 would be pfsense lan IP on the remote end.. There wouldn't be any different with your routing, or normally firewall on the 69.x device.

                        10.0.69.16 -- 69.1 pfsenseA -- vpn tunnel --- pfsenseB 169.1 -- 10.0.169.x

                        If you ping 69.16 from 169.1 interface on pfsenseB, it should work from 169.x unless 169.x is not using pfsenseB as its gateway. Or you doing some sort of policy routing on your 169.1 interface, or you have some firewall rule blocking access to this remote network?

                        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
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.