raspberrypiwireguard icon indicating copy to clipboard operation
raspberrypiwireguard copied to clipboard

connected but no internet access

Open firepmi opened this issue 5 years ago • 7 comments

I installed wireguard on digitalocean ubuntu according to the guideline. the client is connected, but no internet access. what did I do wrong?

firepmi avatar Aug 22 '19 03:08 firepmi

Same here. Installed server on ArchLinux; I can access to the server but no to internet, seems it's not forwarding the packets...

ccebrecos avatar Sep 14 '19 10:09 ccebrecos

I just solved my problem(other way of installing, but may solve it for you) by enabling ipv4 forwarding on the server.

Currently I am unable to search it myself, but Google "enable ipv4 forwarding Linux". I think that may solve your issue

RubenNL avatar Sep 14 '19 18:09 RubenNL

Hi ! ipv4 forwarding was already enabled on the server and iptables properly configured. Don't think the problem was there..

ccebrecos avatar Sep 30 '19 07:09 ccebrecos

Hello, I have the same issue. I already check the ipv4 forwarding on my server (net.ipv4.ip_forward = 1). Neevertheless my server can't access to Internet. I think is linked with Wireguard configuration but I don't see what is wrong. Could you help me ? Have a nice day.

My file configuration (/etc/wireguard/wg0.conf) is : [Interface] Address = 10.9.0.1/24 #The local ip given by Internet box is 192.168.X.X ListenPort = 51820 DNS = local IP of my server (192.168.Y.Y) PrivateKey = server_privatekey PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth1 -j MASQUERADE [Peer] #Peer-1 PublicKey = peer1_publickey AllowedIPs = 10.9.0.2/32 #PersistentkeepAlive = 60

IssueFindings avatar Dec 03 '19 21:12 IssueFindings

Issue solved, I put 1.1.1.1 as IP for DNS option in the file below. How I can check that everything go through WireGuard ? Have a nice day.

IssueFindings avatar Dec 03 '19 22:12 IssueFindings

Hi there! In my case the issue was a rule on ip rule; fixed just removing that rule: PostUp = ... ; ip rule delete table <ListenPort>

ccebrecos avatar Dec 04 '19 08:12 ccebrecos

I'm also running into this issue. Wireguard was working for me earlier this year and nothing changed with the configuration for the server or client, but it now I have no internet access even though it's showing the client is connecting to the server. I did notice some errors are showing up on the wg interface:

$ ifconfig wg0
wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1420
        inet 10.0.0.1  netmask 255.255.255.0  destination 10.0.0.1
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 219  bytes 34236 (33.4 KiB)
        RX errors 21  dropped 0  overruns 0  frame 21
        TX packets 328  bytes 104396 (101.9 KiB)
        TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0
wg show
interface: wg0
<snip>
  latest handshake: 41 seconds ago
  transfer: 33.43 KiB received, 101.95 KiB sent

Haven't figured out a fix yet unfortunately.

EDIT: After upgrade everything (sudo apt-get update && sudo apt-get upgrade) and restarting the pi, the wg server, and the client connection, I was able to access the internet again, but only for a minute or so. Here's the version for my packages in case this is of use to anyone else:

$ apt-cache policy wireguard*
wireguard-dkms:
  Installed: 0.0.20191127-2
  Candidate: 0.0.20191127-2
  Version table:
 *** 0.0.20191127-2 150
        150 http://deb.debian.org/debian unstable/main armhf Packages
        100 /var/lib/dpkg/status
wireguard-modules:
  Installed: (none)
  Candidate: (none)
  Version table:
wireguard-tools:
  Installed: 0.0.20191127-2
  Candidate: 0.0.20191127-2
  Version table:
 *** 0.0.20191127-2 150
        150 http://deb.debian.org/debian unstable/main armhf Packages
        100 /var/lib/dpkg/status
wireguard:
  Installed: 0.0.20191127-2
  Candidate: 0.0.20191127-2
  Version table:
 *** 0.0.20191127-2 150
        150 http://deb.debian.org/debian unstable/main armhf Packages
        100 /var/lib/dpkg/status

AshleyDumaine avatar Dec 05 '19 02:12 AshleyDumaine