0

I used the graphical network manager to change my DNS server to the OpenDNS address.

enter image description here

Everything works fine but the WiFi signal icon has changed to question mark.

enter image description here

This answer works, but I want to find and fix the problem instead of disabling a feature.

I also tried this answer but no luck.


Update:

Result of curl -v http://connectivity-check.ubuntu.com/ with OpenDNS address:

$ curl -v http://connectivity-check.ubuntu.com/
*   Trying 35.224.99.156:80...
* TCP_NODELAY set
* Connected to connectivity-check.ubuntu.com (35.224.99.156) port 80 (#0)
> GET / HTTP/1.1
> Host: connectivity-check.ubuntu.com
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

Update 2:

result of curl -v http://connectivity-check.ubuntu.com/ with my ISP's DNS address:

$ curl -v http://connectivity-check.ubuntu.com/
*   Trying 78.46.14.94:80...
* TCP_NODELAY set
* Connected to connectivity-check.ubuntu.com (78.46.14.94) port 80 (#0)
> GET / HTTP/1.1
> Host: connectivity-check.ubuntu.com
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 204 No Content
< Date: Fri, 28 Aug 2020 10:07:04 GMT
< Server: Apache/2.4.18 (Ubuntu)
< X-NetworkManager-Status: online
< Connection: keep-alive
< 
* Connection #0 to host connectivity-check.ubuntu.com left intact

So my local DNS says connectivity-check.ubuntu.com is 78.46.14.94, but the OpenDNS says it's 35.224.99.156 and that server is either blocked from Ubuntu for Iran or is censored by the government.

Adding the following line to the /etc/hosts solved the problem.

78.46.14.94     connectivity-check.ubuntu.com
2
  • 1
    While the wifi status is showing a question mark, can you run curl -v http://connectivity-check.ubuntu.com/ and post the output? Commented Aug 28, 2020 at 9:12
  • @Brian Turek - Question updated
    – Sasan
    Commented Aug 28, 2020 at 9:39

1 Answer 1

0

Based upon your updated info, this is somehow not a problem with NetworkManager or DNS but rather a problem with your connection. The connection check works by doing a periodic HTTP GET to http://connectivity-check.ubuntu.com/ and, I think, it expects to see a HTTP 204. Your computer has connectivity problems to that host (thus the Recv failure) which causes NetworkManger to go into the question mark state. For comparison, here's my curl output:

$ curl -v http://connectivity-check.ubuntu.com
*   Trying 35.224.99.156:80...
* TCP_NODELAY set
* Connected to connectivity-check.ubuntu.com (35.224.99.156) port 80 (#0)
> GET / HTTP/1.1
> Host: connectivity-check.ubuntu.com
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 204 No Content
< Date: Fri, 28 Aug 2020 09:46:36 GMT
< Server: Apache/2.4.18 (Ubuntu)
< X-NetworkManager-Status: online
<
* Connection #0 to host connectivity-check.ubuntu.com left intact

I even set my /etc/hosts to resolve connectivity-check.ubuntu.com to the same IP as you to avoid DNS differences.

Is it possible you have something on your network that is blocking plaintext HTTP connections or something?

1
  • I am from Iran. Half the internet is either blocked by sanctions or censored by the regime! I found the problem with your help, thanks.
    – Sasan
    Commented Aug 28, 2020 at 10:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .