Concurrent WireGuard interfaces are indeed possible, although I am using a
Beta custom
S50wireguard
script which calls a single
wg-manager.sh
script as the three original scripts
wg-up
,
wg-down
and
wg-policy
are not very scalable.
e.g. Three remote Peers - New York, Hong Kong and Melbourne for testing...
In lieu of WireGuard
nvram equivalents of the OpenVPN variables
vpn_client?_addr=
vpn_client?_desc=
vpnc_clientlist=
etc.
'/jffs/configs/WireguardVPN_map' contains the remote Peer parameters used by my custom
S50wireguard
(no longer need to physically hack
S50wireguard
to define/export variables etc.)
Code:
# VPN Local Peer IP Remote Peer Socket DNS Comment
wg11 1st.xxx.xxx.xxx peer.USA.xxx.xxx:51820 193.138.218.74 # Mullvad USA New York
wg12 1st.xxx.xxx.xxx peer.Asia.xxx.xxx:51820 * # Mullvad Asia Hong Kong
wg13 2nd.xxx.xxx.xxx/32 peer.Oz.xxx.xxx:51820 * # Mullvad Oz Melbourne
wg14
wg15
# The following default 'wg0' interface retained for backward compatibility!
wg0 xxx.xxx.xxx.xxx peer.NY.xxx.xxx:51820 193.138.218.74 # Mullvad New York
Initiating the three Peers...
Code:
./S50wireguard start client 1
./S50wireguard start client 2
./S50wireguard start client 3
then provide an annotated summary
View attachment 31316
Using cURL, Mullvad allows up to five
IP/Key-pairs to be quickly generated per customer, and there is no issue hosting multiple interfaces for a single
IP/Key-pair, nor is it an issue using the same remote port with different servers to create a unique IP socket.
I chose to use a similar naming convention for the WireGuard interfaces
e.g.
wg1x for the remote Peers and
wg2x for hosting a local Peer, and rather than use table
117, arbitrarily chose Selective Routing tables
121 thru'
125.
Manually managing the state of the Peer connections together with the
RPDB Selective Routing rules isn't too painful, as long as you are aware that without the convenience of RMerlin's OpenVPN
GUI to correctly prioritise the
WAN rules over the Peer rules, then be mindful of the order when migrating/replicating OpenVPN
RPDB rules.