Tested only on a netgate SG-4860-1U
apt-get update apt-get install openvpn openssl curl jq vim --no-install-recommends
wget --no-check-certificate https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.4/EasyRSA-3.0.4.tgz tar -xvzf EasyRSA-3.0.4.tgz rm EasyRSA-3.0.4.tgz mv EasyRSA-3.0.4/ /etc/openvpn/easy-rsa/
vim /etc/openvpn/server/port_number.key vim /etc/openvpn/server/port_number.crt chmod 660 port_number.key port_number.crt #both files must belong to root:root
openssl dhparam -out /etc/openvpn/server/dh.pem 2048
openvpn --genkey --secret /etc/openvpn/server/ta.key
vim /etc/openvpn/server/ca.crt
cp /home/acdsn/git/fw-rules/port_number/server.conf
vim /etc/init.d/openvpn systemctl daemon-reload /etc/init.d/openvpn start #check with ps -Af | grep openvpn
touch /etc/openvpn/server/ca_crl.pem chmod 666 ca_crl.pem
mkdir /etc/acdsn/conf.d/client mkdir /etc/acdsn/conf.d/spool/client
@daily /usr/bin/curl https://www.easygateway.co/ca_crl.pem -o /etc/openvpn/server/ca_crl.pem */5 * * * * /bin/bash /home/acdsn/git/easygateway-scripts/minicentral/sync_eG/sync.sh -t 30 -p ORG_TOKEN -mCc
#iptables -t nat -A POSTROUTING -o lan1 -j MASQUERADE #iptables -t nat -A POSTROUTING -o lan2 -j MASQUERADE #iptables -t nat -A POSTROUTING -o lan3 -j MASQUERADE #iptables -t nat -A POSTROUTING -o lan4 -j MASQUERADE #iptables -t nat -A POSTROUTING -o lan5 -j MASQUERADE
/home/acdsn/git/fw-rules/port_number/port_number.fw reload