diff options
author | rebortg <github@ghlr.de> | 2023-05-10 15:58:06 +0200 |
---|---|---|
committer | rebortg <github@ghlr.de> | 2023-05-10 15:58:44 +0200 |
commit | 6c0917208c59d11e0e00ec247756734a80321e67 (patch) | |
tree | 250d9307e76b7811ec27e6c93052e9216230d53e | |
parent | 54b34091f439c57f666ec17ab8b5a8f430634ecb (diff) | |
download | vyos-documentation-6c0917208c59d11e0e00ec247756734a80321e67.tar.gz vyos-documentation-6c0917208c59d11e0e00ec247756734a80321e67.zip |
Configexample: migrate openvpn-ldap to autotest
-rw-r--r-- | docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.log | 293 | ||||
-rw-r--r-- | docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.rst | 265 | ||||
-rw-r--r-- | docs/configexamples/autotest/OpenVPN_with_LDAP/_include/client.conf | 10 | ||||
-rw-r--r-- | docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ldap-auth.config | 13 | ||||
-rw-r--r-- | docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ovpn-server.conf | 15 | ||||
-rw-r--r-- | docs/configexamples/autotest/OpenVPN_with_LDAP/_include/topology.png | bin | 0 -> 40891 bytes | |||
-rw-r--r-- | docs/configexamples/index.rst | 2 | ||||
-rw-r--r-- | docs/configexamples/openvpn-ldap.rst | 94 |
8 files changed, 597 insertions, 95 deletions
diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.log b/docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.log new file mode 100644 index 00000000..b4eb556b --- /dev/null +++ b/docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.log @@ -0,0 +1,293 @@ +2023-05-10 15:49:03,125 p=46395 u=rob n=ansible | PLAY [Automatic VyOS Lab test] **************************************************************************************************************************************************************************************************** +2023-05-10 15:49:03,156 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : Get env file content] ************************************************************************************************************************************************************************************* +2023-05-10 15:49:03,473 p=46395 u=rob n=ansible | ok: [eveng -> localhost] +2023-05-10 15:49:03,473 p=46395 u=rob n=ansible | ok: [ldap-server -> localhost] +2023-05-10 15:49:03,473 p=46395 u=rob n=ansible | ok: [ovpn-server -> localhost] +2023-05-10 15:49:03,474 p=46395 u=rob n=ansible | ok: [vyos-oobm -> localhost] +2023-05-10 15:49:03,474 p=46395 u=rob n=ansible | ok: [client -> localhost] +2023-05-10 15:49:03,477 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: Load facts] **************************************************************************************************************************************************************************** +2023-05-10 15:49:03,501 p=46395 u=rob n=ansible | ok: [eveng] +2023-05-10 15:49:03,516 p=46395 u=rob n=ansible | ok: [ldap-server] +2023-05-10 15:49:04,604 p=46395 u=rob n=ansible | network_os is set to vyos +2023-05-10 15:49:04,606 p=46395 u=rob n=ansible | network_os is set to vyos +2023-05-10 15:49:04,607 p=46395 u=rob n=ansible | network_os is set to vyos +2023-05-10 15:49:04,607 p=46395 u=rob n=ansible | [WARNING]: ansible-pylibssh not installed, falling back to paramiko + +2023-05-10 15:49:04,608 p=46395 u=rob n=ansible | [WARNING]: ansible-pylibssh not installed, falling back to paramiko + +2023-05-10 15:49:04,608 p=46395 u=rob n=ansible | [WARNING]: ansible-pylibssh not installed, falling back to paramiko + +2023-05-10 15:49:04,616 p=46395 u=rob n=ansible | ok: [client] +2023-05-10 15:49:04,617 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:49:04,617 p=46395 u=rob n=ansible | ok: [vyos-oobm] +2023-05-10 15:49:04,622 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: fail if node_template_version is empty] ************************************************************************************************************************************************ +2023-05-10 15:49:04,646 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:04,655 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:04,662 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:49:04,665 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:04,669 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:04,672 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : generate openv-server CA] ********************************************************************************************************************************************************************************* +2023-05-10 15:49:04,687 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:04,694 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:04,703 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:04,707 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:05,742 p=46508 u=rob n=ansible | [DEPRECATION WARNING]: PlayContext.verbosity is deprecated, use +ansible.utils.display.Display.verbosity instead. This feature will be removed +in version 2.18. Deprecation warnings can be disabled by setting +deprecation_warnings=False in ansible.cfg. +2023-05-10 15:49:06,402 p=46508 u=rob n=p=46508 u=rob | paramiko [ovpn-server] | Connected (version 2.0, client OpenSSH_9.2p1) +2023-05-10 15:49:06,706 p=46508 u=rob n=p=46508 u=rob | paramiko [ovpn-server] | Authentication (publickey) successful! +2023-05-10 15:49:10,581 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:49:10,588 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : install openv-server CA] ********************************************************************************************************************************************************************************** +2023-05-10 15:49:10,607 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:10,616 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:10,626 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:10,631 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:16,168 p=46395 u=rob n=ansible | [WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device + +2023-05-10 15:49:16,169 p=46395 u=rob n=ansible | changed: [ovpn-server] +2023-05-10 15:49:16,176 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : generate openv-server SRV] ******************************************************************************************************************************************************************************** +2023-05-10 15:49:16,200 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:16,208 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:16,217 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:16,222 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:20,306 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:49:20,313 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : install openv-server SRV] ********************************************************************************************************************************************************************************* +2023-05-10 15:49:20,333 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:20,341 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:20,351 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:20,355 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:26,238 p=46395 u=rob n=ansible | changed: [ovpn-server] +2023-05-10 15:49:26,245 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : generate openv-server Client Cert] ************************************************************************************************************************************************************************ +2023-05-10 15:49:26,272 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:26,279 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:26,283 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:26,288 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:29,275 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:49:29,282 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : install openv-server Client Cert] ************************************************************************************************************************************************************************* +2023-05-10 15:49:29,301 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:29,310 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:29,321 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:29,326 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:49:35,373 p=46395 u=rob n=ansible | changed: [ovpn-server] +2023-05-10 15:49:35,381 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : generate openv-server DH] ********************************************************************************************************************************************************************************* +2023-05-10 15:49:35,406 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:49:35,414 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:49:35,423 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:49:35,428 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:03,970 p=46513 u=rob n=ansible | persistent connection idle timeout triggered, timeout value is 120 secs. +See the timeout setting options in the Network Debug and Troubleshooting Guide. +2023-05-10 15:51:03,970 p=46514 u=rob n=ansible | persistent connection idle timeout triggered, timeout value is 120 secs. +See the timeout setting options in the Network Debug and Troubleshooting Guide. +2023-05-10 15:51:04,081 p=46513 u=rob n=ansible | shutdown complete +2023-05-10 15:51:04,081 p=46514 u=rob n=ansible | shutdown complete +2023-05-10 15:51:15,179 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:51:15,186 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : install openv-server DH] ********************************************************************************************************************************************************************************** +2023-05-10 15:51:15,206 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:15,214 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:15,225 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:51:15,229 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:20,903 p=46395 u=rob n=ansible | changed: [ovpn-server] +2023-05-10 15:51:20,913 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : create ldap-auth.config] ********************************************************************************************************************************************************************************** +2023-05-10 15:51:20,938 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:20,947 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:20,956 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:51:20,961 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:22,675 p=46508 u=rob n=p=46508 u=rob | paramiko [ovpn-server] | Connected (version 2.0, client OpenSSH_9.2p1) +2023-05-10 15:51:22,982 p=46508 u=rob n=p=46508 u=rob | paramiko [ovpn-server] | Authentication (publickey) successful! +2023-05-10 15:51:23,960 p=46508 u=rob n=p=46508 u=rob | paramiko [ovpn-server] | Connected (version 2.0, client OpenSSH_9.2p1) +2023-05-10 15:51:24,239 p=46508 u=rob n=p=46508 u=rob | paramiko [ovpn-server] | Authentication (publickey) successful! +2023-05-10 15:51:24,554 p=46395 u=rob n=ansible | changed: [ovpn-server] +2023-05-10 15:51:24,562 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : setup openv-server] *************************************************************************************************************************************************************************************** +2023-05-10 15:51:24,585 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:24,594 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:24,604 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:51:24,608 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:36,392 p=46395 u=rob n=ansible | [WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device including the indentation + +2023-05-10 15:51:36,392 p=46395 u=rob n=ansible | changed: [ovpn-server] +2023-05-10 15:51:36,400 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : generate openvpn client conifg] *************************************************************************************************************************************************************************** +2023-05-10 15:51:36,425 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:36,433 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:36,443 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:51:36,447 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:37,890 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:51:37,899 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : ansible.builtin.set_fact] ********************************************************************************************************************************************************************************* +2023-05-10 15:51:37,922 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:37,931 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:37,941 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:51:37,946 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:38,970 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:51:38,980 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : debug] **************************************************************************************************************************************************************************************************** +2023-05-10 15:51:39,012 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:39,018 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:39,022 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:51:39,027 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:40,051 p=46395 u=rob n=ansible | ok: [ovpn-server] => { + "msg": "client\nnobind\nremote 198.51.100.254 1194\nremote-cert-tls server\nproto udp\ndev tun\ndev-type tun\npersist-key\npersist-tun\nverb 3\n\n# Encryption options\n\nkeysize 256\ncomp-lzo no\n\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIFnTCCA4WgAwIBAgIUORUZbBsuy0QupoJFJgXenSJ9AQQwDQYJKoZIhvcNAQEL\nBQAwVzELMAkGA1UEBhMCR0IxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQBgNVBAcM\nCVNvbWUtQ2l0eTENMAsGA1UECgwEVnlPUzEQMA4GA1UEAwwHdnlvcy5pbzAeFw0y\nMzA1MTAxMzQ5MDlaFw0zMzA1MDcxMzQ5MDlaMFcxCzAJBgNVBAYTAkdCMRMwEQYD\nVQQIDApTb21lLVN0YXRlMRIwEAYDVQQHDAlTb21lLUNpdHkxDTALBgNVBAoMBFZ5\nT1MxEDAOBg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tvJYQ6/3ABW1o861jIg7XRi\nTsdyNMM0lRXuKm9bX4ZvLDoJfCxKPol7hntkWPooZlGT/t9p+ioFEw4IZK6Q2I2D\nIf6hITZpO13cELJxSWIeEt+UW+1EwWjllt9cN0hvy+Z7iznAdsgukfCZTuK+9uWH\nQfGYP6ef3dQ9UZbKrLLJ6zgWYW5jO/UVN8/VgFX6h7vLSnKxxj+s0MZo4d/wQF99\nKGMCggEACAWOCIerQRC51zo8eXOB65mmpR0nX/VuWCZw4uIo5tVZ47JskPIH9MTy\nd/OLbHDa3esJjmZawSl0lI0j7p/yY+J9TEJyOCUU9PCDUw+BeJ39/VqW/fyBn8gI\n1cC3BnPkDf2HnbgHxaCP37sy/aHs7Xn/bNDaLksEDWDblFCQ5tYqGbZhxUNnsx2x\n3z/aYJVmx0lkKXSA+8rKeAk+OnDHUjlJjpRIcAsQJE6Ni+2cHbYygVPXiFbbKk+2\nekNwYkhMZ+DP+t+uY5ZRfwq0jjIrh+5fyw26yG9PoXspGoqPCTcQ9BEqU88J6ziF\nrxWXbmsYdR1dnKCZXcKJVKqJIFCnyg==\n-----END PRIVATE KEY-----\n\n</key>" +} +2023-05-10 15:51:40,059 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : debug] **************************************************************************************************************************************************************************************************** +2023-05-10 15:51:40,091 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:40,099 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:40,100 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:51:40,108 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:41,160 p=46395 u=rob n=ansible | network_os is set to vyos +2023-05-10 15:51:41,163 p=46395 u=rob n=ansible | [WARNING]: ansible-pylibssh not installed, falling back to paramiko + +2023-05-10 15:51:41,169 p=46395 u=rob n=ansible | ok: [client] => { + "msg": { + "changed": false, + "skip_reason": "Conditional result was False", + "skipped": true + } +} +2023-05-10 15:51:41,175 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : install Client Cert] ************************************************************************************************************************************************************************************** +2023-05-10 15:51:41,200 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:41,210 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:41,218 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:51:41,227 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:42,267 p=46644 u=rob n=ansible | [DEPRECATION WARNING]: PlayContext.verbosity is deprecated, use +ansible.utils.display.Display.verbosity instead. This feature will be removed +in version 2.18. Deprecation warnings can be disabled by setting +deprecation_warnings=False in ansible.cfg. +2023-05-10 15:51:42,938 p=46644 u=rob n=p=46644 u=rob | paramiko [client] | Connected (version 2.0, client OpenSSH_9.2p1) +2023-05-10 15:51:43,304 p=46644 u=rob n=p=46644 u=rob | paramiko [client] | Authentication (publickey) successful! +2023-05-10 15:51:51,002 p=46395 u=rob n=ansible | changed: [client] +2023-05-10 15:51:51,010 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : install CA on Client] ************************************************************************************************************************************************************************************* +2023-05-10 15:51:51,035 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:51,043 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:51,051 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:51:51,060 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:51:55,745 p=46395 u=rob n=ansible | changed: [client] +2023-05-10 15:51:55,753 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : setup client] ********************************************************************************************************************************************************************************************* +2023-05-10 15:51:55,778 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:51:55,786 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:51:55,793 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:51:55,802 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:05,361 p=46395 u=rob n=ansible | changed: [client] +2023-05-10 15:52:05,371 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: Login to EVE-NG and get Cookie] ******************************************************************************************************************************************************** +2023-05-10 15:52:05,401 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:05,409 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:05,412 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:05,417 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:07,968 p=46395 u=rob n=ansible | ok: [eveng] +2023-05-10 15:52:07,978 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: stop nodes id] ************************************************************************************************************************************************************************* +2023-05-10 15:52:08,013 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:52:08,016 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:08,018 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:08,023 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:08,030 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:08,034 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: wait after stop] *********************************************************************************************************************************************************************** +2023-05-10 15:52:08,047 p=46395 u=rob n=ansible | Pausing for 5 seconds +2023-05-10 15:52:08,048 p=46395 u=rob n=ansible | (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
+2023-05-10 15:52:13,060 p=46395 u=rob n=ansible | ok: [eveng] +2023-05-10 15:52:13,069 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: start nodes id] ************************************************************************************************************************************************************************ +2023-05-10 15:52:13,106 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:52:13,108 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:13,110 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:13,116 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:13,123 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:13,126 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: wait after start] ********************************************************************************************************************************************************************** +2023-05-10 15:52:13,139 p=46395 u=rob n=ansible | Pausing for 5 seconds +2023-05-10 15:52:13,139 p=46395 u=rob n=ansible | (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
+2023-05-10 15:52:18,152 p=46395 u=rob n=ansible | ok: [eveng] +2023-05-10 15:52:18,162 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: wait, b/c the ping often failed without a short break] ********************************************************************************************************************************* +2023-05-10 15:52:18,182 p=46395 u=rob n=ansible | Pausing for 30 seconds +2023-05-10 15:52:18,183 p=46395 u=rob n=ansible | (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
+2023-05-10 15:52:48,196 p=46395 u=rob n=ansible | ok: [eveng] +2023-05-10 15:52:48,206 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: do ping test] ************************************************************************************************************************************************************************** +2023-05-10 15:52:48,243 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:52:48,246 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:48,246 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:48,257 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:53,912 p=46395 u=rob n=ansible | ok: [client] => (item=192.168.1.1) +2023-05-10 15:52:53,921 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: execute test commands] ***************************************************************************************************************************************************************** +2023-05-10 15:52:53,947 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:52:53,956 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:53,958 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:53,962 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:53,971 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:53,974 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: register stdout commands] ************************************************************************************************************************************************************** +2023-05-10 15:52:53,999 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:52:54,002 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:54,010 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:54,016 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:56,105 p=46395 u=rob n=ansible | ok: [ovpn-server] => (item={'name': 'show_client', 'command': 'show openvpn server'}) +2023-05-10 15:52:56,113 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: Set variables] ************************************************************************************************************************************************************************* +2023-05-10 15:52:56,144 p=46395 u=rob n=ansible | skipping: [eveng] +2023-05-10 15:52:56,145 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:56,152 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:56,160 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:57,191 p=46395 u=rob n=ansible | ok: [ovpn-server] +2023-05-10 15:52:57,203 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: make sure output dir exist] ************************************************************************************************************************************************************ +2023-05-10 15:52:57,237 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:57,246 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:57,248 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:57,278 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:57,510 p=46395 u=rob n=ansible | ok: [eveng -> localhost] +2023-05-10 15:52:57,513 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: make sure output include dir exist] **************************************************************************************************************************************************** +2023-05-10 15:52:57,536 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:57,547 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:57,547 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:57,555 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:57,742 p=46395 u=rob n=ansible | ok: [eveng -> localhost] +2023-05-10 15:52:57,746 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: Get timestamp from the system] ********************************************************************************************************************************************************* +2023-05-10 15:52:57,765 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:57,771 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:57,774 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:57,779 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:58,651 p=46395 u=rob n=ansible | changed: [eveng] +2023-05-10 15:52:58,660 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: Set variables] ************************************************************************************************************************************************************************* +2023-05-10 15:52:58,690 p=46395 u=rob n=ansible | ok: [eveng] +2023-05-10 15:52:58,698 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:58,701 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:58,701 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:58,706 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:58,711 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: generate lab rst file] ***************************************************************************************************************************************************************** +2023-05-10 15:52:58,734 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:58,742 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:58,745 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:58,750 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:59,270 p=46395 u=rob n=ansible | changed: [eveng -> localhost] +2023-05-10 15:52:59,275 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: find all *.conf files in Lab] ********************************************************************************************************************************************************** +2023-05-10 15:52:59,298 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:59,306 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:59,308 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:59,314 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:59,568 p=46395 u=rob n=ansible | ok: [eveng -> localhost] +2023-05-10 15:52:59,574 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: copy all *.conf files] ***************************************************************************************************************************************************************** +2023-05-10 15:52:59,599 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:52:59,609 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:52:59,611 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:52:59,618 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:52:59,995 p=46395 u=rob n=ansible | ok: [eveng -> localhost] => (item={'path': 'labs/OpenVPN_with_LDAP/ovpn-server.conf', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 501, 'gid': 20, 'size': 810, 'inode': 3231536, 'dev': 16777229, 'nlink': 1, 'atime': 1682786301.5902777, 'mtime': 1682786299.53471, 'ctime': 1682786299.53471, 'gr_name': 'staff', 'pw_name': 'rob', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False}) +2023-05-10 15:53:00,389 p=46395 u=rob n=ansible | ok: [eveng -> localhost] => (item={'path': 'labs/OpenVPN_with_LDAP/client.conf', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 501, 'gid': 20, 'size': 477, 'inode': 3231532, 'dev': 16777229, 'nlink': 1, 'atime': 1682681063.1554656, 'mtime': 1682681061.5118814, 'ctime': 1682681061.5118814, 'gr_name': 'staff', 'pw_name': 'rob', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False}) +2023-05-10 15:53:00,395 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: find all *.config files in Lab] ******************************************************************************************************************************************************** +2023-05-10 15:53:00,417 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:53:00,425 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:53:00,427 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:53:00,432 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:53:00,617 p=46395 u=rob n=ansible | ok: [eveng -> localhost] +2023-05-10 15:53:00,622 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: copy all *.config files] *************************************************************************************************************************************************************** +2023-05-10 15:53:00,646 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:53:00,656 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:53:00,658 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:53:00,664 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:53:01,034 p=46395 u=rob n=ansible | changed: [eveng -> localhost] => (item={'path': 'labs/OpenVPN_with_LDAP/ldap-auth.config', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 501, 'gid': 20, 'size': 241, 'inode': 7385173, 'dev': 16777229, 'nlink': 1, 'atime': 1682687502.4956439, 'mtime': 1682687500.6057715, 'ctime': 1682687500.6057715, 'gr_name': 'staff', 'pw_name': 'rob', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False}) +2023-05-10 15:53:01,040 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: find all *.png files in Lab] *********************************************************************************************************************************************************** +2023-05-10 15:53:01,063 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:53:01,071 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:53:01,074 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:53:01,079 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:53:01,259 p=46395 u=rob n=ansible | ok: [eveng -> localhost] +2023-05-10 15:53:01,265 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: copy all *.png files] ****************************************************************************************************************************************************************** +2023-05-10 15:53:01,289 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:53:01,298 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:53:01,300 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:53:01,306 p=46395 u=rob n=ansible | skipping: [ldap-server] +2023-05-10 15:53:01,674 p=46395 u=rob n=ansible | ok: [eveng -> localhost] => (item={'path': 'labs/OpenVPN_with_LDAP/topology.png', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 501, 'gid': 20, 'size': 40891, 'inode': 7535943, 'dev': 16777229, 'nlink': 1, 'atime': 1682894454.9541955, 'mtime': 1682781250.8242838, 'ctime': 1682781303.849814, 'gr_name': 'staff', 'pw_name': 'rob', 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False}) +2023-05-10 15:53:01,679 p=46395 u=rob n=ansible | TASK [eve-ng-lab-test : OpenVPN_with_LDAP: copy ansible log files] **************************************************************************************************************************************************************** +2023-05-10 15:53:01,701 p=46395 u=rob n=ansible | skipping: [vyos-oobm] +2023-05-10 15:53:01,708 p=46395 u=rob n=ansible | skipping: [ovpn-server] +2023-05-10 15:53:01,710 p=46395 u=rob n=ansible | skipping: [client] +2023-05-10 15:53:01,716 p=46395 u=rob n=ansible | skipping: [ldap-server] diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.rst b/docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.rst new file mode 100644 index 00000000..0322b301 --- /dev/null +++ b/docs/configexamples/autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP.rst @@ -0,0 +1,265 @@ +.. _examples-OpenVPN-with-LDAP: + +################# +OpenVPN with LDAP +################# + +| Testdate: 2023-05-10 +| Version: 1.4-rolling-202304280615 + +This LAB show how to uwe OpenVPN with a Active Directory authentication backend. + +The Topology are consists of: + * Windows Server 2019 with a running Active Directory + * VyOS as a OpenVPN Server + * VyOS as Client + +.. image:: _include/topology.png + :alt: OpenVPN with LDAP topology image + +Active Directory on Windows server +================================== + +The Lab asume a full running Active Directory on the Windows Server. +Here are some PowerShell commands to quickly add a Test Active Directory. + +.. code-block:: powershell + + # install the Active Directory Server role + Install-WindowsFeature AD-Domain-Services -IncludeManagementTools + + # install the Active Directory Server role + Install-ADDSForest -DomainName "vyos.local" -DomainNetBiosName "VYOS" -InstallDns:$true -NoRebootCompletion:$true + + # create test user01 and binduser + New-ADUser binduser -AccountPassword(Read-Host -AsSecureString "Input Password") -Enabled $true + New-ADUser user01 -AccountPassword(Read-Host -AsSecureString "Input Password") -Enabled $true + + +Configuration VyOS as OpenVPN Server +==================================== + +In this example OpenVPN will be setup with a client certificate and username / password authentication. + +First a CA, a signed server and client ceftificate and a Diffie-Hellman parameter musst be generated and installed. +Please look :ref:`here <configuration/pki/index:pki>` for more information. + +| Add the LDAP plugin configuration file `/config/auth/ldap-auth.config` +| Check all possible settings `here <https://github.com/threerings/openvpn-auth-ldap/blob/master/auth-ldap.conf>`_ + +.. literalinclude:: _include/ldap-auth.config + :language: none + + +Now generate all required certificates on the ovpn-server: + +first the PCA + +.. code-block:: none + + vyos@ovpn-server# run generate pki ca install OVPN-CA + +after this create a signed server and a client certificate + +.. code-block:: none + + vyos@ovpn-server# run generate pki certificate sign OVPN-CA install SRV + vyos@ovpn-server# run generate pki certificate sign OVPN-CA install CLIENT + +and last the DH Key + +.. code-block:: none + + vyos@ovpn-server# run generate pki dh install DH + +after all these steps the config look like this: + +.. code-block:: none + + set pki ca OVPN-CA certificate 'MIIFnTCCA4WgAwIBAgIUORUZbBsuy0QupoJFJgXenSJ9AQQwDQYJKoZIhvcNAQELBQAwVzELMAkGA1UEBhMCR0IxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQBgNVBAcMCVNvbWUtQ2l0eTENMAsGA1UECgwEVnlPUzEQMA4GA1UEAwwHdnlvcy5pbzAeFw0yMzA1MTAxMzQ5MDlaFw0zMzA1MDcxMzQ5MDlaMFcxCzAJBgNVBAYTAkdCMRMwEQYDVQQIDApTb21lLVN0YXRlMRIwEAYDVQQHDAlTb21lLUNpdHkxDTALBgNVBAoMBFZ5T1MxEDAOBgNVBAMMB3Z5b3MuaW8wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsL2Xui58HXpl+jreqRxYfNDx1ER7umJ0iPw2dyBuJhP1Hy7vlwyZRvdRQd2AexK1BU2lTkYMWh58BU/dxmnnVhfwr34wUYP6Cs10tKhOxTNj/87wfCB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TxWw4f9WlInANS/B/BQY+Z7zWuEX2F5dnBij5hlMHwgRxq86m4Wm3WNXyux4plVqtW0Htrm0Cl5m+SV04bDA4D5SK22hW8L4FnnPQmlzBb1nRdpolw6SdZKs/bgSfV2wGMfe3Yh0afdOLg5AI2sfgAl/7fCPOXUwaDuqSOkXAEnGqzD+XbuMdJ7947HMumODkOty5j3ysn/hwIBAg==' + +Once all the required certificates and keys are installed, the remaining +OpenVPN Server configuration can be carried out. + +.. literalinclude:: _include/ovpn-server.conf + :language: none + +Client configuration +==================== + +One advantage of having the client certificate stored is the ability to create the client configuration. + +.. code-block:: none + + vyos@ovpn-server:~$ generate openvpn client-config interface vtun10 ca OVPN-CA certificate CLIENT + +save the output to a file and import it in nearly all openvpn clients. + +.. code-block:: none + + client + nobind + remote 198.51.100.254 1194 + remote-cert-tls server + proto udp + dev tun + dev-type tun + persist-key + persist-tun + verb 3 + + # Encryption options + + keysize 256 + comp-lzo no + + <ca> + -----BEGIN CERTIFICATE----- + MIIFnTCCA4WgAwIBAgIUORUZbBsuy0QupoJFJgXenSJ9AQQwDQYJKoZIhvcNAQEL + BQAwVzELMAkGA1UEBhMCR0IxEzARBgNVBAgMClNvbWUtU3RhdGUxEjAQBgNVBAcM + CVNvbWUtQ2l0eTENMAsGA1UECgwEVnlPUzEQMA4GA1UEAwwHdnlvcy5pbzAeFw0y + MzA1MTAxMzQ5MDlaFw0zMzA1MDcxMzQ5MDlaMFcxCzAJBgNVBAYTAkdCMRMwEQYD + VQQIDApTb21lLVN0YXRlMRIwEAYDVQQHDAlTb21lLUNpdHkxDTALBgNVBAoMBFZ5 + T1MxEDAOBgNVBAMMB3Z5b3MuaW8wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK + AoICAQCsL2Xui58HXpl+jreqRxYfNDx1ER7umJ0iPw2dyBuJhP1Hy7vlwyZRvdRQ + d2AexK1BU2lTkYMWh58BU/dxmnnVhfwr34wUYP6Cs10tKhOxTNj/87wfCBU1sCfv + O77l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/UDQtMCW/a2MQGB7m/kgCtICC0p8QsuGa8k/+SQOt + TI1VAj/dJ2O5XFhfFYgDtT/XXa6o3nEmWW+KTtggcvGIyP0Huxq+6ShxrwKkXI0n + WVffhVafcIkJnsUYTJu+Cx4KpilKV6+lzRQhK7UHfS0hErs0UQoZA4Fpz2uWukNe + 2fezl0IJThWPklGKOYriZyKb4i81i3occ1+9YpzKUrBD2ZI+t0Exp73/cfuQbiCO + iIu80S44myiZMfD2OPvjR0lBSoE= + -----END CERTIFICATE----- + + </cert> + + <key> + -----BEGIN PRIVATE KEY----- + MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCYEx3ZnntHRZW6 + IUgRfl8vF41qQip31xjYK/SYFPfpc0PEkfmfN13EaHLyV2rEn+IA2StOaRocl08f + Ss02mAGYtWQiuKWdX12fk3R4E4S3S1u4f8Qxd1lNKJsnQhogZLmt5JXXEX4T5wWK + 1mcLx5HlDmDcm0XszP3yBqZ6e+PmAV8mxmfGES5kYXP49UAybdAy71cX2+mJH1P7 + 7ki5z7buNGHvxLDobj3ErQvTJnLccd5rGR+Ne89sFkDb2PdumVEAl6KYZJITQN5M + VHM/oHVeRAgjvij2u699OaJRYL+3OCkjYoezJmARMijEu6QPghfXrRCbN1Zh0/Wr + xrSrwzFvF4aKqcU1kNeQjWhBRk8Qnoz7iPpxQqKrQDfWPTvwOq7C7jOhLmg19qo0 + lHwzJ1FVXJRO8i/CQ2RDkGcPe9DIvk54W132BMr1/ByS5OFYNiVHOu40w0YkH4Fr + iR4mj8q2F9rLD/C1P6DorOt/Jh6Pu2KSQknqhdEeJupUokCTTs/JJ2sKeNFLtYgP + UakK2E/DEbdqrgkZ9mlKJb0ZjQeHR0v9k1HRwoQXQ8cpS82xbWS5AolsCijb7t2Y + 8TLmtgI2HvdOK/kuHbqMODMXylBbKDGOhpbHBnkXjFyVVcdovufNMBf7Z/t5P/T1 + EvdBaBYUAonX8Ym/xKOKzk9N2sDxgQIDAQABA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Zw4uIo5tVZ47JskPIH9MTy + d/OLbHDa3esJjmZawSl0lI0j7p/yY+J9TEJyOCUU9PCDUw+BeJ39/VqW/fyBn8gI + 1cC3BnPkDf2HnbgHxaCP37sy/aHs7Xn/bNDaLksEDWDblFCQ5tYqGbZhxUNnsx2x + 3z/aYJVmx0lkKXSA+8rKeAk+OnDHUjlJjpRIcAsQJE6Ni+2cHbYygVPXiFbbKk+2 + ekNwYkhMZ+DP+t+uY5ZRfwq0jjIrh+5fyw26yG9PoXspGoqPCTcQ9BEqU88J6ziF + rxWXbmsYdR1dnKCZXcKJVKqJIFCnyg== + -----END PRIVATE KEY----- + + </key> + + +Monitoring +========== + +If the client is connect successfully you can check the output with + +.. code-block:: none + + vyos@ovpn-server:~$ show openvpn server + OpenVPN status on vtun10 + + Client CN Remote Host Tunnel IP Local Host TX bytes RX bytes Connected Since + ----------- ------------------ ----------- ------------------- ---------- ---------- ------------------- + client 198.51.100.1:40297 10.23.1.6 198.51.100.254:1194 4.8 KB 4.8 KB 2023-05-10 13:52:01 diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/client.conf b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/client.conf new file mode 100644 index 00000000..fb101b12 --- /dev/null +++ b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/client.conf @@ -0,0 +1,10 @@ +set interfaces ethernet eth1 address '198.51.100.1/24' +set interfaces openvpn vtun1 mode client +set interfaces openvpn vtun1 remote-host 198.51.100.254 +set interfaces openvpn vtun1 remote-port 1194 +set interfaces openvpn vtun1 protocol udp +set interfaces openvpn vtun1 tls certificate CLIENT +set interfaces openvpn vtun1 tls ca-certificate OVPN-CA + +set interfaces openvpn vtun1 authentication username 'user01' +set interfaces openvpn vtun1 authentication password 'P4ssw0rd123'
\ No newline at end of file diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ldap-auth.config b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ldap-auth.config new file mode 100644 index 00000000..0ae3dbc0 --- /dev/null +++ b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ldap-auth.config @@ -0,0 +1,13 @@ +<LDAP> +URL ldap://192.168.1.10 +BindDN bind_user@vyos.local +Password P4ssw0rd123 +Timeout 15 +TLSEnable no +FollowReferrals no +</LDAP> +<Authorization> +BaseDN "DC=vyos,DC=local" +SearchFilter "sAMAccountName=%u" +RequireGroup false +</Authorization>
\ No newline at end of file diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ovpn-server.conf b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ovpn-server.conf new file mode 100644 index 00000000..982ec355 --- /dev/null +++ b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/ovpn-server.conf @@ -0,0 +1,15 @@ +set interface ethernet eth1 address '192.168.1.1/24' +set interface ethernet eth2 address '198.51.100.254/24' +set interfaces openvpn vtun10 local-host '198.51.100.254' +set interfaces openvpn vtun10 local-port '1194' +set interfaces openvpn vtun10 mode 'server' +set interfaces openvpn vtun10 openvpn-option '--plugin /usr/lib/openvpn/openvpn-auth-ldap.so /config/auth/ldap-auth.config' +set interfaces openvpn vtun10 persistent-tunnel +set interfaces openvpn vtun10 protocol 'udp' +set interfaces openvpn vtun10 server push-route '192.168.1.0/24' +set interfaces openvpn vtun10 server subnet '10.23.1.0/24' + +set interfaces openvpn vtun10 tls ca-certificate OVPN-CA +set interfaces openvpn vtun10 tls certificate SRV +set interfaces openvpn vtun10 tls dh-params DH +set protocols static route 10.1.1.0/24 interface vtun10
\ No newline at end of file diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/topology.png b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/topology.png Binary files differnew file mode 100644 index 00000000..382e44f6 --- /dev/null +++ b/docs/configexamples/autotest/OpenVPN_with_LDAP/_include/topology.png diff --git a/docs/configexamples/index.rst b/docs/configexamples/index.rst index b3610d3a..80083fe1 100644 --- a/docs/configexamples/index.rst +++ b/docs/configexamples/index.rst @@ -18,7 +18,6 @@ This chapter contains various configuration examples: pppoe-ipv6-basic l3vpn-hub-and-spoke inter-vrf-routing-vrf-lite - openvpn-ldap qos segment-routing-isis nmp @@ -52,3 +51,4 @@ The process will do the following steps: autotest/tunnelbroker/tunnelbroker autotest/L3VPN_EVPN/L3VPN_EVPN autotest/Wireguard/Wireguard + autotest/OpenVPN_with_LDAP/OpenVPN_with_LDAP diff --git a/docs/configexamples/openvpn-ldap.rst b/docs/configexamples/openvpn-ldap.rst deleted file mode 100644 index 402ab7f1..00000000 --- a/docs/configexamples/openvpn-ldap.rst +++ /dev/null @@ -1,94 +0,0 @@ -:lastproofread: 2023-01-29 - -.. _examples-openvvpn-ldap: - -######################### -OpenVPN with LDAP example -######################### - -Configuration AD and a windows server -===================================== - -We aim to configure LDAP authentication between the VYOS router and Windows Server 2019 (role: Active Directory) when our customers connect to our privet network using the OpenVPN client. -Using the general schema for example: - -.. image:: /_static/images/mainschema.png - :width: 80% - :align: center - :alt: Network Topology Diagram - -.. code-block:: none - - VyOS - the main OpenVPN server - Winserver - windows server with role Active Directory - Win10-PC - OpenVPN customer with LDAP authentication - -First, we need to configure the AD service and create two accounts. One account for the LDAP adapter built into the VYOS router and a second even account for our test client. - -.. image:: /_static/images/ldapone.png - :width: 80% - :align: center - :alt: Network Topology Diagram - -Picture 1 - Adding the AD role - -.. image:: /_static/images/ldaptwo.png - :width: 80% - :align: center - :alt: Network Topology Diagram - -Picture 2 - Adding the AD role - -Configuration VyOS router -========================= - -Make the configuration file for the LDAP plugin. - -.. code-block:: none - - vyos@vyos:~$ sudo cat /config/auth/ldap-auth.config - <LDAP> - URL ldap://10.217.80.58 - BindDN userldap@corp.vyos.com - Password YourPass - Timeout 15 - TLSEnable no - FollowReferrals no - </LDAP> - <Authorization> - BaseDN "DC=corp,DC=vyos,DC=com" - SearchFilter "sAMAccountName=%u" - RequireGroup false - </Authorization> - - -**This specific example is for a windows server 2019**: - -* URL ldap://10.217.80.58 - The URL of your LDAP server -* BindDN userldap@corp.vyos.com - The BindDN of the users' directory -* BaseDN "DC=corp,DC=vyos,DC=com" - In the block <Authorization> notice your domain - -Make the main config for VyOS like VPN and Authorization server: - -.. code-block:: none - - set interfaces ethernet eth0 address 'dhcp' - set interfaces openvpn vtun10 local-port '1194' - set interfaces openvpn vtun10 mode 'server' - set interfaces openvpn vtun10 openvpn-option '--plugin /usr/lib/openvpn/openvpn-auth-ldap.so /config/auth/ldap-auth.config' - set interfaces openvpn vtun10 persistent-tunnel - set interfaces openvpn vtun10 protocol 'udp' - set interfaces openvpn vtun10 server push-route 192.168.0.0/16 - set interfaces openvpn vtun10 server subnet '10.23.1.0/24' - set interfaces openvpn vtun10 tls ca-cert-file '/config/auth/openvpn/ca.crt' - set interfaces openvpn vtun10 tls cert-file '/config/auth/openvpn/central.crt' - set interfaces openvpn vtun10 tls crl-file '/config/auth/openvpn/crl.pem' - set interfaces openvpn vtun10 tls dh-file '/config/auth/openvpn/dh.pem' - set interfaces openvpn vtun10 tls key-file '/config/auth/openvpn/central.key' - set protocols static interface-route 10.23.0.0/20 next-hop-interface vtun10 - set service ssh port '22' - -Next, you need to install and configure the configuration file for the windows/Linux OpenVPN client. After connecting to the VPN servers, you will be prompted to go through LDAP authorization. - -**To automatically generate the openVPN configuration file for windows clients, you can use this link:** -https://ovpnconfig.com.br/
\ No newline at end of file |