Using the Built-in OpenVPN Client on ASUS RT-AC66U Router to Connect to an Existing Linux OpenVPN Server
In this article, we will discuss how to use the built-in OpenVPN client on an ASUS RT-AC66U router to connect to an existing Linux OpenVPN server. This guide will provide detailed instructions on configuring the router's OpenVPN client and the Linux OpenVPN server. We will also cover key concepts and provide examples using code blocks where necessary.
Prerequisites
Before we begin, it is assumed that you have already installed an OpenVPN server on a Linux machine and that you are able to connect to it using an OpenVPN client on a Windows or Mac computer. It is also assumed that you have administrative access to the ASUS RT-AC66U router and that it is running the latest firmware.
Configuring the Linux OpenVPN Server
The first step is to ensure that the Linux OpenVPN server is properly configured to accept connections from the ASUS RT-AC66U router. This involves creating a certificate authority (CA), generating server and client certificates, and configuring the OpenVPN server.
To create a CA, run the following command:
$ sudo openssl req -x509 -newkey rsa:4096 -keyout ca.key -out ca.crt -days 3650 -nodes
This will create a new CA with a validity of 10 years. Next, generate the server certificate:
$ sudo openssl req -newkey rsa:4096 -nodes -keyout server.key -out server.csr
Sign the server certificate using the CA:
$ sudo openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 3650
Now, create a Diffie-Hellman parameters file:
$ sudo openssl dhparam -out dhparam.pem 4096
Finally, create the OpenVPN server configuration file:
$ sudo nano /etc/openvpn/server.conf
Add the following contents to the file:
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dhparam.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
Save and close the file. Start the OpenVPN server:
$ sudo systemctl start openvpn@server
Enable the OpenVPN server to start on boot:
$ sudo systemctl enable openvpn@server
Configuring the ASUS RT-AC66U Router's OpenVPN Client
Now that the Linux OpenVPN server is properly configured, we can move on to configuring the ASUS RT-AC66U router's OpenVPN client. Log in to the router's web interface and navigate to the VPN section.
Click on the OpenVPN Client tab and then click Add