...
Install and configure the openvpn package for your distribution:
Code Block $ sudo apt-get install openvpn
Download the Rapid Access Cloud VPN configuration files. VPN access is configured per region:
Unzip the file and note the path where it is located. move the contents to
/etc/openvpn
would be a good location to store it.You can either interactively enter your Rapid Access Cloud account credentials each time or store the credentials in a text file.
To interactively enter Rapid Access Cloud account credentials each time/
.Start the OpenVPN client service:
openvpnCode Block sudo
--config /path/to/config.ovpn <enter RAC email> <enter RAC password> # Put process in background <ctrl-z> # suspend process bg # resume suspended process and sends to background disown -h # process is not killed when terminal is shutdownsystemctl
To store your credentials in a text file so you don't have to enter it each time. Replace rac-username and rac-password with the username/email and password for your Rapid Access Cloud account.
status openvpn@client Enter Auth Username: Enter Auth Password:
Enter your Rapid Access Cloud username/email address and password to authenticate.
sudo su touch /etc/openvpn/rac-credentials printf '%s\n' 'rac-username' 'rac-password' > /etc/openvpn/rac-credentials sed -i 's/auth-user-pass/auth-user-pass \/etc\/openvpn\/rac-credentials/g' /path/to/config.ovpn # To start vpn in background nohup openvpn --config /path/to/config.ovpn & # process output will be logged in nohup.outCode Block To check whether the VPN is working, open a terminal and attempt to ping your private IP address. For example, “ping 10.0.0.73”.
Note Make sure that the security group for the instance has rules to allow ingress ICMP.
To disconnect from the VPN:
Code Block sudo killall openvpn