Set up OpenVPN - how it works
With OpenVPN, you can set up a VPN on Windows 10 in just a few steps. Read in this practical tip how this works.
Set up OpenVPN - how it works
- First of all, you have to switch off the Windows firewall and assign a fixed IP to the router.
- Now change to the installation directory of OpenVPN and open the folder "easy-rsa". There rename the file "vars.bat.sample" to "vars.bat".
- Start the Windows command prompt as admin by right-clicking on it and choosing "Run as administrator". Type "cd C: \ Program Files \ OpenVPN" and press [Enter].
- Execute the following files by entering the name one after the other and confirming with [Enter]: vars.bat & clean-all.bat
- Then double-click the "build-ca.bat" file, which you can find in the main directory. Then enter the relevant data in the prompt. The "Country Name" is important here, where you enter "DE".
- To create the required parameters, you have to double-click the "build-dh.bat" file.
- Now you still need the keys for the server: Enter the command "build-key-server.bat", followed by your server name from step 5 and press [Enter].
- The client must also connect to the server. With the command "build-key.bat" followed by any name, such as "ChipClient" and [Enter], he gets the appropriate rights.
- To connect to the server you need three files, which you can find in the "keys" folder. In our example we need the files "ChipClient.crt", "ChipClient.key" and "ca.crt".
- Finally you have to create the following configuration file in the folder "C: \ Program Files \ OpenVPN \ config" with the name "server.ovpn": # Certificates ca "C: \\ Program Files \\ OpenVPN \\ easy-rsa \ \ keys \\ ca.crt "cert" C: \\ Program Files \\ OpenVPN \\ easy-rsa \\ keys \\ Servername.crt "key" C: \\ Program Files \\ OpenVPN \\ easy-rsa \ \ keys \\ Servername.key "dh" C: \\ Program Files \\ OpenVPN \\ easy-rsa \\ keys \\ dh1024.pem "# Server and network local 192.168.1.6 # LAN address of the server port 1194 proto udp dev tap server 192.168.10.0 255.255.255.0 #Subnetz ifconfig-pool-persist ipp.txt comp-lzo persist-key persist-tun keepalive 10 120 # Log status "C: \\ Program Files \\ OpenVPN \\ log \\ openvpn-status.log "log" C: \\ Program Files \\ OpenVPN \\ log \\ openvpn.log "log-append" C: \\ Program Files \\ OpenVPN \\ log \\ openvpn.log "verb 3
- Adjust the respective IP addresses and the name of the server so that everything fits.
- Then enter the command "net start OpenVPNService" in the command prompt to start OpenVPN.
In our next practical tip, we will compare IPSec and OpenVPN for you.