Error resolving and connecting to certain domains even if in hosts file

SYSTEM INFORMATION
OS type and version Ubuntu Linux 18.04.6
Virtualmin version 7.20.2

I have a problem with server resolving and connecting to certain domains… even with those lines in hosts file:
157.90.115.48 collaboraoffice.com
172.65.32.248 acme-v02.api.letsencrypt.org

without above lines system cant resolve the ip, with those lines - can resolve but cant connect nor ping…
resolv:
nameserver 8.8.8.8
nameserver 8.8.4.4

funny thing is that I didnt tamper with no firewall, most domains are good, on this server there is 4 ips and 3 of those are for virtual machines that have no problem with resolving nor connecting those domains :confused:

Have you checked if there are any route issues or ISP-related blocks? Also, maybe try running a traceroute to those domains to see where the connection is dropping. Could also be worth checking if there’s an MTU mismatch causing problems on that specific server.

I don’t think I understand the problem.

Resolving and connecting are two totally different things. But, it sounds like a network issue at your provider, and not anything software can solve.

If you can’t resolve then it sounds like DNS.

root@main:~# cat /etc/resolv.conf 
domain whatever-server.com
search whatever-server.com
nameserver 10.255.255.4
nameserver 10.255.255.3

running

resolvectl status

should give you the actual nameserver in use

1 Like