Quantcast
Channel: Active questions tagged networking - Ask Ubuntu
Viewing all articles
Browse latest Browse all 23562

Wireguard client can not connect to internet

$
0
0

I have installed Wireguard with following commands:

sudo apt updatesudo apt install wireguard

Then I have installed resolvconf:

sudo apt install resolvconf

Created keys:

umask 077wg genkey | sudo tee /etc/wireguard/private.keysudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.key

Finally, created config:

sudo nano /etc/wireguard/wg0.conf# below is the content of the config file         [Interface]         PrivateKey = omitted         Address = 10.9.0.7/32         DNS = 1.0.0.1         [Peer]         PublicKey = omitted         AllowedIPs = 0.0.0.0/0, ::/0         Endpoint = 95.87.101.10:51820

After executing sudo wg-quick up wg0 all my applications are left without internet.Internet comes back after I sudo wg-quick down wg0 Wireguard.

I do not have access to the server, it is maintained by the company.
I can only tamper with my own machine.

I am not skilled with networking, my company said to just follow above instructions and everything will work, but here is what I have tried to solve the problem:

I have tried suggestions from this question but no success.

sudo wg gave the following output:

interface: wg0  public key: y5ZpnepnWHWBOvm04iDUh/+XgLIZKSOClI4It5D/ESU=  private key: (hidden)  listening port: 43460  fwmark: 0xca6cpeer: KIkiNWfiSEGYbXAGvNau8kOlG8rqFfEFeNzPjnUzz0Q=  endpoint: 95.87.101.10:51820  allowed ips: 0.0.0.0/0, ::/0  transfer: 0 B received, 296 B sent

I have assumed that handshake works, but something else obstructs internet connection.

ip route show gave me this:

default via 192.168.1.1 dev wlx3c7c3f49907c proto dhcp metric 600 169.254.0.0/16 dev wlx3c7c3f49907c scope link metric 1000 192.168.1.0/24 dev wlx3c7c3f49907c proto kernel scope link src 192.168.1.7 metric 600

After googling, I came to the conclusion that DHCP screws default route, but I do not know how to fix it. I have tried sudo ip route add default via 192.168.1.1 but that did not help either. ip route while Wireguard is on gives following output:

default via 192.168.1.1 dev wlx3c7c3f49907c default via 192.168.1.1 dev wlx3c7c3f49907c proto dhcp metric 600 169.254.0.0/16 dev wlx3c7c3f49907c scope link metric 1000 192.168.1.0/24 dev wlx3c7c3f49907c proto kernel scope link src 192.168.1.6 metric 600

I have tried sudo cat /proc/sys/net/ipv4/ip_forward but that did not help either.

This is the best I can do, since I do not know much about networking. I came across this site after googling so I have decided to ask for help, in a desperate hope that a solution will be found.

If you need further info leave a comment and I will reply.


Viewing all articles
Browse latest Browse all 23562

Latest Images

Trending Articles



Latest Images