Installing OpenVPN Access Server on CentOS and Fedora


resolved
Public

This is a guide for installing the OpenVPN Access Server on redhat distributions (RHEL, CentOS, Fedora)

 

Install the appropriate Access Server RPM from https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html

rpm -ivh http://swupdate.openvpn.org/as/openvpn-as-2.0.12-CentOS6.x86_64.rpm

 

Set the OpenVPN administrator password
passwd openvpn

 

Access the administration page:

https://<IP Address>:943/admin

 

The username will be openvpn and the password is what you set above.

 

Access the connect page using the same login:

https://<IP Address>:943

 

Here you can download the profile and/or client to connect to the VPN.

 

Routing:

You may need to setup routing through your firewall for the OpenVPN subnet in VPN settings (Default: 172.27.240.0/20)

CentOS 6: Set iptables rule for routing the OpenVPN subnet:
iptables -t nat -A POSTROUTING -s 172.27.240.0/20 -o eth0 -j MASQUERADE
service iptables save

 

Fedora and CentOS7 using firewalld need a different command (todo)…

 

If you use APF Firewall, this would be placed in /etc/apf/postroute.rules:

$IPT -t nat -A POSTROUTING -s 172.27.240.0/20 -o eth0 -j MASQUERADE

Please login or Register to Submit Answer