maple3142 / cf-warp

MIT License
457 stars 65 forks source link

No internet access except in telegram app #23

Open naveenjohnsonv opened 4 years ago

naveenjohnsonv commented 4 years ago

Basically if I run wg-quick up cf-warp.conf I have no internet access, pings fail, but somehow telegram works. The same conf on android and windows work just fine. I'm on Pop!OS 20.10, which is based on Ubuntu 20.10 Any idea what could be the problem? Using latest cf-warp, installed from npm

maple3142 commented 4 years ago

I don't know, it has to be Wireguard's problem

maple3142 commented 4 years ago

I guess it may be related to dns

naveenjohnsonv commented 4 years ago

I'm not so sure. Seems to be with how 0.0.0.0/0 in AllowedIPs is getting interpreted. running ip route with wg up and 0.0.0.0/0 in AllowedIPs

default via 192.168.18.1 dev wlp3s0 proto dhcp metric 600 
169.254.0.0/16 dev wlp3s0 scope link metric 1000 
192.168.18.0/24 dev wlp3s0 proto kernel scope link src 192.168.18.193 metric 600 

running ip route with wg up and any other IP (say 192.168.0.0/24) in AllowedIPs

default via 192.168.18.1 dev wlp3s0 proto dhcp metric 600 
169.254.0.0/16 dev wlp3s0 scope link metric 1000 
192.168.0.0/24 dev cf-warp scope link 
192.168.18.0/24 dev wlp3s0 proto kernel scope link src 192.168.18.193 metric 600
felipejfc commented 3 years ago

did you solve this @naveenjohnsonv ? I'm having the same issue with this and other projects

naveenjohnsonv commented 3 years ago

did you solve this @naveenjohnsonv ? I'm having the same issue with this and other projects

I did get it working, albeit it doesn't always work. Here's what I think did atleast get it partially working.

From https://wiki.archlinux.org/index.php/WireGuard ,

Users configuring the WireGuard interface using wg-quick, should make sure that no other network management software tries to manage it. To use NetworkManager and to not configure WireGuard interfaces with it.

Create unmanaged.conf file:

sudoedit /etc/NetworkManager/conf.d/unmanaged.conf

Add the following inside the file:

[keyfile]
unmanaged-devices=interface-name:wg*

Save and close. Now activate the wireguard systemd service

sudo systemctl enable wg-quick@wg0.service
sudo systemctl start wg-quick@wg0.service

Now test if websites are loading, if not

sudo systemctl stop wg-quick@wg0.service

then,

sudo systemctl start wg-quick@wg0.service

Repeat till website loads. It loads after the 4th-5th try for me everytime.

MohammadHuseyn commented 2 years ago

I had this issue on Arch Linux after changing DNS several times, can't access any web page but the Telegram app worked perfectly. first I change the internet manager (from NetworkManager to netctl) it worked but after deleting connections in NetworkManager (more in askubuntu, "solsTiCe" 's answer), I can use that too! Hope this help someone.

juev commented 2 years ago

Similar: