1

I'm trying to connect to my linux server via the hostname for Samba. I'm have been able to access it with no problem then all of a sudden it stopped working. Here is what is happening.

This is what I have done from a windows PC

  • Can ping the IP
  • Can NOT ping the hostname
  • Can do nslookup and it finds the hostname
  • Can traceroute IP and resolves the hostname
  • Can ping other things on my network by hostname
  • If I add the IP and hostname to the hosts file on my windows PC I can ping the hostname just fine. When I rebooted my router the issue persisted. (From 1st Line Supports answer)

From the Ubuntu 14.04 server

  • Can ping self by IP and hostname
  • Typing "hostname" resolves appropriate hostname
  • Can ping other things on my network

Here is my /etc/hosts file

127.0.0.1 localhost

127.0.1.1 servername

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

My DNS server is my router which does dhcp and dns via dd-wrt. Please any help would be greatly appreciated!

Thanks in advance

4
  • Did you check the firewall? Apr 19, 2016 at 22:59
  • yes, my firewall has this IP open.
    – zatarra
    Apr 19, 2016 at 23:16
  • Test another computer. Apr 19, 2016 at 23:49
  • I can't ping or access it from any of my computers, tablets, fireTVs, phones, etc
    – zatarra
    Apr 19, 2016 at 23:50

1 Answer 1

0

Add the entry for your hostname and IP address in to the /etc/hosts If it works, then it is probably DNS try rebooting the router and remove the entry you have just added.

4
  • I added the IP and hostname to the local hosts file and I was able to ping via the hostname. I will try rebooting my router now.
    – zatarra
    Apr 19, 2016 at 23:19
  • I rebooted my router and I can not ping the hostname.
    – zatarra
    Apr 19, 2016 at 23:29
  • That would appear to be a DNS issue with the router, which is off topic, but as a pointer, look for your FQDN i.e. <host.domain>, some routers add a default domain entry to the hostname or keep the entry in the hosts file or run DNS from Ubuntu Apr 20, 2016 at 0:12
  • You are correct. Sorry about that I found the issue in my router.
    – zatarra
    Apr 20, 2016 at 2:53

You must log in to answer this question.

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