How to Configure WireGuard VPN on Omada Controller

How to Configure WireGuard VPN on Omada Controller

22 Reply
Re:How to Configure WireGuard VPN on Omada Controller
2023-11-20 11:20:05

  @Clive_A thanks again. I now have a remote iPad client working and a remote android as well, each with their own config files. Happy with the results. 

Paul
  1  
  1  
#22
Options
Linux Guide: How to Configure WireGuard VPN on Omada Controller.
2024-02-22 20:29:16 - last edited 2024-02-22 23:04:45

Following on from the original guide, for anyone having issues setting this up with a Linux client the following should help.   Tested in Debian 12.5 with gnome desktop env. But should also work in Ubuntu 22.04 LTS.

 

To create the private key on the client machine to paste in the below conf example.

install wireguard if not done so already.

 

sudo apt install wireguard –assume-yes

cd /etc/wiregaurd

 

if you get permission denied in the last step run sudo -i then try again.

 

(umask 077 && wg genkey > wg-private.key)

wg pubkey < wg-private.key > wg-public.key

cat wg-private.key

As well as gaining the wg-private.key in the last step you will also need the wg-public.key

this public key needs to be pasted into paste into the router on the create peer step later.

 

From the wireguard directory (assuming you know how to use nano text editor)

nano wg0.conf

(this can be renamed to whatever you like but must end in .conf)

paste in the following and edit according to the notes below.

 

 

-----------long version with comments

[Interface]

PrivateKey = <PASTE wg-private.key HERE>

 

## Client IP (no need to change unless this is second or third peer)

Address = 10.0.0.1/24

 

## Add A DNS server

DNS = 1.1.1.1

 

[Peer]

## PublicKey from wireguard tab in router (created from + Create New Wireguard option)

## You will also need to port forward the unique local IP address of the wireguard server chosen in ## the + Create New Wireguard step

PublicKey = <PASTE PUBLIC KEY HERE>

 

## to pass internet trafic 0.0.0.0 but for peer connection only use local IP of the server you want to access, or you can also specify comma separated IPs

AllowedIPs = 0.0.0.0/0

 

## Public IP of router and the port

Endpoint = <YOUR PUBLIC WAN IP:WG-PORT>

 

## Optional

PersistentKeepalive = 20

-----------

 

-----------Short Version

[Interface]

PrivateKey = <PASTE wg-private.key HERE>

Address = 10.0.0.1/24

DNS = 1.1.1.1

 

[Peer]

PublicKey = <PASTE PUBLIC KEY HERE>

AllowedIPs = 0.0.0.0/0

Endpoint = <YOUR PUBLIC WAN IP:WG-PORT

PersistentKeepalive = 20

-----------

 

run the following steps to import the config to the linux network

 

CONF_FILE="wg0.conf"

 

nmcli connection import type wireguard file "$CONF_FILE"

 

It should now be available to use in your network manager.

 

To remove the config if not working or no loger used from network manager run

 

nmcli connection delete wg0

 

You can add mutiple WG toggles in this way if you have many VPNs

 

 

I called my conf file oc200.conf not the default wg0.conf.  Also the gnome extension "WG indicator" is useful as it lights up red when a WG VPN is active.

 

 

 

 

You can also import the conf file with a GUI using this gnome extension, but best to manage it from the terminal.

 

 

 

 

 

 

  0  
  0  
#23
Options