Template:Networking rutos configuration example openvpn bridge wifi ap use case
|
|
|
|---|---|
|
|
Configuration overview and prerequisites
Prerequisites:
- Two RUTX routers
- A Public Static or Public Dynamic IP address
- An end device to configure the router (PC, Laptop, Tablet, Smartphone)
The topology above depicts the OpenVPN scheme. The router with the Public IP address (RUTX) acts as the OpenVPN server and other RUTX acts as client. OpenVPN connects the networks of HQ Office and Remote Office. Remote Office will also have a separate WiFi AP for guests.
When the scheme is realized, remote office workers will be able to reach HQ’s internal network with all internal systems by connecting to the router via LAN port or by connecting to WiFi AP, which is used for work. All traffic apart guest WiFi is going to travel through VPN tunnel. Guest network traffic will go directly to WAN and it won't be possible to reach work network through there.
Configuring HQ office router
Before you start configuring the router turn on "Advanced WebUI" mode. You can do that by clicking the "Basic" button under "Mode", which is located at the top-right corner of the WebUI.
Note: You will need to do that in both, HQ and remote office routers.
OpenVPN
Generating Static key
|
Login to the router's WebUI, navigate to the Services → CLI page and do the following:
|
|
Write the following commands to create OpenVPN Static key, which will be used for authentication: 1) cd /etc/easy-rsa 2) openvpn --genkey --secret static.key |
Extracting the key
Linux
If you are using a Linux-based OS, extracting files from the router is simple. Just go to the directory on your PC where you want to relocate the files, right click anywhere and choose the Open in Terminal option. In the Terminal command line use the Secure Copy (scp) command to copy the files from the router. The full command should look something like this:
$ scp [email protected]:/etc/easy-rsa/static.key ./
The [email protected]:/etc/easy-rsa/static.key specifies the path to where the Static key is located (replace the IP address with your router's LAN IP); the ./ denotes that you want to copy the contents to the directory you are in at the moment.
Windows
Configuring OpenVPN server
Configuring remote office router
Before you start configuring the remote office router, set a static IP address on the device you are configuring the router with (e.g. 192.168.1.10). You can find instructions on how to do that here:
Note: make sure to switch back to automatic DNS and IP address obtaining when you are done configuring the router.
OpenVPN
LAN
|
Go to Network → Interfaces and press Edit next to your LAN interface: |
|
Apply the following steps:
|
Configuring OpenVPN client
Guest WiFi
Creating a new WiFi AP
|
Go to Network → Wireless. There create a new WiFi Access Point by pressing Add button (You can use either, 2.4GHz or 5GHz WiFi). Then you will be forwarded to the configuration window. |
|
Apply the following steps:
|
|
Now go to Network → Interfaces and press Edit next to your newly created LAN interface: |
|
Apply the following steps:
|
Editing Firewall rules
|
Navigate to Network → Firewall → General Settings. There create a new Zone rule by pressing Add button. Then you will be forwarded to the configuration window. |
|
Now apply the following configuration:
|




















