ZebMcKayhan
Very Senior Member
I can't remember but you might need to enable it from wgm cli:I just installed wgm and can't find gui
Code:
E:Option ==> www mount
It should appear under the addons tab in the gui.
I can't remember but you might need to enable it from wgm cli:I just installed wgm and can't find gui
E:Option ==> www mount
it worked but that's new for me, last time I installed it, gui was on by default,I can't remember but you might need to enable it from wgm cli:
Code:E:Option ==> www mount
It should appear under the addons tab in the gui.
? = About Configuration (WebUI http://://router_ip:/)
? = About Configuration (WebUI http://://router_ip:/user9.asp)
as you are asking this question, I assume you wish to not delete your old peer and import the new? as that would be the most straight forward way.do anyone know how can I update/replace the private key for my client peer?
/opt/etc/wireguard.d/wg11.conf
/opt/etc/wireguard.d/WireGuard.db
nano /opt/etc/wireguard.d/wg11.conf
thanks for your explanation, yes, I don't want to delete the peer and re-import the config to it. The wg config from my service provide valid only 2 hours every time, once the wg tunnel need to reconnect after then I need obtain an new private key. So want to update just the private key of the peer config and remain all others same.as you are asking this question, I assume you wish to not delete your old peer and import the new? as that would be the most straight forward way.
the keys exists in 2 places.
mostly the config used for running the peer will be in:
for wg11.Code:/opt/etc/wireguard.d/wg11.conf
but wgm also keeps it in its sql database
the SQL database is mainly used by WGM when setting up everything around the peer (firewall rules, policy rules et.c)Code:/opt/etc/wireguard.d/WireGuard.db
you can try to stop the peer, exist wgm and update the keys in the config file by, i.e.:
but Im not sure wgm will notice the mismatch and throw some errors. in that case you may need to update the SQL database as well.Code:nano /opt/etc/wireguard.d/wg11.conf
I have sometimes copied the SQL database to my android phone and used "SQLite Editor" to update it and put it back and it works good, its well structured so its obvious what to change and where.
you should probably stop all peers and exit wgm before doing this, and make a safety copy of the database before you start changing it.
Ouch, 2h!The wg config from my service provide valid only 2 hours every time, once the wg tunnel need to reconnect after then I need obtain an new private key.
sorry for my expression not clearly, the key valid for 2h for connection, once connected will persistent keep alive until the link broken and need a new key to rebuild the connection.Ouch, 2h!
I would be concerned about all the hassle I would need to go through to get it working so I would probably not use it.
Perhaps worth your time to write a script that updates both wg11.conf and the sql database - and possibly retrieves a new config file - cron job every 2h.
All bits and pieces about changes to the files are already in wgm script.
I really thought it would be enough with wg11.conf. out of curiosity, what error message did you get?
That's wierd. Are you sure everything turned out correctly?i try to update both wg11.conf and sqldb, but unfortunetely not working as expected. the sympton is 0 bytes transfer.
wg showconf wg11
yes, it's really new key, but transfer 0That's wierd. Are you sure everything turned out correctly?
I know that wgm "builds" a new config, which is basically wg11.conf, with removed stuff that Wireguard itself does not handle, like dns and others, and runs it from /tmp. I did not check if it recreates it on start if it already exists.
When your updated peer is running you could run directly in shell:
Code:wg showconf wg11
It will output the config it's currently using. Compare your keys, are they still the old keys?
You basically only need the keys and endpointort for the handshakes to work. Could this new config be not active? You can test it on your phone/computer to be sure.yes, it's really new key, but transfer 0
I think it should be something wrong during my update steps, but I don't which is it.
[Interface]
ListenPort = 33922
PrivateKey = xxx <-- new key
[Peer]
PublicKey = XvfaTRG0IMezPQNzNvtW4Vn2T2RTEijsR1NhoM0XPmc=
AllowedIPs = 0.0.0.0/0
Endpoint = 149.88.98.226:51820
PersistentKeepalive = 21
but trasfer 0
interface: wg11 EndPoint=149.88.98.226:51820 172.21.4.129 # N/A
peer: XvfaTRG0IMezPQNzNvtW4Vn2T2RTEijsR1NhoM0XPmc=
transfer: 0 B received, 888 B sent 0 Days, 00:00:30 since Thu Oct 10 16:11:27 2024 >>>>>>
WireGuard® ACTIVE Peer Status: Clients 1, Servers 0
ASUS GUI Peers: Clients 3, Servers 0
checked back wg11.conf
admin@asuswifi:/tmp/home/root# cat /opt/etc/wireguard.d/wg11.conf
[Interface]
PrivateKey=xxx <- same new key
Address=172.21.4.129
DNS=149.88.98.225,149.88.98.227
[Peer]
PublicKey=XvfaTRG0IMezPQNzNvtW4Vn2T2RTEijsR1NhoM0XPmc=
AllowedIPs=0.0.0.0/0
Endpoint=sx0320108-wg.pointtoserver.com:51820
PersistentKeepalive=21
admin@asuswifi:/tmp/home/root#
I found the issue casued by vpn rule of vpn director conflict with wgm, it works when I disable all rulesYou basically only need the keys and endpointort for the handshakes to work. Could this new config be not active? You can test it on your phone/computer to be sure.
Did you check Endpoint and/or port didn't change?
It's either that or some error in editing, some character missing or something?
Yea, putting everything (0.0.0.0/0) to vpn is troublesome and doing it twice is probably just a bad idea.I found the issue casued by vpn rule of vpn director conflict with wgm, it works when I disable all rules
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!