StreisandEffect / streisand

Streisand sets up a new server running your choice of WireGuard, OpenConnect, OpenSSH, OpenVPN, Shadowsocks, sslh, Stunnel, or a Tor bridge. It also generates custom instructions for all of these services. At the end of the run you are given an HTML file with instructions that can be shared with friends, family members, and fellow activists.
https://twitter.com/streisandvpn
Other
23.16k stars 1.99k forks source link

WireGuard could not start #1787

Open linzhm opened 4 years ago

linzhm commented 4 years ago

Expected behavior:

WireGuard client should connect to Streisand server and works fine.

Actual Behavior:

WireGuard client connection is activated but could not work.

Steps to Reproduce:

  1. Instal Streisand from the builder macOS.
  2. the installation script has the error "TASK [wireguard : Enable the WireGuard service so it starts at boot, and bring up the WireGuard network interface] *** fatal: [streisandIP]: FAILED! => {"changed": false, "msg": "Unable to start service wg-quick@wg0.service: Job for wg-quick@wg0.service failed because the control process exited with error code. See \"systemctl status wg-quick@wg0.service\" and \"journalctl -xe\" for details.\n"}

Ansible Information

Streisand Information

Enabled Roles

Additional Details:

Log output from Ansible or other relevant services (link to Gist for longer output):

Target Cloud Provider:
Operating System of target host:
Operating System of client:
Version of Ansible, using ansible --version :
Output from git rev-parse HEAD in your Streisand directory :
paul-schwendenman commented 3 years ago

I had the same issue with a similar setup. After noticing there was an issue with wireguard, I logged in via SSH and ran the following commands:

root@streisand:~# sudo wg
root@streisand:~#

No output meant it wasn't running, try to start:

root@streisand:~# sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"
root@streisand:~# modprobe wireguard 
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.4.0-185-generic

I fixed my wireguard using the following steps:

apt purge wireguard-dkms
apt install wireguard-dkms

And now I was able to start it:

root@streisand:~# sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.192.122.1/24 dev wg0
[#] ip link set mtu 1420 up dev wg0

I hope that helps solve your issue, but it might be off-topic for the issue

haraball commented 3 years ago

@paul-schwendenman Thanks for the solution, it worked for me. I had to reboot after apt purge before I reinstalled wireguard-dkms to make it work (Ubuntu 16.04 LTS).