revlis.nl
Stash of notes about OSS, OSes, virtualization, dev hobby projects &c
November 25, 2016 — 21:31
OpenVPN Access Server is quite easy and fast to setup and includes a web gui.
Download:
- Server:
- All OpenVPN Access Server downloads come with 2 free client connections for testing purposes.
- https://openvpn.net/index.php/access-server/download-openvpn-as-sw/
- Client:
- Download “OpenVPN-Connect” from Server
- For Windows there’s also “OpenVPN-GUI” which comes included with the Installer:
- https://openvpn.net/index.php/open-source/downloads.html
- https://build.openvpn.net/downloads/snapshots/openvpn-install-master-xxx-x86_64.exe (supports newer functions like OTP)
Configuration:
Clickety click in the gui, plus some hardening:
Server:
Client:
auth SHA512 cipher AES-256-CBC
Connect with SSH + SOCKS Proxy + OTP:
$ ssh -D 1 to remote host
Ban user:
Ban a user from logging into the VPN or Web server
(doesn’t affect a user who is already logged in — for this, use DisconnectUser below):
/usr/local/openvpn_as/scripts/sacli --user <USER> --key prop_deny --value true UserPropPut
Re-admit a user who was previously banned:
/usr/local/openvpn_as/scripts/sacli --user <USER> --key prop_deny --value false UserPropPut
Disconnect a user:
/usr/local/openvpn_as/scripts//sacli --user <USER> --key prop_deny --value true UserPropPut
Set client cert keysize:
/usr/local/openvpn_as/scripts/sa --keysize=4096 Init
Generating init scripts:
/usr/local/openvpn_as/scripts/openvpnas_gen_init [--auto]
Google Authenticator:
Unlock a secret:
./sacli -u <USER> --lock 0 GoogleAuthLock
Lock a secret:
./sacli -u <USER> --lock 1 GoogleAuthLock
Generate a new, unlocked secret:
./sacli -u <USER> --lock 0 GoogleAuthRegen
Generate a new, locked secret:
./sacli -u <USER> --lock 1 GoogleAuthRegen
Enable Google Authenticator for all accounts:
./sacli --key vpn.server.google_auth.enable --value true ConfigPut
Enable for 1 user:
./sacli --user <USER_OR_GROUP> --key prop_google_auth --value true UserPropPut
Disable:
./sacli --key vpn.server.google_auth.enable --value false ConfigPut
Disable for 1 user:
./sacli --user <USER_OR_GROUP> --key prop_google_auth --value false UserPropPut
Revoke and reissue secret:
./sacli -u <USER> GoogleAuthRegen
Retrieve current user properties:
./confdba -us -p
Port sharing:
Advanced VPN Settings: port-share 127.0.0.1 10443
(tcp mode only)