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

    DOS-Style Return Charater (Ctrl-M) In OVPN Files

    Scheduled Pinned Locked Moved OpenVPN
    6 Posts 2 Posters 858 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.
    • B
      brewer789
      last edited by brewer789

      I have three servers running on my pfSense device. Recently, when doing an inline client export of OpenVPN config files (Most Clients button) the TLS key section, including comments but excluding opening and closing tags (<tls-auth> and </tls-auth>), have the DOS Ctrl-M carriage return character appended to each line. This just started recently. I'm not sure how it started or how to fix it. When doing a bundled export, the TLS key doesn't have the DOS return character.

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

        @brewer789 and what version of the export package are you running.. I am not seeing this..

        export client 1.2

        export.jpg

        How exactly are you viewing the files?

        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

        B 1 Reply Last reply Reply Quote 0
        • B
          brewer789 @johnpoz
          last edited by brewer789

          @johnpoz I'm running openvpn-client-export version 1.6_4, and viewing the files from an Ubuntu terminal using VIM. Here's a segment:

          key-direction 1
          <tls-auth>
          #^M

          2048 bit OpenVPN static key^M

          #^M
          -----BEGIN OpenVPN Static key V1-----^M
          132e9a25e4e28ea3b81ad78e10886797^M
          cf794265d68f8d1ed5c3feeb52c791bf^M
          65375a12cdfec07c4b713f4393c28296^M
          22dc3b80bac0a2e158bb8c0278d68be5^M
          0517eabdcfdef2e034feae0616f664a9^M
          3c664b5e43cc88d7ae709e57d839ee4b^M

          johnpozJ B 2 Replies Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @brewer789
            last edited by johnpoz

            @brewer789 said in DOS-Style Return Charater (Ctrl-M) In OVPN Files:

            penvpn-client-export version 1.6_4

            What version of pfsense are you running?

            Are you saying its not working - I think that is just a thing with vim and showing the CR..

            So I copied the file over to my linux box and use vim and it shows this on the CA key as well on the tls key

            vim.jpg

            But if view in nano don't see them.

            nano.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

            B 1 Reply Last reply Reply Quote 0
            • B
              brewer789 @brewer789
              last edited by

              I have to think that the tls keys somehow got corrupted. We recently pre-configured some laptops for incoming students and transferred some of the files via USB. It's possible that someone made an intermediate copy on a Windows computer and it ended up in the servers, though I can't see how that would have happened. I tested one of the servers and had it generate a new TLS key and it exported correctly, so I'll chalk this up to user error.

              1 Reply Last reply Reply Quote 0
              • B
                brewer789 @johnpoz
                last edited by

                @johnpoz That is interesting. I can go back and look and previously exported files and it doesn't show the ^M characters. It's just recent ones that I've noticed it. Things seem to be working though, so I'll just accept it and move on. Thank you for taking the time to look at it for me.

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