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

Internet gets disabled when I try to run wg client #13

Closed
solletravinder opened this issue Apr 25, 2020 · 9 comments
Closed

Internet gets disabled when I try to run wg client #13

solletravinder opened this issue Apr 25, 2020 · 9 comments

Comments

@solletravinder
Copy link

Timeout error as the internet gets disabled when running the wg-quick up wgcf-profile.conf. In my mobile, the app 1.1.1.1 works fine. Also, I didn't get this issue on windows laptop(downloading, browsing all works fine) but on ubuntu after sometime internet gets disabled when try to run wg client.

ravinder@ravinder-Aspire-A515-51:$ wg-quick up wgcf-profile.conf
[#] ip link add wgcf-profile type wireguard
[#] wg setconf wgcf-profile /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev wgcf-profile
[#] ip -6 address add fd01:5ca1:ab1e:8c92:3e75:2f5:4a5e:47d1/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
ravinder@ravinder-Aspire-A515-51:$ ./wgcf_1.0.5_linux_amd64 trace --config "ravinder_private/warp+.toml"
2020/04/25 10:45:54 Using config file: ravinder_private/warp+.toml
2020/04/25 10:46:14 Get "https://cloudflare.com/cdn-cgi/trace": dial tcp: lookup cloudflare.com on 127.0.0.53:53: read udp 127.0.0.1:36291->127.0.0.53:53: i/o timeout
ravinder@ravinder-Aspire-A515-51:$ wg-quick down wgcf-profile.conf
[#] ip -4 rule delete table 51820
[#] ip -4 rule delete table main suppress_prefixlength 0
[#] ip -6 rule delete table 51820
[#] ip -6 rule delete table main suppress_prefixlength 0
[#] ip link delete dev wgcf-profile
[#] resolvconf -d tun.wgcf-profile -f
[#] iptables-restore -n
[#] ip6tables-restore -n

@ViRb3
Copy link
Owner

ViRb3 commented Apr 25, 2020

It seems like you are using a proxy DNS running on localhost (127.0.0.53:53), which is unable to resolve DNS queries. To verify this, when you are getting i/o timeout, run ping 1.1.1.1. If it succeeds, then it is indeed just the DNS that is broken. Try using the tunnel's default DNS (1.1.1.1).

@solletravinder
Copy link
Author

solletravinder commented Apr 25, 2020

Cool Thanks. I removed all the DNS from wifi and from the router as well. Still, I got the same problem after 1 successful run.

2020/04/25 15:23:33 Get "https://cloudflare.com/cdn-cgi/trace": dial tcp: lookup cloudflare.com on 127.0.0.53:53: read udp 127.0.0.1:49003->127.0.0.53:53: i/o timeout

@solletravinder
Copy link
Author

Okay, so there is no internet even though I removed the Proxy DNS.

ravinder@ravinder-Aspire-A515-51:$ wg-quick up ravinder_private/warp+.conf
[#] ip link add warp+ type wireguard
[#] wg setconf warp+ /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev warp+
[#] ip -6 address add fd01:5ca1:ab1e:8c92:3e75:2f5:4a5e:47d1/128 dev warp+
[#] ip link set mtu 1420 up dev warp+
[#] resolvconf -a tun.warp+ -m 0 -x
[#] wg set warp+ fwmark 51820
[#] ip -6 route add ::/0 dev warp+ 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 warp+ 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
ravinder@ravinder-Aspire-A515-51:$ ./wgcf_1.0.5_linux_amd64 trace --config "ravinder_private/warp+.toml"
2020/04/25 16:01:48 Using config file: ravinder_private/warp+.toml
2020/04/25 16:01:53 Trace result:
fl=202f31
h=cloudflare.com
ip=203.194.104.155
ts=1587810713.728
visit_scheme=https
uag=Go-http-client/2.0
colo=BOM
http=http/2
loc=IN
tls=TLSv1.3
sni=plaintext
warp=plus
ravinder@ravinder-Aspire-A515-51:$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
^C
--- 1.1.1.1 ping statistics ---
43 packets transmitted, 0 received, 100% packet loss, time 43017ms

1 ravinder@ravinder-Aspire-A515-51:$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3081ms

1 ravinder@ravinder-Aspire-A515-51:$ wg-quick down ravinder_private/warp+.conf

The Internet doesn't work now after running the client.

@syphyr
Copy link

syphyr commented Apr 25, 2020

To connect on Ubuntu, try this exact sequence..

ping -c 3 -W 3 google.com
wg-quick up wgcf-profile.conf
ping -c 1 -W 3 google.com
wg-quick down wgcf-profile.conf
wg-quick up wgcf-profile.conf
ping -c 3 -W 3 google.com

@syphyr
Copy link

syphyr commented Apr 25, 2020

When I use DNS through Tor, this sequence is how I have to connect to warp on Ubuntu. This sequence works every time.

ping -c 3 -W 3 google.com
wg-quick up vpn1
sudo /etc/init.d/tor restart
sleep 3
ping -c 1 -W 3 google.com
wg-quick down vpn1
wg-quick up vpn1
sudo /etc/init.d/tor restart
sleep 3
ping -c 3 -W 3 google.com

@solletravinder
Copy link
Author

ping -c 3 -W 3 google.com

Tried this.
ravinder@ravinder-Aspire-A515-51:$ ping -c 3 -W 3 google.com
PING google.com (172.217.167.174) 56(84) bytes of data.
64 bytes from bom12s01-in-f14.1e100.net (172.217.167.174): icmp_seq=1 ttl=57 time=3.68 ms
64 bytes from bom12s01-in-f14.1e100.net (172.217.167.174): icmp_seq=2 ttl=57 time=5.84 ms
64 bytes from bom12s01-in-f14.1e100.net (172.217.167.174): icmp_seq=3 ttl=57 time=4.53 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.686/4.689/5.846/0.888 ms
ravinder@ravinder-Aspire-A515-51:$ wg-quick up wgcf-profile.conf
wg-quick must be run as root. Please enter the password for ravinder to continue:
[#] ip link add wgcf-profile type wireguard
[#] wg setconf wgcf-profile /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev wgcf-profile
[#] ip -6 address add fd01:5ca1:ab1e:8c92:3e75:2f5:4a5e:47d1/128 dev wgcf-profile
[#] 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
ravinder@ravinder-Aspire-A515-51:$ ping -c 1 -W 3 google.com
PING google.com (216.58.199.174) 56(84) bytes of data.
64 bytes from bom05s08-in-f14.1e100.net (216.58.199.174): icmp_seq=1 ttl=58 time=4.01 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.016/4.016/4.016/0.000 ms
ravinder@ravinder-Aspire-A515-51:$ wg-quick down wgcf-profile.conf
[#] ip -4 rule delete table 51820
[#] ip -4 rule delete table main suppress_prefixlength 0
[#] 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
ravinder@ravinder-Aspire-A515-51:$ wg-quick up wgcf-profile.conf
[#] ip link add wgcf-profile type wireguard
[#] wg setconf wgcf-profile /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev wgcf-profile
[#] ip -6 address add fd01:5ca1:ab1e:8c92:3e75:2f5:4a5e:47d1/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
ravinder@ravinder-Aspire-A515-51:$ ping -c 3 -W 3 google.com
PING google.com (172.217.167.174) 56(84) bytes of data.

--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2038ms

@solletravinder
Copy link
Author

solletravinder commented Apr 26, 2020

Hey so i figured my problem of proxy-dns which is of cloudflared. I used the command sudo cloudflared proxy-dns. How can i stop this? Cuz it goes to 127.0.0.53:53. How can i reset this?

My bad, 127.0.0.53 is my stub resolver as it is defined in /etc/resolv.conf
Now it is changed to 1.1.1.1 finally.

@ViRb3
Copy link
Owner

ViRb3 commented Apr 26, 2020

As this issue is with your individual setup and unrelated to the project, I'm afraid I cannot help there. I will now close this issue, but I hope you manage to fix it. Feel free to reply here and add any notes for other users if you figure out out.

@ViRb3 ViRb3 closed this as completed Apr 26, 2020
@solletravinder
Copy link
Author

solletravinder commented Apr 26, 2020

Yeah, so I changed my nameserver to 1.1.1.1 by overriding the /etc/resolv.conf. By doing so it's faster than it's default one which is 127.0.0.53.

  1. To check the status of systemd-resolve:
    sudo systemd-resolve --status
  2. To edit the file /etc/resolv.conf as you said to make 1.1.1.1 as default.
    sudo nano /etc/resolv.conf
    Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    127.0.0.53 is the systemd-resolved stub resolver.
    run "systemd-resolve --status" to see details about the actual nameservers.
    nameserver 1.1.1.1
    nameserver 127.0.0.53

The real problem is still not fixed. Not sure if the client has the issue or the Cloudflare API.
I thank both of you for the help.

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

3 participants