I am trying to access some URLs for work, through a corporate VPN
Connecting to the VPN is fine and some sites resolve just okay.
But for some URLs I cant connect, or ping the address.
If I ask a colleague to nslookup
and send me the IP address, I still cant ping the address.
However if I add the IP and base URL to my /etc/hosts
it works just fine.
I have checked its not blocked by selinux or my firewall or iptables.
Im trying to understand whats happening, the IP is likely to change so I would like to not have to rely upon the static IP in the /etc/hosts
> cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
123.456.789.0 work-db.com
> cat /etc/resolv.conf
nameserver 127.0.0.53
options edns0 trust-ad
search .
> iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
with entry in /etc/hosts
> nslookup work-db.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Name: work-db.com
Address: 123.456.789.0
without entry in /etc/hosts
> nslookup work-db.com
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; no servers could be reached
even if the DNS server wasnt resolving correctly, my understanding is I should still be able to ping just fine.