Computer Tips - OpenVPN server setup on Fedora

Date: 2018dec29 OS: Linux Distro: Fedora Language: bash Q. OpenVPN server setup on Fedora A. I successfully setup OpenVPN on Fedora 29 using these instructions I changed the following: - Their "remote" is the server. Their "local" is the client. - Named my client "client1" so I can make others. - They downloaded easy-rsa with wget but Fedora 29 has it as a package. - I used my own DNS server rather than Google's. - Fedora has a systemd unit for the server called "openvpn-server" which uses folder /etc/openvpn/server so I used that unit and folder. I had to remake the keys a few times to get it right. So rather than manually copying them I made this script in /etc/openvpn/easy-rsa/dist
#!/bin/sh set -x TOP=/etc/openvpn KEYS=$TOP/easy-rsa/keys for NODE in server client1 client2; do if [[ ! -d $TOP/$NODE ]]; then mkdir $TOP/$NODE fi cd $KEYS cp dh2048.pem ca.crt $NODE.crt $NODE.key $TOP/$NODE cd $TOP cp myvpn.tlsauth $TOP/$NODE done # Copy client config to tmp for easy downloading for NODE in client1 client2; do if [[ -d /tmp/$NODE ]]; then rm -rf /tmp/$NODE fi cp -r $TOP/$NODE /tmp chmod -R a+r /tmp/$NODE done
I initially tried Wireguard but couldn't get it going. It is really quite and for security doesn't give errors. OpenVPN does which was crucial in making it work.