What's new

Wireguard max number of clients

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

vlord

Regular Contributor
Is there a config parameter that would allow me to bypass the 10 client max restriction for Wireguard VPN server? I leverage the on-demand wireguard client to route all my household devices through our home router for parental controls and need a couple more slots.
 
Is there a config parameter that would allow me to bypass the 10 client max restriction for Wireguard VPN server? I leverage the on-demand wireguard client to route all my household devices through our home router for parental controls and need a couple more slots.
The simple answer is no.

Alittle more complicated answer is that it should be possible to add these yourself using merlin hook-scripts. There is a script hook where you get to modify the config file before it is started. But it's not really a beginners task.
 
What is the hooks file that would allow editing of the /www/VPN/vpns_wireguard.js prior to mounting?
 
What is the hooks file that would allow editing of the /www/VPN/vpns_wireguard.js prior to mounting?
While you can duplicate, modify and mount your own web-page it's not going to cut it. the web page itself does nothing more than populate the nvram variables and restart services. The firmware will still not use any extra variables you put in place.

what I had in mind is for you to use i.e.
Code:
/jffs/scripts/wgserver.postconf
it is called after the firmware have created the config file, but before wg is started. so it allows you to modify the config file (path as $1 I presume) before wg is started. so, you could manually create more peers then add them to the peer using this. Please note that this is a blocking script, so fw waits for execution to complete before continues. so if this script for some reason does not complete, Wireguard server will not be started.

another option is to use wg userspace tool to add more peers after wireguard server is started, like:
Code:
wg set <interface> [listen-port <port>] [fwmark <fwmark>] [private-key <file-path>] [peer <base64-public-key> [remove] [preshared-key <file-path>] [endpoint <ip>:<port>] [persistent-keepalive <interval seconds>] [allowed-ips <ip1>/<cidr1>[,<ip2>/<cidr2>]...]
regardless of method, you will need to manually create the keys and write the server peer config to be added. you will also have to manually write the client config file to import to your clients.

sources:
https://www.snbforums.com/threads/d...wireguard-client-is-started.87152/post-869544
https://github.com/RMerl/asuswrt-merlin.ng/blob/master/release/src/router/rc/wireguard.c
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top