You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

339 lines
12 KiB

11 years ago
  1. # User authentication method. Could be set multiple times and in that case
  2. # all should succeed.
  3. # Options: certificate, pam.
  4. #auth = "certificate"
  5. #auth = "pam"
  6. # The gid-min option is used by auto-select-group option, in order to
  7. # select the minimum group ID.
  8. #auth = "pam[gid-min=1000]"
  9. # The plain option requires specifying a password file which contains
  10. # entries of the following format.
  11. # "username:groupname:encoded-password"
  12. # One entry must be listed per line, and 'ocpasswd' can be used
  13. # to generate password entries.
  14. auth = "|AUTH|"
  15. # A banner to be displayed on clients
  16. banner = "Welcome to OpenWRT"
  17. # Use listen-host to limit to specific IPs or to the IPs of a provided
  18. # hostname.
  19. #listen-host = [IP|HOSTNAME]
  20. # Limit the number of clients. Unset or set to zero for unlimited.
  21. #max-clients = 1024
  22. max-clients = |MAX_CLIENTS|
  23. # Limit the number of client connections to one every X milliseconds
  24. # (X is the provided value). Set to zero for no limit.
  25. #rate-limit-ms = 100
  26. # Limit the number of identical clients (i.e., users connecting
  27. # multiple times). Unset or set to zero for unlimited.
  28. max-same-clients = |MAX_SAME|
  29. # TCP and UDP port number
  30. tcp-port = |PORT|
  31. |UDP|udp-port = |PORT|
  32. # Keepalive in seconds
  33. keepalive = 32400
  34. # Dead peer detection in seconds.
  35. dpd = |DPD|
  36. # Dead peer detection for mobile clients. The needs to
  37. # be much higher to prevent such clients being awaken too
  38. # often by the DPD messages, and save battery.
  39. # (clients that send the X-AnyConnect-Identifier-DeviceType)
  40. #mobile-dpd = 1800
  41. # MTU discovery (DPD must be enabled)
  42. try-mtu-discovery = false
  43. # The key and the certificates of the server
  44. # The key may be a file, or any URL supported by GnuTLS (e.g.,
  45. # tpmkey:uuid=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx;storage=user
  46. # or pkcs11:object=my-vpn-key;object-type=private)
  47. #
  48. # There may be multiple certificate and key pairs and each key
  49. # should correspond to the preceding certificate.
  50. server-cert = /etc/ocserv/server-cert.pem
  51. server-key = /etc/ocserv/server-key.pem
  52. # Diffie-Hellman parameters. Only needed if you require support
  53. # for the DHE ciphersuites (by default this server supports ECDHE).
  54. # Can be generated using:
  55. # certtool --generate-dh-params --outfile /path/to/dh.pem
  56. #dh-params = /path/to/dh.pem
  57. # If you have a certificate from a CA that provides an OCSP
  58. # service you may provide a fresh OCSP status response within
  59. # the TLS handshake. That will prevent the client from connecting
  60. # independently on the OCSP server.
  61. # You can update this response periodically using:
  62. # ocsptool --ask --load-cert=your_cert --load-issuer=your_ca --outfile response
  63. # Make sure that you replace the following file in an atomic way.
  64. #ocsp-response = /path/to/ocsp.der
  65. # In case PKCS #11 or TPM keys are used the PINs should be available
  66. # in files. The srk-pin-file is applicable to TPM keys only, and is the
  67. # storage root key.
  68. #pin-file = /path/to/pin.txt
  69. #srk-pin-file = /path/to/srkpin.txt
  70. # The Certificate Authority that will be used to verify
  71. # client certificates (public keys) if certificate authentication
  72. # is set.
  73. #ca-cert = /etc/ocserv/ca.pem
  74. # The object identifier that will be used to read the user ID in the client
  75. # certificate. The object identifier should be part of the certificate's DN
  76. # Useful OIDs are:
  77. # CN = 2.5.4.3, UID = 0.9.2342.19200300.100.1.1
  78. #cert-user-oid = 0.9.2342.19200300.100.1.1
  79. # The object identifier that will be used to read the user group in the
  80. # client certificate. The object identifier should be part of the certificate's
  81. # DN. Useful OIDs are:
  82. # OU (organizational unit) = 2.5.4.11
  83. #cert-group-oid = 2.5.4.11
  84. # The revocation list of the certificates issued by the 'ca-cert' above.
  85. #crl = /etc/ocserv/crl.pem
  86. # GnuTLS priority string
  87. tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT"
  88. # To enforce perfect forward secrecy (PFS) on the main channel.
  89. #tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-RSA"
  90. # The time (in seconds) that a client is allowed to stay connected prior
  91. # to authentication
  92. auth-timeout = 40
  93. # The time (in seconds) that a client is allowed to stay idle (no traffic)
  94. # before being disconnected. Unset to disable.
  95. #idle-timeout = 1200
  96. # The time (in seconds) that a mobile client is allowed to stay idle (no
  97. # traffic) before being disconnected. Unset to disable.
  98. #mobile-idle-timeout = 2400
  99. # The time (in seconds) that a client is not allowed to reconnect after
  100. # a failed authentication attempt.
  101. #min-reauth-time = 2
  102. # Cookie timeout (in seconds)
  103. # which he can reconnect. That cookie will be invalided if not
  104. # used within this timeout value. On a user disconnection, that
  105. # cookie will also be active for this time amount prior to be
  106. # invalid. That should allow a reasonable amount of time for roaming
  107. # between different networks.
  108. cookie-timeout = 300
  109. # Whether roaming is allowed, i.e., if true a cookie is
  110. # restricted to a single IP address and cannot be re-used
  111. # from a different IP.
  112. deny-roaming = false
  113. # ReKey time (in seconds)
  114. # ocserv will ask the client to refresh keys periodically once
  115. # this amount of seconds is elapsed. Set to zero to disable.
  116. rekey-time = 172800
  117. # ReKey method
  118. # Valid options: ssl, new-tunnel
  119. # ssl: Will perform an efficient rehandshake on the channel allowing
  120. # a seamless connection during rekey.
  121. # new-tunnel: Will instruct the client to discard and re-establish the channel.
  122. # Use this option only if the connecting clients have issues with the ssl
  123. # option.
  124. rekey-method = ssl
  125. # Script to call when a client connects and obtains an IP
  126. # Parameters are passed on the environment.
  127. # REASON, USERNAME, GROUPNAME, HOSTNAME (the hostname selected by client),
  128. # DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
  129. # in the P-t-P connection), IP_REMOTE (the VPN IP of the client),
  130. # ID (a unique numeric ID); REASON may be "connect" or "disconnect".
  131. connect-script = /usr/bin/ocserv-script
  132. disconnect-script = /usr/bin/ocserv-script
  133. # UTMP
  134. use-utmp = false
  135. # Whether to enable support for the occtl tool (i.e., either through D-BUS,
  136. # or via a unix socket).
  137. use-occtl = true
  138. # socket file used for IPC with occtl. You only need to set that,
  139. # if you use more than a single servers.
  140. occtl-socket-file = /var/run/occtl.socket
  141. # PID file. It can be overriden in the command line.
  142. pid-file = /var/run/ocserv.pid
  143. # The default server directory. Does not require any devices present.
  144. chroot-dir = /var/lib/ocserv
  145. # socket file used for IPC, will be appended with .PID
  146. # It must be accessible within the chroot environment (if any)
  147. #socket-file = /var/run/ocserv-socket
  148. socket-file = ocserv-socket
  149. # The user the worker processes will be run as. It should be
  150. # unique (no other services run as this user).
  151. run-as-user = ocserv
  152. run-as-group = ocserv
  153. # Set the protocol-defined priority (SO_PRIORITY) for packets to
  154. # be sent. That is a number from 0 to 6 with 0 being the lowest
  155. # priority. Alternatively this can be used to set the IP Type-
  156. # Of-Service, by setting it to a hexadecimal number (e.g., 0x20).
  157. # This can be set per user/group or globally.
  158. #net-priority = 3
  159. # Set the VPN worker process into a specific cgroup. This is Linux
  160. # specific and can be set per user/group or globally.
  161. #cgroup = "cpuset,cpu:test"
  162. #
  163. # Network settings
  164. #
  165. # The name of the tun device
  166. device = vpns
  167. # Whether the generated IPs will be predictable, i.e., IP stays the
  168. # same for the same user when possible.
  169. predictable-ips = |PREDICTABLE_IPS|
  170. # The default domain to be advertised
  171. default-domain = example.com
  172. # The pool of addresses that leases will be given from.
  173. ipv4-network = |IPV4ADDR|
  174. ipv4-netmask = |NETMASK|
  175. # The advertized DNS server. Use multiple lines for
  176. # multiple servers.
  177. # dns = fc00::4be0
  178. #dns = 192.168.1.2
  179. # The NBNS server (if any)
  180. #nbns = 192.168.1.3
  181. # The IPv6 subnet that leases will be given from.
  182. |ENABLE_IPV6|ipv6-network = |IPV6ADDR|
  183. |ENABLE_IPV6|ipv6-prefix = |IPV6PREFIX|
  184. # The domains over which the provided DNS should be used. Use
  185. # multiple lines for multiple domains.
  186. #split-dns = example.com
  187. # Prior to leasing any IP from the pool ping it to verify that
  188. # it is not in use by another (unrelated to this server) host.
  189. ping-leases = false
  190. # Unset to assign the default MTU of the device
  191. # mtu =
  192. # Unset to enable bandwidth restrictions (in bytes/sec). The
  193. # setting here is global, but can also be set per user or per group.
  194. #rx-data-per-sec = 40000
  195. #tx-data-per-sec = 40000
  196. # The number of packets (of MTU size) that are available in
  197. # the output buffer. The default is low to improve latency.
  198. # Setting it higher will improve throughput.
  199. #output-buffer = 10
  200. # Routes to be forwarded to the client. If you need the
  201. # client to forward routes to the server, you may use the
  202. # config-per-user/group or even connect and disconnect scripts.
  203. #
  204. # To set the server as the default gateway for the client just
  205. # comment out all routes from the server.
  206. #route = 192.168.1.0/255.255.255.0
  207. #route = 192.168.5.0/255.255.255.0
  208. #route = fef4:db8:1000:1001::/64
  209. # Configuration files that will be applied per user connection or
  210. # per group. Each file name on these directories must match the username
  211. # or the groupname.
  212. # The options allowed in the configuration files are dns, nbns,
  213. # ipv?-network, ipv4-netmask, ipv6-prefix, rx/tx-per-sec, iroute, route,
  214. # net-priority and cgroup.
  215. #
  216. # Note that the 'iroute' option allows to add routes on the server
  217. # based on a user or group. The syntax depends on the input accepted
  218. # by the commands route-add-cmd and route-del-cmd (see below).
  219. #config-per-user = /etc/ocserv/config-per-user/
  220. #config-per-group = /etc/ocserv/config-per-group/
  221. # When config-per-xxx is specified and there is no group or user that
  222. # matches, then utilize the following configuration.
  223. #default-user-config = /etc/ocserv/defaults/user.conf
  224. #default-group-config = /etc/ocserv/defaults/group.conf
  225. # Groups that a client is allowed to select from.
  226. # A client may belong in multiple groups, and in certain use-cases
  227. # it is needed to switch between them. For these cases the client can
  228. # select prior to authentication. Add multiple entries for multiple groups.
  229. #select-group = group1
  230. #select-group = group2[My group 2]
  231. #select-group = tost[The tost group]
  232. # The name of the group that if selected it would allow to use
  233. # the assigned by default group.
  234. #default-select-group = DEFAULT
  235. # Instead of specifying manually all the allowed groups, you may instruct
  236. # ocserv to scan all available groups and include the full list. That
  237. # option is only functional on plain authentication.
  238. #auto-select-group = true
  239. # The system command to use to setup a route. %{R} will be replaced with the
  240. # route/mask and %{D} with the (tun) device.
  241. #
  242. # The following example is from linux systems. %{R} should be something
  243. # like 192.168.2.0/24
  244. #route-add-cmd = "ip route add %{R} dev %{D}"
  245. #route-del-cmd = "ip route delete %{R} dev %{D}"
  246. # This option allows to forward a proxy. The special strings '%{U}'
  247. # and '%{G}', if present will be replaced by the username and group name.
  248. #proxy-url = http://example.com/
  249. #proxy-url = http://example.com/%{U}/%{G}/hello
  250. #
  251. # The following options are for (experimental) AnyConnect client
  252. # compatibility.
  253. # Client profile xml. A sample file exists in doc/profile.xml.
  254. # This file must be accessible from inside the worker's chroot.
  255. # It is not used by the openconnect client.
  256. #user-profile = profile.xml
  257. # Binary files that may be downloaded by the CISCO client. Must
  258. # be within any chroot environment.
  259. #binary-files = /path/to/binaries
  260. # Unless set to false it is required for clients to present their
  261. # certificate even if they are authenticating via a previously granted
  262. # cookie and complete their authentication in the same TCP connection.
  263. # Legacy CISCO clients do not do that, and thus this option should be
  264. # set for them.
  265. cisco-client-compat = |CISCO_COMPAT|
  266. #Advanced options
  267. # Option to allow sending arbitrary custom headers to the client after
  268. # authentication and prior to VPN tunnel establishment.
  269. #custom-header = "X-My-Header: hi there"