I used the graphical network manager to change my DNS server to the OpenDNS address.
Everything works fine but the WiFi signal icon has changed to question mark.
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
curl -v http://connectivity-check.ubuntu.com/
and post the output?