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

No internet connection on ubuntu virtual server #39

Closed
kdurov opened this issue Aug 8, 2020 · 2 comments
Closed

No internet connection on ubuntu virtual server #39

kdurov opened this issue Aug 8, 2020 · 2 comments

Comments

@kdurov
Copy link

kdurov commented Aug 8, 2020

Hi.
I used wgcf on my local desktop pc to generate a conf file. There's not any problem connecting warp plus with official wireguard app on my iPhone and Windows 10 PC.
Then I uploaded the profile conf to my virtual private server. When I tried to connect on the server, everything seemed to be fine at first but then I found out that I couldn't access internet any more. Ping, nslookup etc. all stopped working.

Here're the output of sudo wg-quick up wg0 and sudo wg

wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add xx.xx…/32 dev wg0
[#] ip -6 address add xxxx:xxxx…/128 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -6 route add ::/0 dev wg0 table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] ip6tables-restore -n
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n

sudo wg
interface: wg0
  public key: [private key]
  private key: (hidden)
  listening port: 42533
  fwmark: 0xca6c

peer: [public key]
  endpoint: [2606:4700:d0::a29f:c001]:2408
  allowed ips: 0.0.0.0/0, ::/0
  latest handshake: 52 seconds ago
  transfer: 22.74 KiB received, 99.47 KiB sent


ifconfig 
wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1420
        inet 172.16.0.2  netmask 255.255.255.255  destination 172.16.0.2
        inet6 fd01:5ca1:ab1e:8a78:95f2:4221:fadd:327c  prefixlen 128  scopeid 0x0<global>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 356  bytes 26348 (26.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1221  bytes 116044 (116.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

but wg0 interface is not shown in routing table

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         [gateway]    0.0.0.0         UG    100    0        0 ens3
[ip]    0.0.0.0         255.255.254.0   U     0      0        0 ens3
169.254.169.254 [gateway]    255.255.255.255 UGH   100    0        0 ens3

Internet connection is lost when wg0 is up. If I turn wg0 off, everything is back to normal.

Does anybody has any idea what's going wrong here? Can someone help me out?
Thanks in advance.

@ViRb3
Copy link
Owner

ViRb3 commented Aug 13, 2020

I just tested on Xubuntu 20.04 and internet via Warp works great. This seems to be an issue with your Linux/WireGuard configuration, which I'm afraid I can't support. I can only give some basic troubleshooting ideas:

  • Try another WireGuard VPN profile, e.g. self-hosted, NordVPN, Mullvad
  • Change the DNS inside the WireGuard profile from 1.1.1.1 to something else
  • Try on another Linux installation, preferrably a clean one
  • Try on Android/Windows, via official WireGuard app

EDIT, for reference:

root@ubuntu:~# wg-quick up wgcf-profile 
[#] ip link add wgcf-profile type wireguard
[#] wg setconf wgcf-profile /dev/fd/63
[#] ip -4 address add [REDACTED]/32 dev wgcf-profile
[#] ip -6 address add [REDACTED]/128 dev wgcf-profile
[#] ip link set mtu 1420 up dev wgcf-profile
[#] resolvconf -a tun.wgcf-profile -m 0 -x
[#] wg set wgcf-profile fwmark 51820
[#] ip -6 route add ::/0 dev wgcf-profile table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] ip6tables-restore -n
[#] ip -4 route add 0.0.0.0/0 dev wgcf-profile table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n

root@ubuntu:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=79.0 ms

root@ubuntu:~# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet [REDACTED]  netmask 255.255.255.0  broadcast [REDACTED] 
        inet6 [REDACTED]   prefixlen 64  scopeid 0x20<link>
        ether [REDACTED]   txqueuelen 1000  (Ethernet)
        RX packets 23170  bytes 30244963 (30.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13457  bytes 1953778 (1.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 529  bytes 52852 (52.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 529  bytes 52852 (52.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wgcf-profile: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1420
        inet [REDACTED]   netmask 255.255.255.255  destination [REDACTED] 
        inet6 [REDACTED]   prefixlen 128  scopeid 0x0<global>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 3217  bytes 4492360 (4.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2104  bytes 211560 (211.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

@ViRb3 ViRb3 closed this as completed Aug 13, 2020
@ghost ghost mentioned this issue Aug 25, 2020
@ViRb3
Copy link
Owner

ViRb3 commented Aug 25, 2020

Please check the new release 2.1.2, it may solve your problem.

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

2 participants