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.

344 lines
12 KiB

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