Appendix C. Configuring a Separate VPN Server |
Command examples for CentOS are listed below. For other OS use equivalent commands. To configure a separate VPN server 1.Switch to account with administrative access to the system:
2.Install EPEL repository:
3.Install OpenVPN and Easy-RSA utility:
4.Change to the directory with installed Easy-RSA utility:
5.Create PKI key infrastructure:
6.Create root certificate authority (CA):
7.At the request Enter New CA Key Passphrase, set a password for signing certificates. 8.Generate a certificate request for the server without using a password:
9.Sign a CA request:
10.Enter the password from CA if it was set earlier. 11.Generate Diffie-Hellman key:
12.Copy created files to OpenVPN server directory:
13.Generate TLS Control Channel encryption key:
14.Generate keys for OpenVPN server client:
15.Copy client keys (vxcube.key, vxcube.crt) and server key (ca.crt) to the directory with Dr.Web vxCube distribution kit (directory ~/confs) from the following directories:
16.Create OpenVPN config file:
17.Start the server:
18.Make sure that server is running:
19.Make sure that server has IP forwarding enabled:
20.Force re-read the configuration of sysctl:
21.Make sure that there are no other services accepting connections from the external interface or access to them is blocked by the system firewall settings:
22.If there are such services, add a rule to block access to them from a VPN tunnel:
23.Configure masquerading for packets from a subnet of a VPN tunnel to the default interface:
|