2

On a freshly installed Fedora Workstation running the default Workstation spin which installs Gnome. I'm having problems getting to a web server on the LAN with my browser. The commands curl and ping also do not work from the workstation. However, everything is working fine from other machines on the same network (also Linux). I'm out of things to try on the new machine. What else can I troubleshoot?

$ ping mywebserver.mydomain.local
ping: unknown host myserver.mydomain.local

$ curl -XGET http://mywebserver.mydomain.local
curl: (6) Could not resolve host: mywebserver.mydomain.local

However, nslookup resolves the IP

$ nslookup mywebserver.mydomain.local
Server:     192.168.1.2
Address:    192.168.1.2#53

mywebserver.mydomain.local
Name:   mywebserver.mydomain.local
Address: 192.168.1.24

Additionally, if I use curl or ping with the IP address, it works

$ curl -XGET http://192.168.1.24
<gets HTML>

$ ping http://192.168.1.24
<works>

The host command also resolves:

$ host mywebserver.mydomain.local
mywebserver.mydomain.local has address 192.168.1.24

I can ping and curl foreign servers:

$ ping www.google.com
<works>

$ curl -XGET http://www.google.com
<works>

Other clues...

  • mywebserver is the name in the DNS A record for that server. It only serves one web site.
  • I have 2 other web sites hosted on the LAN. I am able to ping the A records, but not curl the the A records. The CNAMEs will not respond to ping nor curl. On other machines, these CNAMEs and A record names will respond to ping and curl completely.
  • If I ssh into another machine, from there I can ping and curl just fine

Contents of /etc/resolv.conf

# Generated by NetworkManager
search mydomain.local
nameserver 192.168.1.2

Relevant line from /etc/nsswitch.conf

$ grep ^hosts /etc/nsswitch.conf
hosts:      files mdns4_minimal [NOTFOUND=return] dns myhostname mymachines
1
  • 1
    .local is defined as a special domain in RFC 6762 – Multicast DNS in section Multicast DNS Names and should not be used within the standard (unicast) DNS. Oct 17, 2020 at 21:50

1 Answer 1

3

The domain .local is reserved for use by hosts that can be auto-discovered by the mdns protocol (broadcasts on the local network). You might get it working by installing and running avahi, or more simply by removing the mdns4_minimal [NOTFOUND=return] part from your nsswitch.conf. To test an address use eg getent hosts mywebserver.mydomain.local.

1
  • I had success with your idea. avahi was already installed. I added the gui tools to see what it can auto-discover. It doesn't show the web server. Maybe that means the web servers don't broadcast? In any event, removing the NOTFOUND=return gets it to work, but slowly. Moving mdns4_minimal to the back was the solution for me.
    – 101010
    Jun 15, 2016 at 15:53

You must log in to answer this question.

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