I am given two WireGuard config files by the company I work for. I have setup one on my Android phone and it works perfectly and another one on my Ubuntu. It used to work for a day or two; but suddenly stopped working. During this time I may have messed up with my network settings which I am not sure of. It connects to the WireGuard VPN server; but, when I try to use the Internet I have no data. I cannot event ping anywhere.
I tested both my WireGuard configs on my phone just to make sure and they both work properly.
I even installed Windows virtually on my Ubuntu and used my WireGuard config in Windows and it worked.
I use Ubuntu 20.04 LTS and this is my WireGuard client config:
[Interface] PrivateKey = <PRIVATE-KEY> Address = 10.19.49.26/24 ,fd9d:bc11:4021::1a/48 DNS = 172.26.11.122, fd00::a:b7a [Peer] PublicKey = <PUBLIC-KEY> PresharedKey = <PRESHARED-KEY> AllowedIPs = 0.0.0.0/0,::/0 Endpoint = <WIREGUARD-SERVER>:51820
The output of running:
$ sudo wg-quick up wg2
Warning: `/etc/wireguard/wg2.conf' is world accessible [#] ip link add wg2 type wireguard [#] wg setconf wg2 /dev/fd/63 [#] ip -4 address add 10.19.49.26/24 dev wg2 [#] ip -6 address add fd9d:bc11:4021::1a/48 dev wg2 [#] ip link set mtu 1420 up dev wg2 [#] resolvconf -a wg2 -m 0 -x [#] wg set wg2 fwmark 51820 [#] ip -6 route add ::/0 dev wg2 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 wg2 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