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

wg set doesn't work, wg setconf works #3

Open
gimmelemons opened this issue Feb 1, 2022 · 2 comments
Open

wg set doesn't work, wg setconf works #3

gimmelemons opened this issue Feb 1, 2022 · 2 comments

Comments

@gimmelemons
Copy link

For some reason, wg set doesn't work, I am having to resort to using wg setconf in /usr/bin/namespaced-wireguard-vpn-interface file -

wg setconf "$WIREGUARD_NAME" /home/user/Projects/wgns/wgns.conf
       # wg set "$WIREGUARD_NAME" \
       #     private-key <(echo "$WIREGUARD_PRIVATE_KEY") \
       #     peer "$WIREGUARD_VPN_PUBLIC_KEY" \
       #         endpoint "$WIREGUARD_ENDPOINT" \
       #         allowed-ips "$WIREGUARD_ALLOWED_IPS" || die

By 'doesn't work', I mean I cannot ping other wireguard clients using sudo ip netns exec vpn ping 10.66.66.1
To clarify, I have properly filled in env variables in /etc/namespaced-wireguard-vpn/namespaced-wireguard-vpn.conf file
Following is my wgns.conf file -

 [Interface]
 PrivateKey = ****
 
 [Peer]
 PublicKey = ****
 PresharedKey = ****
 Endpoint = ****
 AllowedIPs = 0.0.0.0/0,::/0

OS - Arch Linux 5.16.2-arch1-1
Wireguard version - wireguard-tools v1.0.20210914

I don't know how to debug/check logs.

@chrisbouchard
Copy link
Owner

That's odd. I don't know any particular reason setconf should work differently from the equivalent set call.

You can check if the systemd unit has any useful log output with

$ journalctl -eu namespaced-wireguard-vpn-interface.service

in case there's an error running the set command. But if the interface comes up and just doesn't work, that sounds like the command was successful and just didn't do what we expected.

@hockeymikey
Copy link

@chrisbouchard I'm seeing problems myself trying to set this up too. On some testing of the actual wg set command I get
"fopen: No such file or directory"

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

No branches or pull requests

3 participants