Advertisement
Guest User

Untitled

a guest
Aug 11th, 2019
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.28 KB | None | 0 0
  1. ### The following directives do not change with server reload.
  2.  
  3. # User authentication method. To require multiple methods to be
  4. # used for the user to login, add multiple auth directives. The values
  5. # in the 'auth' directive are AND composed (if multiple all must
  6. # succeed).
  7. # Available options: certificate, plain, pam, radius, gssapi.
  8. # Note that authentication methods utilizing passwords cannot be
  9. # combined (e.g., the plain, pam or radius methods).
  10.  
  11. # certificate:
  12. # This indicates that all connecting users must present a certificate.
  13. # The username and user group will be then extracted from it (see
  14. # cert-user-oid and cert-group-oid). The certificate to be accepted
  15. # it must be signed by the CA certificate as specified in 'ca-cert' and
  16. # it must not be listed in the CRL, as specified by the 'crl' option.
  17. #
  18. # pam[gid-min=1000]:
  19. # This enabled PAM authentication of the user. The gid-min option is used
  20. # by auto-select-group option, in order to select the minimum valid group ID.
  21. #
  22. # plain[passwd=/etc/ocserv/ocpasswd,otp=/etc/ocserv/users.otp]
  23. # The plain option requires specifying a password file which contains
  24. # entries of the following format.
  25. # "username:groupname1,groupname2:encoded-password"
  26. # One entry must be listed per line, and 'ocpasswd' should be used
  27. # to generate password entries. The 'otp' suboption allows one to specify
  28. # an oath password file to be used for one time passwords; the format of
  29. # the file is described in https://github.com/archiecobbs/mod-authn-otp/wiki/UsersFile
  30. #
  31. # radius[config=/etc/radiusclient/radiusclient.conf,groupconfig=true,nas-identifier=name]:
  32. # The radius option requires specifying freeradius-client configuration
  33. # file. If the groupconfig option is set, then config-per-user/group will be overridden,
  34. # and all configuration will be read from radius. That also includes the
  35. # Acct-Interim-Interval, and Session-Timeout values.
  36. #
  37. # See doc/README-radius.md for the supported radius configuration atributes.
  38. #
  39. # gssapi[keytab=/etc/key.tab,require-local-user-map=true,tgt-freshness-time=900]
  40. # The gssapi option allows one to use authentication methods supported by GSSAPI,
  41. # such as Kerberos tickets with ocserv. It should be best used as an alternative
  42. # to PAM (i.e., have pam in auth and gssapi in enable-auth), to allow users with
  43. # tickets and without tickets to login. The default value for require-local-user-map
  44. # is true. The 'tgt-freshness-time' if set, it would require the TGT tickets presented
  45. # to have been issued within the provided number of seconds. That option is used to
  46. # restrict logins even if the KDC provides long time TGT tickets.
  47.  
  48. #auth = "pam"
  49. #auth = "pam[gid-min=1000]"
  50. #auth = "plain[passwd=./sample.passwd,otp=./sample.otp]"
  51. auth = "plain[passwd=/root/certs/sample.passwd]"
  52. #auth = "certificate"
  53. #auth = "radius[config=/etc/radiusclient/radiusclient.conf,groupconfig=true]"
  54.  
  55. # Specify alternative authentication methods that are sufficient
  56. # for authentication. That is, if set, any of the methods enabled
  57. # will be sufficient to login, irrespective of the main 'auth' entries.
  58. # When multiple options are present, they are OR composed (any of them
  59. # succeeding allows login).
  60. #enable-auth = "certificate"
  61. #enable-auth = "gssapi"
  62. #enable-auth = "gssapi[keytab=/etc/key.tab,require-local-user-map=true,tgt-freshness-time=900]"
  63.  
  64. # Accounting methods available:
  65. # radius: can be combined with any authentication method, it provides
  66. # radius accounting to available users (see also stats-report-time).
  67. #
  68. # pam: can be combined with any authentication method, it provides
  69. # a validation of the connecting user's name using PAM. It is
  70. # superfluous to use this method when authentication is already
  71. # PAM.
  72. #
  73. # Only one accounting method can be specified.
  74. #acct = "radius[config=/etc/radiusclient/radiusclient.conf]"
  75.  
  76. # Use listen-host to limit to specific IPs or to the IPs of a provided
  77. # hostname.
  78. #listen-host = [IP|HOSTNAME]
  79.  
  80. # When the server has a dynamic DNS address (that may change),
  81. # should set that to true to ask the client to resolve again on
  82. # reconnects.
  83. #listen-host-is-dyndns = true
  84.  
  85. # TCP and UDP port number
  86. tcp-port = 443
  87. udp-port = 443
  88.  
  89. # Accept connections using a socket file. It accepts HTTP
  90. # connections (i.e., without SSL/TLS unlike its TCP counterpart),
  91. # and uses it as the primary channel. That option is experimental
  92. # and it has many known issues.
  93. # * It can only be combined with certificate authentication, when receiving
  94. # channel information through proxy protocol (see listen-proxy-proto)
  95. # * It cannot derive any keys needed for the DTLS session (hence no support for dtls-psk)
  96. # * It cannot enforce the framing of the SSL/TLS packets, and that
  97. # breaks assumptions held by several openconnect clients.
  98. # This option is not recommended for use, and may be removed
  99. # in the future.
  100. #
  101. #listen-clear-file = /var/run/ocserv-conn.socket
  102.  
  103. # The user the worker processes will be run as. It should be
  104. # unique (no other services run as this user).
  105. run-as-user = nobody
  106. run-as-group = daemon
  107.  
  108. # socket file used for IPC with occtl. You only need to set that,
  109. # if you use more than a single servers.
  110. #occtl-socket-file = /var/run/occtl.socket
  111.  
  112. # socket file used for server IPC (worker-main), will be appended with .PID
  113. # It must be accessible within the chroot environment (if any), so it is best
  114. # specified relatively to the chroot directory.
  115. socket-file = /var/run/ocserv-socket
  116.  
  117. # The default server directory. Does not require any devices present.
  118. #chroot-dir = /var/lib/ocserv
  119.  
  120. # The key and the certificates of the server
  121. # The key may be a file, or any URL supported by GnuTLS (e.g.,
  122. # tpmkey:uuid=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx;storage=user
  123. # or pkcs11:object=my-vpn-key;object-type=private)
  124. #
  125. # The server-cert file may contain a single certificate, or
  126. # a sorted certificate chain.
  127. # There may be multiple server-cert and server-key directives,
  128. # but each key should correspond to the preceding certificate.
  129. # The certificate files will be reloaded when changed allowing for in-place
  130. # certificate renewal (they are checked and reloaded periodically;
  131. # a SIGHUP signal to main server will force reload).
  132.  
  133. server-cert = /root/certs/server-cert.pem
  134. server-key = /root/certs/server-key.pem
  135.  
  136. # Diffie-Hellman parameters. Only needed if for old (pre 3.6.0
  137. # versions of GnuTLS for supporting DHE ciphersuites.
  138. # Can be generated using:
  139. # certtool --generate-dh-params --outfile /etc/ocserv/dh.pem
  140. #dh-params = /etc/ocserv/dh.pem
  141.  
  142. # In case PKCS #11, TPM or encrypted keys are used the PINs should be available
  143. # in files. The srk-pin-file is applicable to TPM keys only, and is the
  144. # storage root key.
  145. #pin-file = /etc/ocserv/pin.txt
  146. #srk-pin-file = /etc/ocserv/srkpin.txt
  147.  
  148. # The password or PIN needed to unlock the key in server-key file.
  149. # Only needed if the file is encrypted or a PKCS #11 object. This
  150. # is an alternative method to pin-file.
  151. #key-pin = 1234
  152.  
  153. # The SRK PIN for TPM.
  154. # This is an alternative method to srk-pin-file.
  155. #srk-pin = 1234
  156.  
  157. # The Certificate Authority that will be used to verify
  158. # client certificates (public keys) if certificate authentication
  159. # is set.
  160. ca-cert = /root/certs/ca.pem
  161.  
  162.  
  163. ### All configuration options below this line are reloaded on a SIGHUP.
  164. ### The options above, will remain unchanged. Note however, that the
  165. ### server-cert, server-key, dh-params and ca-cert options will be reloaded
  166. ### if the provided file changes, on server reload. That allows certificate
  167. ### rotation, but requires the server key to remain the same for seamless
  168. ### operation. If the server key changes on reload, there may be connection
  169. ### failures during the reloading time.
  170.  
  171.  
  172. # Whether to enable seccomp/Linux namespaces worker isolation. That restricts the number of
  173. # system calls allowed to a worker process, in order to reduce damage from a
  174. # bug in the worker process. It is available on Linux systems at a performance cost.
  175. # The performance cost is roughly 2% overhead at transfer time (tested on a Linux 3.17.8).
  176. # Note however, that process isolation is restricted to the specific libc versions
  177. # the isolation was tested at. If you get random failures on worker processes, try
  178. # disabling that option and report the failures you, along with system and debugging
  179. # information at: https://gitlab.com/ocserv/ocserv/issues
  180. isolate-workers = false
  181.  
  182. # A banner to be displayed on clients
  183. #banner = "Welcome"
  184.  
  185. # Limit the number of clients. Unset or set to zero for unlimited.
  186. #max-clients = 1024
  187. max-clients = 0
  188.  
  189. # Limit the number of identical clients (i.e., users connecting
  190. # multiple times). Unset or set to zero for unlimited.
  191. max-same-clients = 2
  192.  
  193. # When the server receives connections from a proxy, like haproxy
  194. # which supports the proxy protocol, set this to obtain the correct
  195. # client addresses. The proxy protocol would then be expected in
  196. # the TCP or UNIX socket (not the UDP one). Although both v1
  197. # and v2 versions of proxy protocol are supported, the v2 version
  198. # is recommended as it is more efficient in parsing.
  199. #listen-proxy-proto = true
  200.  
  201. # Limit the number of client connections to one every X milliseconds
  202. # (X is the provided value). Set to zero for no limit.
  203. #rate-limit-ms = 100
  204.  
  205. # Stats report time. The number of seconds after which each
  206. # worker process will report its usage statistics (number of
  207. # bytes transferred etc). This is useful when accounting like
  208. # radius is in use.
  209. #stats-report-time = 360
  210.  
  211. # Stats reset time. The period of time statistics kept by main/sec-mod
  212. # processes will be reset. These are the statistics shown by cmd
  213. # 'occtl show stats'. For daily: 86400, weekly: 604800
  214. # This is unrelated to stats-report-time.
  215. server-stats-reset-time = 604800
  216.  
  217. # Keepalive in seconds
  218. keepalive = 32400
  219.  
  220. # Dead peer detection in seconds.
  221. # Note that when the client is behind a NAT this value
  222. # needs to be short enough to prevent the NAT disassociating
  223. # his UDP session from the port number. Otherwise the client
  224. # could have his UDP connection stalled, for several minutes.
  225. dpd = 90
  226.  
  227. # Dead peer detection for mobile clients. That needs to
  228. # be higher to prevent such clients being awaken too
  229. # often by the DPD messages, and save battery.
  230. # The mobile clients are distinguished from the header
  231. # 'X-AnyConnect-Identifier-Platform'.
  232. mobile-dpd = 1800
  233.  
  234. # If using DTLS, and no UDP traffic is received for this
  235. # many seconds, attempt to send future traffic over the TCP
  236. # connection instead, in an attempt to wake up the client
  237. # in the case that there is a NAT and the UDP translation
  238. # was deleted. If this is unset, do not attempt to use this
  239. # recovery mechanism.
  240. switch-to-tcp-timeout = 25
  241.  
  242. # MTU discovery (DPD must be enabled)
  243. try-mtu-discovery = false
  244.  
  245. # If you have a certificate from a CA that provides an OCSP
  246. # service you may provide a fresh OCSP status response within
  247. # the TLS handshake. That will prevent the client from connecting
  248. # independently on the OCSP server.
  249. # You can update this response periodically using:
  250. # ocsptool --ask --load-cert=your_cert --load-issuer=your_ca --outfile response
  251. # Make sure that you replace the following file in an atomic way.
  252. #ocsp-response = /etc/ocserv/ocsp.der
  253.  
  254. # The object identifier that will be used to read the user ID in the client
  255. # certificate. The object identifier should be part of the certificate's DN
  256. # Useful OIDs are:
  257. # CN = 2.5.4.3, UID = 0.9.2342.19200300.100.1.1, SAN(rfc822name)
  258. cert-user-oid = 0.9.2342.19200300.100.1.1
  259.  
  260. # The object identifier that will be used to read the user group in the
  261. # client certificate. The object identifier should be part of the certificate's
  262. # DN. If the user may belong to multiple groups, then use multiple such fields
  263. # in the certificate's DN. Useful OIDs are:
  264. # OU (organizational unit) = 2.5.4.11
  265. #cert-group-oid = 2.5.4.11
  266.  
  267. # The revocation list of the certificates issued by the 'ca-cert' above.
  268. # See the manual to generate an empty CRL initially. The CRL will be reloaded
  269. # periodically when ocserv detects a change in the file. To force a reload use
  270. # SIGHUP.
  271. #crl = /etc/ocserv/crl.pem
  272.  
  273. # Uncomment this to enable compression negotiation (LZS, LZ4).
  274. #compression = true
  275.  
  276. # Set the minimum size under which a packet will not be compressed.
  277. # That is to allow low-latency for VoIP packets. The default size
  278. # is 256 bytes. Modify it if the clients typically use compression
  279. # as well of VoIP with codecs that exceed the default value.
  280. #no-compress-limit = 256
  281.  
  282. # GnuTLS priority string; note that SSL 3.0 is disabled by default
  283. # as there are no openconnect (and possibly anyconnect clients) using
  284. # that protocol. The string below does not enforce perfect forward
  285. # secrecy, in order to be compatible with legacy clients.
  286. #
  287. # Note that the most performant ciphersuites are the moment are the ones
  288. # involving AES-GCM. These are very fast in x86 and x86-64 hardware, and
  289. # in addition require no padding, thus taking full advantage of the MTU.
  290. # For that to be taken advantage of, the openconnect client must be
  291. # used, and the server must be compiled against GnuTLS 3.2.7 or later.
  292. # Use "gnutls-cli --benchmark-tls-ciphers", to see the performance
  293. # difference with AES_128_CBC_SHA1 (the default for anyconnect clients)
  294. # in your system.
  295.  
  296. tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0"
  297.  
  298. # More combinations in priority strings are available, check
  299. # http://gnutls.org/manual/html_node/Priority-Strings.html
  300. # E.g., the string below enforces perfect forward secrecy (PFS)
  301. # on the main channel.
  302. #tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-RSA:-VERS-SSL3.0:-ARCFOUR-128"
  303.  
  304. # That option requires the established DTLS channel to use the same
  305. # cipher as the primary TLS channel. This cannot be combined with
  306. # listen-clear-file since the ciphersuite information is not available
  307. # in that configuration. Note also, that this option implies that
  308. # dtls-legacy option is false; this option cannot be enforced
  309. # in the legacy/compat protocol.
  310. #match-tls-dtls-ciphers = true
  311.  
  312. # The time (in seconds) that a client is allowed to stay connected prior
  313. # to authentication
  314. auth-timeout = 240
  315.  
  316. # The time (in seconds) that a client is allowed to stay idle (no traffic)
  317. # before being disconnected. Unset to disable.
  318. #idle-timeout = 1200
  319.  
  320. # The time (in seconds) that a client is allowed to stay connected
  321. # Unset to disable. When set a client will be disconnected after being
  322. # continuously connected for this amount of time, and its cookies will
  323. # be invalidated (i.e., re-authentication will be required).
  324. #session-timeout = 86400
  325.  
  326. # The time (in seconds) that a mobile client is allowed to stay idle (no
  327. # traffic) before being disconnected. Unset to disable.
  328. #mobile-idle-timeout = 2400
  329.  
  330. # The time (in seconds) that a client is not allowed to reconnect after
  331. # a failed authentication attempt.
  332. min-reauth-time = 300
  333.  
  334. # Banning clients in ocserv works with a point system. IP addresses
  335. # that get a score over that configured number are banned for
  336. # min-reauth-time seconds. By default a wrong password attempt is 10 points,
  337. # a KKDCP POST is 1 point, and a connection is 1 point. Note that
  338. # due to difference processes being involved the count of points
  339. # will not be real-time precise.
  340. #
  341. # Score banning cannot be reliably used when receiving proxied connections
  342. # locally from an HTTP server (i.e., when listen-clear-file is used).
  343. #
  344. # Set to zero to disable.
  345. max-ban-score = 80
  346.  
  347. # The time (in seconds) that all score kept for a client is reset.
  348. ban-reset-time = 1200
  349.  
  350. # In case you'd like to change the default points.
  351. #ban-points-wrong-password = 10
  352. #ban-points-connection = 1
  353. #ban-points-kkdcp = 1
  354.  
  355. # Cookie timeout (in seconds)
  356. # Once a client is authenticated he's provided a cookie with
  357. # which he can reconnect. That cookie will be invalidated if not
  358. # used within this timeout value. This cookie remains valid, during
  359. # the user's connected time, and after user disconnection it
  360. # remains active for this amount of time. That setting should allow a
  361. # reasonable amount of time for roaming between different networks.
  362. cookie-timeout = 300
  363.  
  364. # If this is enabled (not recommended) the cookies will stay
  365. # valid even after a user manually disconnects, and until they
  366. # expire. This may improve roaming with some broken clients.
  367. #persistent-cookies = true
  368.  
  369. # Whether roaming is allowed, i.e., if true a cookie is
  370. # restricted to a single IP address and cannot be re-used
  371. # from a different IP.
  372. deny-roaming = false
  373.  
  374. # ReKey time (in seconds)
  375. # ocserv will ask the client to refresh keys periodically once
  376. # this amount of seconds is elapsed. Set to zero to disable (note
  377. # that, some clients fail if rekey is disabled).
  378. rekey-time = 172800
  379.  
  380. # ReKey method
  381. # Valid options: ssl, new-tunnel
  382. # ssl: Will perform an efficient rehandshake on the channel allowing
  383. # a seamless connection during rekey.
  384. # new-tunnel: Will instruct the client to discard and re-establish the channel.
  385. # Use this option only if the connecting clients have issues with the ssl
  386. # option.
  387. rekey-method = ssl
  388.  
  389. # Script to call when a client connects and obtains an IP.
  390. # The following parameters are passed on the environment.
  391. # REASON, VHOST, USERNAME, GROUPNAME, DEVICE, IP_REAL (the real IP of the client),
  392. # IP_REAL_LOCAL (the local interface IP the client connected), IP_LOCAL
  393. # (the local IP in the P-t-P connection), IP_REMOTE (the VPN IP of the client),
  394. # IPV6_LOCAL (the IPv6 local address if there are both IPv4 and IPv6
  395. # assigned), IPV6_REMOTE (the IPv6 remote address), IPV6_PREFIX, and
  396. # ID (a unique numeric ID); REASON may be "connect" or "disconnect".
  397. # In addition the following variables OCSERV_ROUTES (the applied routes for this
  398. # client), OCSERV_NO_ROUTES, OCSERV_DNS (the DNS servers for this client),
  399. # will contain a space separated list of routes or DNS servers. A version
  400. # of these variables with the 4 or 6 suffix will contain only the IPv4 or
  401. # IPv6 values.
  402.  
  403. # The disconnect script will receive the additional values: STATS_BYTES_IN,
  404. # STATS_BYTES_OUT, STATS_DURATION that contain a 64-bit counter of the bytes
  405. # output from the tun device, and the duration of the session in seconds.
  406.  
  407. connect-script = /usr/local/etc/ocserv/ocserv-script
  408. #disconnect-script = /usr/bin/myscript
  409.  
  410. # UTMP
  411. # Register the connected clients to utmp. This will allow viewing
  412. # the connected clients using the command 'who'.
  413. #use-utmp = true
  414.  
  415. # Whether to enable support for the occtl tool (i.e., either through D-BUS,
  416. # or via a unix socket).
  417. use-occtl = true
  418.  
  419. # PID file. It can be overridden in the command line.
  420. pid-file = /var/run/ocserv.pid
  421.  
  422. # Set the protocol-defined priority (SO_PRIORITY) for packets to
  423. # be sent. That is a number from 0 to 6 with 0 being the lowest
  424. # priority. Alternatively this can be used to set the IP Type-
  425. # Of-Service, by setting it to a hexadecimal number (e.g., 0x20).
  426. # This can be set per user/group or globally.
  427. #net-priority = 3
  428.  
  429. # Set the VPN worker process into a specific cgroup. This is Linux
  430. # specific and can be set per user/group or globally.
  431. #cgroup = "cpuset,cpu:test"
  432.  
  433. #
  434. # Network settings
  435. #
  436.  
  437. # The name to use for the tun device
  438. device = vpns
  439.  
  440. # Whether the generated IPs will be predictable, i.e., IP stays the
  441. # same for the same user when possible.
  442. predictable-ips = true
  443.  
  444. # The default domain to be advertised
  445. default-domain = <domain>
  446.  
  447. # The pool of addresses that leases will be given from. If the leases
  448. # are given via Radius, or via the explicit-ip? per-user config option then
  449. # these network values should contain a network with at least a single
  450. # address that will remain under the full control of ocserv (that is
  451. # to be able to assign the local part of the tun device address).
  452. # Note that, you could use addresses from a subnet of your LAN network if you
  453. # enable [proxy arp in the LAN interface](http://ocserv.gitlab.io/www/recipes-ocserv-pseudo-bridge.html);
  454. # in that case it is recommended to set ping-leases to true.
  455. ipv4-network = 192.168.1.0
  456. ipv4-netmask = 255.255.255.0
  457.  
  458. # An alternative way of specifying the network:
  459. #ipv4-network = 192.168.1.0/24
  460.  
  461. # The IPv6 subnet that leases will be given from.
  462. #ipv6-network = fda9:4efe:7e3b:03ea::/48
  463.  
  464. # Specify the size of the network to provide to clients. It is
  465. # generally recommended to provide clients with a /64 network in
  466. # IPv6, but any subnet may be specified. To provide clients only
  467. # with a single IP use the prefix 128.
  468. #ipv6-subnet-prefix = 128
  469. #ipv6-subnet-prefix = 64
  470.  
  471. # Whether to tunnel all DNS queries via the VPN. This is the default
  472. # when a default route is set.
  473. #tunnel-all-dns = true
  474.  
  475. # The advertized DNS server. Use multiple lines for
  476. # multiple servers.
  477. # dns = fc00::4be0
  478. dns = 8.8.8.8
  479.  
  480. # The NBNS server (if any)
  481. #nbns = 192.168.1.3
  482.  
  483. # The domains over which the provided DNS should be used. Use
  484. # multiple lines for multiple domains.
  485. #split-dns = example.com
  486.  
  487. # Prior to leasing any IP from the pool ping it to verify that
  488. # it is not in use by another (unrelated to this server) host.
  489. # Only set to true, if there can be occupied addresses in the
  490. # IP range for leases.
  491. ping-leases = false
  492.  
  493. # Use this option to set a link MTU value to the incoming
  494. # connections. Unset to use the default MTU of the TUN device.
  495. # Note that the MTU is negotiated using the value set and the
  496. # value sent by the peer.
  497. #mtu = 1420
  498.  
  499. # Unset to enable bandwidth restrictions (in bytes/sec). The
  500. # setting here is global, but can also be set per user or per group.
  501. #rx-data-per-sec = 40000
  502. #tx-data-per-sec = 40000
  503.  
  504. # The number of packets (of MTU size) that are available in
  505. # the output buffer. The default is low to improve latency.
  506. # Setting it higher will improve throughput.
  507. #output-buffer = 10
  508.  
  509. # Routes to be forwarded to the client. If you need the
  510. # client to forward routes to the server, you may use the
  511. # config-per-user/group or even connect and disconnect scripts.
  512. #
  513. # To set the server as the default gateway for the client just
  514. # comment out all routes from the server, or use the special keyword
  515. # 'default'.
  516.  
  517. route = 10.10.10.0/255.255.255.0
  518. route = 192.168.0.0/255.255.0.0
  519. #route = fef4:db8:1000:1001::/64
  520. #route = default
  521.  
  522. # Subsets of the routes above that will not be routed by
  523. # the server.
  524.  
  525. no-route = 192.168.5.0/255.255.255.0
  526.  
  527. # Note the that following two firewalling options currently are available
  528. # in Linux systems with iptables software.
  529.  
  530. # If set, the script /usr/bin/ocserv-fw will be called to restrict
  531. # the user to its allowed routes and prevent him from accessing
  532. # any other routes. In case of defaultroute, the no-routes are restricted.
  533. # All the routes applied by ocserv can be reverted using /usr/bin/ocserv-fw
  534. # --removeall. This option can be set globally or in the per-user configuration.
  535. #restrict-user-to-routes = true
  536.  
  537. # This option implies restrict-user-to-routes set to true. If set, the
  538. # script /usr/bin/ocserv-fw will be called to restrict the user to
  539. # access specific ports in the network. This option can be set globally
  540. # or in the per-user configuration.
  541. #restrict-user-to-ports = "tcp(443), tcp(80), udp(443), sctp(99), tcp(583), icmp(), icmpv6()"
  542.  
  543. # You could also use negation, i.e., block the user from accessing these ports only.
  544. #restrict-user-to-ports = "!(tcp(443), tcp(80))"
  545.  
  546. # When set to true, all client's iroutes are made visible to all
  547. # connecting clients except for the ones offering them. This option
  548. # only makes sense if config-per-user is set.
  549. #expose-iroutes = true
  550.  
  551. # Groups that a client is allowed to select from.
  552. # A client may belong in multiple groups, and in certain use-cases
  553. # it is needed to switch between them. For these cases the client can
  554. # select prior to authentication. Add multiple entries for multiple groups.
  555. # The group may be followed by a user-friendly name in brackets.
  556. #select-group = group1
  557. #select-group = group2[My special group]
  558.  
  559. # The name of the (virtual) group that if selected it would assign the user
  560. # to its default group.
  561. #default-select-group = DEFAULT
  562.  
  563. # Instead of specifying manually all the allowed groups, you may instruct
  564. # ocserv to scan all available groups and include the full list.
  565. #auto-select-group = true
  566.  
  567. # Configuration files that will be applied per user connection or
  568. # per group. Each file name on these directories must match the username
  569. # or the groupname.
  570. # The options allowed in the configuration files are dns, nbns,
  571. # ipv?-network, ipv4-netmask, rx/tx-per-sec, iroute, route, no-route,
  572. # explicit-ipv4, explicit-ipv6, net-priority, deny-roaming, no-udp,
  573. # keepalive, dpd, mobile-dpd, max-same-clients, tunnel-all-dns,
  574. # restrict-user-to-routes, user-profile, cgroup, stats-report-time,
  575. # mtu, idle-timeout, mobile-idle-timeout, restrict-user-to-ports,
  576. # and session-timeout.
  577. #
  578. # Note that the 'iroute' option allows one to add routes on the server
  579. # based on a user or group. The syntax depends on the input accepted
  580. # by the commands route-add-cmd and route-del-cmd (see below). The no-udp
  581. # is a boolean option (e.g., no-udp = true), and will prevent a UDP session
  582. # for that specific user or group. The hostname option will set a
  583. # hostname to override any proposed by the user. Note also, that, any
  584. # routes, no-routes, DNS or NBNS servers present will overwrite the global ones.
  585.  
  586. #config-per-user = /etc/ocserv/config-per-user/
  587. #config-per-group = /etc/ocserv/config-per-group/
  588.  
  589. # When config-per-xxx is specified and there is no group or user that
  590. # matches, then utilize the following configuration.
  591. #default-user-config = /etc/ocserv/defaults/user.conf
  592. #default-group-config = /etc/ocserv/defaults/group.conf
  593.  
  594. # The system command to use to setup a route. %{R} will be replaced with the
  595. # route/mask, %{RI} with the route in CIDR format, and %{D} with the (tun) device.
  596. #
  597. # The following example is from linux systems. %{R} should be something
  598. # like 192.168.2.0/255.255.255.0 and %{RI} 192.168.2.0/24 (the argument of iroute).
  599.  
  600. #route-add-cmd = "ip route add %{R} dev %{D}"
  601. #route-del-cmd = "ip route delete %{R} dev %{D}"
  602.  
  603. # This option allows one to forward a proxy. The special keywords '%{U}'
  604. # and '%{G}', if present will be replaced by the username and group name.
  605. #proxy-url = http://example.com/
  606. #proxy-url = http://example.com/%{U}/
  607.  
  608. # This option allows you to specify a URL location where a client can
  609. # post using MS-KKDCP, and the message will be forwarded to the provided
  610. # KDC server. That is a translation URL between HTTP and Kerberos.
  611. # In MIT kerberos you'll need to add in realms:
  612. # EXAMPLE.COM = {
  613. # kdc = https://ocserv.example.com/KdcProxy
  614. # http_anchors = FILE:/etc/ocserv-ca.pem
  615. # }
  616. # In some distributions the krb5-k5tls plugin of kinit is required.
  617. #
  618. # The following option is available in ocserv, when compiled with GSSAPI support.
  619.  
  620. #kkdcp = "SERVER-PATH KERBEROS-REALM PROTOCOL@SERVER:PORT"
  621. #kkdcp = "/KdcProxy KERBEROS.REALM udp@127.0.0.1:88"
  622. #kkdcp = "/KdcProxy KERBEROS.REALM tcp@127.0.0.1:88"
  623. #kkdcp = "/KdcProxy KERBEROS.REALM tcp@[::1]:88"
  624.  
  625. # Client profile xml. This can be used to advertise alternative servers
  626. # to the client. A minimal file can be:
  627. # <?xml version="1.0" encoding="UTF-8"?>
  628. # <AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd">
  629. # <ServerList>
  630. # <HostEntry>
  631. # <HostName>VPN Server name</HostName>
  632. # <HostAddress>localhost</HostAddress>
  633. # </HostEntry>
  634. # </ServerList>
  635. # </AnyConnectProfile>
  636. #
  637. # Other fields may be used by some of the CISCO clients.
  638. # This file must be accessible from inside the worker's chroot.
  639. # Note that enabling this option is not recommended as it will allow
  640. # the worker processes to open arbitrary files (when isolate-workers is
  641. # set to true).
  642. #user-profile = profile.xml
  643.  
  644. #
  645. # The following options are for (experimental) AnyConnect client
  646. # compatibility.
  647.  
  648. # This option will enable the pre-draft-DTLS version of DTLS, and
  649. # will not require clients to present their certificate on every TLS
  650. # connection. It must be set to true to support legacy CISCO clients
  651. # and openconnect clients < 7.08. When set to true, it implies dtls-legacy = true.
  652. cisco-client-compat = true
  653.  
  654. # This option allows one to disable the DTLS-PSK negotiation (enabled by default).
  655. # The DTLS-PSK negotiation was introduced in ocserv 0.11.5 to deprecate
  656. # the pre-draft-DTLS negotiation inherited from AnyConnect. It allows the
  657. # DTLS channel to negotiate its ciphers and the DTLS protocol version.
  658. #dtls-psk = false
  659.  
  660. # This option allows one to disable the legacy DTLS negotiation (enabled by default,
  661. # but that may change in the future).
  662. # The legacy DTLS uses a pre-draft version of the DTLS protocol and was
  663. # from AnyConnect protocol. It has several limitations, that are addressed
  664. # by the dtls-psk protocol supported by openconnect 7.08+.
  665. dtls-legacy = true
  666.  
  667. #Advanced options
  668.  
  669. # Option to allow sending arbitrary custom headers to the client after
  670. # authentication and prior to VPN tunnel establishment. You shouldn't
  671. # need to use this option normally; if you do and you think that
  672. # this may help others, please send your settings and reason to
  673. # the openconnect mailing list. The special keywords '%{U}'
  674. # and '%{G}', if present will be replaced by the username and group name.
  675. #custom-header = "X-My-Header: hi there"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement