Results 1 to 5 of 5
  1. #1
    Untangle Ninja
    Join Date
    Jan 2011
    Posts
    1,281

    Default add client name & site name to .ovpn file as a comment

    I had a situation today where it would've been helpful to have the site name and client name included as a comment within the generated .ovpn file.
    It seems like this would be trivial to add, I assume there's a template somewhere which is used to generate the file.

    Something like:
    Code:
    #Site: ACME Corp
    #Client: WCoyote
    client
    resolv-retry 20
    keepalive 2 10
    nobind
    mute-replay-warnings
    remote-cert-tls server
    compress
    verb 1
    persist-key
    persist-tun
    ......

  2. #2
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    24,799

    Default

    Have you tried just adding that to the client section? # is a special character though so it wouldn't surprise me if it didn't work.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  3. #3
    Untangle Ninja Jim.Alles's Avatar
    Join Date
    Jul 2008
    Location
    Central PA
    Posts
    2,289

    Default

    Code:
    Double quotation or single quotation characters (“”, ”) can be used to enclose single 
    parameters containing whitespace, 
    and “#” or “;” characters in the first column can be used to denote comments.
    from https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4

    so ';' probably is not quite as special, but I don't think that advanced/client section is going to do what he wants, that would be global (all clients)

    Is there a variable lurking somewhere?
    Last edited by Jim.Alles; 07-28-2020 at 01:58 PM.
    If you think I got Grumpy

  4. #4
    Untangle Ninja Jim.Alles's Avatar
    Join Date
    Jul 2008
    Location
    Central PA
    Posts
    2,289

    Default

    Quote Originally Posted by johnsonx42 View Post
    I had a situation today where it would've been helpful to have the site name and client name included as a comment within the generated .ovpn file.
    It seems like this would be trivial to add, I assume there's a template somewhere which is used to generate the file.
    Make your suggestion here:
    https://untanglengfirewall.featureupvote.com/

    I'll up-vote it!
    If you think I got Grumpy

  5. #5
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    24,799

    Default

    Oh sorry yeah my suggestion would work for the site name, but not the client name.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2