r/WireGuard • u/DrIgnatioMobius • Apr 16 '20
Wireguard Config Generator (Free web-based tool)
I've just built a little tool to help with the standard road-warrior setup where you have a server at home and a bunch of clients (laptops, mobiles etc.) that you wish to connect.
Just plug in the parameters for your setup and it will generate all the config files for you.
Would be interested to hear if you find this useful and whether there are any additional features that would be valuable!
4
u/dontworryimnotacop Apr 17 '20
You should add it to https://github.com/pirate/wireguard-docs#wireguard-setup-tools !
3
4
u/gee-one Apr 17 '20
This is a very slick tool. I just set up wireguard yesterday. I wrote a bash script, but it only does 25% of what this does.
One suggestion- add preshared keys for the clients.
2
2
3
u/zfa Apr 17 '20
Are those endpoints correct in the peer parts of the server config? Wouldn't that be the dynamic hostname of the peers in there? Been a while since I set my WireGuard up but I'm struggling to see why each peer would have the server host defined on the server itself.
3
5
Apr 16 '20
Very cool. Would this set up allow someone to reach their LAN devices at home too?
I’m currently struggling to do that. I’ve got WireGuard running great on my phone and I can reach home through it but Infuse can’t “see” the SMB share I’ve got at home.
5
u/DrIgnatioMobius Apr 16 '20
If you choose your CIDR so that the IP addresses of your wireguard clients fall into the same subnet as your home network it should just work. Otherwise you might need to set up some IP routing rules on your wireguard server.
3
2
Sep 02 '20
The CIDR being in the subnet of your LAN isn't required if you have the NAT rule applied!
Great work
2
u/ikidd Apr 17 '20
http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/
Do that on your WG gateway and add a route to your home LAN gw to route the WG subnet back through the WG gateway. Don't use overlapping CIDR, it'll just chew up WG bandwidth with broadcasts.
2
u/ImaVoter Apr 17 '20
hmm I thought broadcasts are Layer 2 and Wireguard is Layer 3, so they would not be transmitted.
2
2
u/franklacey Apr 23 '20
This is really handy thanks a lot!
Is it possible to add the possibility to change the AllowedIPs? Would be good to be able to change this from the default 0.0.0.0/0.
4
u/DrIgnatioMobius Apr 27 '20
This is now supported :)
2
2
u/franklacey May 07 '20
How about being able to save the all the data: client_id, ipaddress, private key, and public key to a table in a file?
3
u/saggy777 Apr 16 '20
so if you generate them here, this site will have your private keys.
My question is: Do you have an offline version of your site that one can run for secrecy purposes?
12
u/DrIgnatioMobius Apr 16 '20 edited Apr 16 '20
Everything is generated client-side, so the site does not have your private keys. You can unplug your network cable and you'll see it still works.
For the truly paranoid you can download the entire website using a tool such as HTTrack, copy it to an airgapped computer on a flash drive and run it there.
2
Apr 17 '20
Or for the semi-paranoid just change the endpoint address and do copy and paste with the real endpoint in your configs.
4
u/ratskinmahoney Apr 17 '20
Or for the depressed, just use the site whilst listening to Leonard Cohen.
3
2
u/pcmichael Sep 22 '23
Can you just share it on GitHub under some sort of license so we can replicate it locally and easily verify? 😇
Thanks for writing this!
1
u/KoppleForce May 07 '26
is your website down forever? not accessible last 2 days =(
2
u/DrIgnatioMobius May 07 '26
Thanks for letting me know - I hadn't even noticed! Been super busy lately. I transferred the domain to a different registrar and I guess the DNS is broken. I'll get it fixed.
1
u/KoppleForce May 11 '26
no problem! I lean on it quite a bit lol. I'm glad I was able to stumble on your post
2
u/DrIgnatioMobius May 07 '26
It should be back now! Might take a bit longer depending on your ISP's DNS cache.
2
2
2
u/jcastle003 Nov 10 '21 edited Nov 10 '21
I started playing around with Wireguard on an OpenWRT router. Your Config Generator is very useful. I found the easiest way to add multiple peers is over SSH on OpenWRT and using vi to modify the "network" file in /etc/config/. It's a simple copy and paste of the new peer info. Save and "/etc/init.d/network restart" populates the new peers in the Wireguard Status page.
Any possibility of adding the functionality to your tool to generate this network config file populating the generated values in the appropriate locations? I'm doing this manually at the moment.
Here's a sample of the relevant WG info in the network config file:
config interface 'wg0'
option proto 'wireguard'
option private_key '<ServerPrivateKeyGoesHere>'
option listen_port '51820'
list addresses '10.4.0.1/24'
config wireguard_wg0 'wgclient1'
option public_key '<PeerPublicKeyGoesHere>'
list allowed_ips '10.4.0.2/32'
option description 'Client1'
option persistent_keepalive '25'
option route_allowed_ips '1'
config wireguard_wg0 'wgclient2'
option public_key '<AnotherPeerPublicKeyGoesHere>'
list allowed_ips '10.4.0.3/32'
option description 'Client2'
option persistent_keepalive '25'
option route_allowed_ips '1'2
u/sedo1800 Feb 08 '22
Very cool, I am very new to wireguard. When I add my public IP as the endpoint the iOS client gives me an invalid config error. Any ideas?
2
2
u/cobbers83 Sep 08 '23
If anyone is interested, I wrote a bash script for Mac that helps setup new devices, including automatically generating a QR code for easy mobile setup! I'd love to hear feedback on ways to improve it. Let me know what you think. Thanks! http://wirewizardqr.com/ (GitHub Repo Link)
2
u/fireinsaigon May 16 '24
cool app but the chatbot thing that messages you and makes your title bar blink is super annoying
2
u/chaz6 Dec 07 '24
It would be nice if it supported multiple CIDR's (e.g. one IPv4 and one IPv6). As it is, I cannot enter an IPv6 CIDR.
1
1
u/PuddingWorldly3486 Oct 29 '25
Сайт супер но есть один нюанс так сказать
Строчки
ListenPort =Не должно быть в конфигурации клиента, она должна быть только в конфиге сервера
Иначе может быть конфликт портов исходящих что у меня и случилось(
Причем на одном провайдере интернета подключение было а на другом нет.
Где была проблема был один интернет провайдер Дом.Ру, пока строчку не удалил коннекта не было.
Причем я под этим же конфигом подключался с провайдера МТС без проблем даже с этой строчкой.
0
0
Apr 16 '20
[deleted]
4
u/DrIgnatioMobius Apr 16 '20 edited Apr 16 '20
There is a Save as ZIP button just under the 'Generated Config' header. I need to do some polishing up of the UI to make things a bit more intuitive!
7
u/LancelotSoftware Apr 17 '20 edited Apr 17 '20
Fantastic stuff! Thanks for sharing.
[edit] I have one concern, how can the user be assured the private keys aren't being stored anywhere that could be stolen and used for attacks later on? I would add some sort of security audit, maybe use GitHub and GitHub actions to publish the site.
[edit 2] Juat saw your reply to someone else that everything generated client-side, carry on!