Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new flag to change wireguard's device name. #118

Open
ledyba-z opened this issue Jul 11, 2020 · 1 comment · May be fixed by #198
Open

Add a new flag to change wireguard's device name. #118

ledyba-z opened this issue Jul 11, 2020 · 1 comment · May be fixed by #198

Comments

@ledyba-z
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently, subspace creates wg0 device and configuration files for clients always wg0.conf.
I would like to change.

Describe the solution you'd like

add --device-name=<string> flag to subspace command and change config filename to (device name).conf.
I believe device name and config file name should be the same to avoid confusion.

Describe alternatives you've considered

I don't have any plan B.

@rkul rkul linked a pull request Jun 25, 2021 that will close this issue
@rkul
Copy link

rkul commented Jun 25, 2021

Hi @ledyba-z

I understand that this issue is stale and might not be relevant for you anymore, but it might be useful for others.
You don't really need to name the interface wg0 and can set it to arbitrary string.

For example:

root@test:~# cat > /etc/wireguard/myproject.conf
[Interface]
PrivateKey = ...
Address = 172.17.2.5/24,fd00::172:172:5/112

[Peer]
PublicKey = hWUsaGJslnbMqaco1pxXU3s1XVDuNd76Dy5Bflr7NwY=

Endpoint = my.server.io:51820
AllowedIPs = 10.10.0.0/16

root@test:~# wg

root@test:~# wg-quick up myproject
[#] ip link add myproject type wireguard
[#] wg setconf myproject /dev/fd/63
[#] ip -4 address add 172.17.2.5/24 dev myproject
[#] ip -6 address add fd00::172:172:5/112 dev myproject
[#] ip link set mtu 8921 up dev myproject
[#] ip -4 route add 10.10.0.0/16 dev myproject

root@test:~# wg
interface: myproject
  public key: W+bQMDUdnrRYJ6QNQ8MlqIU0sz5FZnPLP3Buxg2h0Vw=
  private key: (hidden)
  listening port: 44259

peer: hWUsaGJslnbMqaco1pxXU3s1XVDuNd76Dy5Bflr7NwY=
  endpoint: 35....17:51820
  allowed ips: 10.10.0.0/16

So I made a pull request, hope it will be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants