Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to put comments in the client config files (those in the path specified by "client-config-dir") for OpenVPN, i.e. something beginning with "#" or "//" or the like? If so, what is the appropriate comment character?

share|improve this question

2 Answers 2

up vote 10 down vote accepted

The '#' prefix is the designated comment tag. The examples on the openvpn website use '#' comments extensively.

Also, the semi-colon - ';' - is used to comment out single lines or items.

share|improve this answer
    
curious about the rationale behind ; - never seen a specific commenting style for disabled code (as opposed to text) before –  Peter Ehrlich Mar 26 at 18:33

As Jim says the examples on the OpenVPN site use # for comments and ; to comment out settings. There is no functional difference but this convention makes it easier to visually identify settings that are commented out.

From https://openvpn.net/index.php/open-source/documentation/howto.html#examples

#################################################
# Sample OpenVPN 2.0 config file for            #
<snip>
# Comments are preceded with '#' or ';'         #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
;local a.b.c.d

# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one.  You will need to
# open up this port on your firewall.
port 1194

# TCP or UDP server?
;proto tcp
proto udp
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.