angristan / wireguard-install

WireGuard VPN installer for Linux servers
https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
MIT License
7.58k stars 1.27k forks source link

Does not work on Ubuntu 21.10 #295

Closed joep closed 1 year ago

joep commented 2 years ago

Script succeeded on install and I was able to connect the client, but no wider connection (e.g., to the internet) was working. After playing for a bit, I installed 18.04 onto the server instead and everything worked flawlessly.

kujac commented 2 years ago

Same thing here with a Debian 10 freshly installed and ipdated. The script worked and the client could ping the server. Bur the client and the server are not able to ping any internet domain.

ultimatomica commented 2 years ago

Same with Debian 11. In my case, resolv.conf no longer had nameservers after installing and couldn't be directly edited :

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.

It seems that adding dns-nameserver in /etc/network/interfaces allows to permanently define namerservers in resolv.conf. I hope that helps.

abdollahim commented 2 years ago

Script succeeded on install and I was able to connect the client, but no wider connection (e.g., to the internet) was working. After playing for a bit, I installed 18.04 onto the server instead and everything worked flawlessly.

I had the same problem on Ubuntu 21.04 and 21.10 I have it installed on my old Ubuntu 18.04, but it won't work successfully on new installations. (I mean Ubuntu because I didn't try on other distributions) It seems there are some problems with routing, forwarding, DNS, or something like them!

ghost commented 2 years ago

Me neither,this script seems doesn't work well on Ubuntu 21.10,I can connect to my server using ipv4 broadband with NAT 1,and can get access to the Internet,but it can't work on 4G LTE and other network with ipv6,I think there is something wrong with DNS or NAT forward. BTW,I tested mannual setup everthing not using the sccript and the wireguard works well

ghost commented 2 years ago

After using this script to setup the wireguard, I checked the /etc/sysctl.conf ,the ipv4/ipv6 forward are all not uncommentted,so I think the problem maybe related to iptables or ipv4 forward

g0x69lbo commented 2 years ago

After using this script to setup the wireguard, I checked the /etc/sysctl.conf ,the ipv4/ipv6 forward are all not uncommentted,so I think the problem maybe related to iptables or ipv4 forward

That is not a problem, the script creates a file at /etc/sysctl.d/wg.conf which gets also gets loaded when the scripts runs: sysctl --system.
you can verify this by running :

cat /proc/sys/net/ipv4/ip_forwarded # If turn on will be set to 1