What's new

Wireguard - Default wgc1 conf file location?

  • 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!

mattmcspirit

Occasional Visitor
Hey folks - After successfully importing a Wireguard config file through the UI, does anyone know where a corresponding .conf file is stored on the router?

I've hunted around for .conf, *wg* files etc, but can't find what I'm looking for.

I'm looking to adjust the MTU for the wgc1 interface, down from 1420 to 1392, and although it's contained within my imported configuration file, it doesn't seem to apply the setting to the wgc1 interface.

I'm not using Wireguard Manager at this point, but will if it allows me to solve the problem.

Thanks!
 
I've hunted around for .conf, *wg* files etc, but can't find what I'm looking for.
It may be generated when the peer is started and then somewhere in ram, like /tmp/
It may not even be named .conf

I'm not using Wireguard Manager at this point, but will if it allows me to solve the problem.
Yes, it will understand and use the "MTU =" directive in the imported conf file. And it could even be changed after the import if you wish.
 
@ZebMcKayhan - thanks, I've searched high and low, but to no avail. All I need for my situation, is to have a single WG Client connect to an AWS-based WG server. Would I install Wireguard Manager with defaults, import my exiting configuration file, and that's about it? That's pretty much what I did through the UI, and that's working fine (apart from the MTU bit).

Thanks!
 
Would I install Wireguard Manager with defaults, import my exiting configuration file, and that's about it?
Pretty much. But depending on what you want to do there are alot of options. Like do you want all lan to use the tunnel (default route) or only a few lan clients (policy routes) you need to setup rules for policy routes.

Its all described here:
https://github.com/ZebMcKayhan/WireguardManager#table-of-content

And if you run into problems, post it in the Wireguard Manager thread in the merlin-addons section and we try to help or figure it out together.

I recently setup an oracle cloud server to relay Wireguard between my phone and my lan (lan behind cgnat) and to passthrough incoming server data out wg internet client. It was literely 3 commands, 1. Import config type=server 2. Passthrough all. 3. Restart peer. Thats it! Super easy (when you know how)
 
Thanks - got it mostly working, but ran into a slight Policy Routing issue - will ping you on the other section! Thanks!
 
As I am trying to migrate my existing WG setup from old dd-wrt router, I also want to know where the WG server private key is stored, according to
https://github.com/ZebMcKayhan/WireguardManager#table-of-content
it mentioned the files should be located somewhere around /opt/etc/wireguard.d/filename.conf_imported

However /opt folder is not available on my AX56U.
Using SSH to try to switch to that folder gives me the following:

xxx@xxx:/tmp/home/root# cd /opt
-sh: cd: can't cd to /opt

xxx@xxx:/tmp/home/root# ls -l /opt
lrwxrwxrwx 1. xxx root. 7 May 8 2023 /opt -> tmp/opt

xxx@xxx:/tmp/home/root# ls -l /tmp/opt
ls: /tmp/opt: No such file or directory

Did I miss something when I read the documentation? My setup is AX56U on Merlin 388.2_2
 
Last edited:
As I am trying to migrate my existing WG setup from old dd-wrt router, I also want to know where the WG server private key is stored, according to
https://github.com/ZebMcKayhan/WireguardManager#table-of-content
it mentioned the files should be located somewhere around /opt/etc/wireguard.d/filename.conf_imported
Wireguard Manager uses this location for its config files, and as you dont have Entware installed (nor Wireguard Manages Addon) you would not have this location. please not that my guide are written for Wireguard Manager Addon and are not really applicable for firmware wireguard implementation.

If you are using the firmware wireguard the config file is probably built from nvram variables when the peer is started. are you trying to setup a server which have the same keys as your old server? or what is the plan?
 
Wireguard Manager uses this location for its config files, and as you dont have Entware installed (nor Wireguard Manages Addon) you would not have this location. please not that my guide are written for Wireguard Manager Addon and are not really applicable for firmware wireguard implementation.

If you are using the firmware wireguard the config file is probably built from nvram variables when the peer is started. are you trying to setup a server which have the same keys as your old server? or what is the plan?
Yes I am trying to upgrade my old TL-WDR3600 (single core MIPS-based running dd-wrt) to RT-AX56U, to re-use the same set of WG keys, to save time from updating every client conf on various devices with the new WG server public key.
 
Yes I am trying to upgrade my old TL-WDR3600 (single core MIPS-based running dd-wrt) to RT-AX56U, to re-use the same set of WG keys, to save time from updating every client conf on various devices with the new WG server public key.
You can try
Code:
nvram show | grep wgs
and see if you can find the keys there...
 
Hey folks - After successfully importing a Wireguard config file through the UI, does anyone know where a corresponding .conf file is stored on the router?

I've hunted around for .conf, *wg* files etc, but can't find what I'm looking for.

I'm looking to adjust the MTU for the wgc1 interface, down from 1420 to 1392, and although it's contained within my imported configuration file, it doesn't seem to apply the setting to the wgc1 interface.

I'm not using Wireguard Manager at this point, but will if it allows me to solve the problem.

Thanks!
I was looking for a similar solution to which your question might be quite relevant but have not got any replies:

 

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