Changes

From Amahi Wiki
Jump to: navigation, search
1,494 bytes added ,  14:06, 28 February 2017
The VPN client for Linux comes with the OpenVPN. It's invoked with a script.
This is the Save this script to use a file called myvpn.conf. It should be saved in your users home folder (replacing eg /home/joe). Replacing XYZ for the nickname of the HDA you are trying to connect to):
<pre><nowiki>
persist-key
persist-tun
ca ca-cert.crt cert AmahiHDAClientAmahi-Client-OpenVPN.crt key AmahiHDAClientAmahi-Client-OpenVPN.key
comp-lzo
verb 3
auth-user-pass
</nowiki></pre>
 
Be sure to also have a copy of the certificate files using the same names as the ''ca'', ''cert'', and ''key'' lines above:
 
The next step is to download the certificates. They can be found on the [[OpenVPN Client Certificates]] download page. Save them in your /home/username folder (where ''username'' is your main users name).
 
Then, as root, run the openvpn client software:
 
<pre><nowiki>
cd /home/username
openvpn --config myvpn.conf
</nowiki></pre>
 
Many messages should scroll by on your terminal screen and you should be requested for your username and password. Enter your HDA username here.
 
If you'd like to connect to the VPN without having to enter your username and password, here's what you need to do:
Create a file named ''credentials'' in the same directory as the above scripts. In it, write your username on the first line, and your password on the second line. Make it readable only by root:
 
<pre><nowiki>
sudo chown root:root credentials; sudo chmod 600 credentials
</nowiki></pre>
 
Then, as root, run the openvpn client software like this, instead of using the above commands:
 
<pre><nowiki>
cd /home/username
openvpn --config myvpn.conf --auth-user-pass credentials
</nowiki></pre>
 
Finally, if you'd like your VPN clients to get IP addresses in the same subnet as your HDA, and not in the 10.8.0.0/24 subnet (default), read this page: [[VPN Bridging]].
[[Category: VPN]]
12,424

edits