GithubHelp home page GithubHelp logo

wg_tool's People

Contributors

gene-git avatar ycardon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wg_tool's Issues

Adding a --version cmd option?

Hi @gene-git,

Not sure if you have considered to add "--version" cmd option to print out:

  1. the release version, build, and date info
  2. git location?

Ex:

# wg-tool --version
wg-tool version 6.2 (build aabb333, 2024-01-18)
Online documentation: https://github.com/gene-git/wg_tool/

Thanks,

Jack

having an established location for the config files (enhancement)

Currently the default working directory of wg-tool is ./, witch makes user to take care of either where the command is called or add the extra -wkd argument.

How about fixing the location of the config files? This would allow:

  • to launch wg-tool from anywhere without fear of mistake
  • optionally to propose the user to softlink /etc/wireguard/wg0.conf to .../wg-configs/server/wg0.conf

I'm not sure where the location could be. /etc/wireguard/wg-tool/?

fresh install, AttributeError: 'dict' object has no attribute 'get_changed'

Hi, I'm very new to Wireguard,

Under Archlinux, I've installed wireguard-tools and wg_tool packages. Configured nothing and launched wg-tool --init. I then get the following python error. What do I miss?

> wg-tool --init
Init Mode
Making sample server config - please edit for your setup
Traceback (most recent call last):
  File "/usr/bin/wg-tool", line 26, in <module>
    main()
  File "/usr/bin/wg-tool", line 22, in main
    wgtool.doit()
  File "/usr/lib/python3.10/site-packages/wg_tool/lib/class_wg.py", line 308, in doit
    write_server_config(self)
  File "/usr/lib/python3.10/site-packages/wg_tool/lib/write_config.py", line 38, in write_server_config
    if wgtool.server.get_changed() :
AttributeError: 'dict' object has no attribute 'get_changed'

Why are there 2 hostnames (Hostname and Hostname_Int)?

I dont understand why there are 2 values for hostnames. Both are "key fields to edit". Do I have to fill both? How can I determine which one of these hostname fields is used as Endpoint for the userconfigs?
In my case the Hostname_Int ends up in my userconfig Endpoint - making it impossible for me to connect to the wireguard-server.

Suggested steps to install on Ubuntu 22.04

Hi Gene,

Thank you again for making the useful wg-tool and sharing it with us! It really saves me a lot of time and brain cells to manage wg keys. I would like to share the steps I got it to work on Ubuntu 22.04. Feel free to include in your documentation to help others.

  1. Assume these are already installed
$ sudo apt install wireguard qrencode
  1. Install necessary python3 packages for wg_tool:
$ sudo apt install python3 python-is-python3 python3-poetry python3-build \
  python3-installer python3-qrcode python3-tomli-w python3-tomli python3-netaddr 
  1. Build and install
$ git clone https://github.com/gene-git/wg_tool
$ cd wg_tool

$ sudo pip install hatchling 

$ /usr/bin/python -m build --wheel --no-isolation

$ sudo ./scripts/do-install /
  1. Getting wg and wg-tool to work
$ sudo -i
# cd /etc/wireguard

# wg-tool --init

# vi config/server/server.conf
  1. Add the first set of users with wg-tool
# wg-tool --add_user --dns_search Mary:mac,iphone,ipad

# ln -s wg-configs/server/wg0.conf .

# systemctl enable wg-quick@wg0
# systemctl start wg-quick@wg0
# systemctl status wg-quick@wg0

# wg show

  1. Add more users
# cd /etc/wireguard
# wg-tool --add_user --dns_search Joe:mac,iphone,ipad

# systemctl reload wg-quick@wg0

# wg show

# wg-tool --list_users

# wg-tool -rrpt

IPv6 Support

Is there a way to have the clients automatically configure with IPv6? The tool seems to only generate IPv4 addresses for the clients.

Awesome work on the tool, it's so good it feels like a suite of tools that should be natively built into the protocol.

Ubuntu/Debian compatibility ?

Before I start messing with my system installing all dependencies and such, is the script compatible with both Ubuntu/Debian ?

I have been looking for a decent management script and google lead me here <3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.