Solved Why can't I reach my Ubuntu server on its domain name?

Western digital / Wd2000
August 16, 2019 at 11:10:07
Specs: Ubuntu Server 18.04.3 LTS, BCM2837, 1 GB
I am having trouble reaching my Raspberry Pi 3 Model B (which is running Ubuntu Server 18.04.3 LTS) on its domain name.

I can't reach it on both its 'short' domain name (without my DNS LAN suffix) and its FQDN.
I CAN reach other systems on my LAN on their respective domain names, for example my router and another Ubuntu server (a VM in VMware Workstation). (This server also CANNOT reach the Raspberry Pi.)
Futhermore, I CAN reach other systems on my LAN on their respective domain names when I SSH into the Raspberry Pi.

The Raspberry Pi and its Ubuntu work fine otherwise, I can ping it on its IPv4 address without any issue. The Pi is running multiple websites using nginx and various other services.

I have noticed the Raspberry Pi's hostname is (asterisk) in my router (Netgear R7000 running DD-WRT), where the Ubuntu VM shows its configured hostname correctly. Therefore, I suspect that the Raspberry Pi's Ubuntu somehow doesn't expose its hostname correctly, if at all, which causes its hostname to be not resolvable.

Does any have an idea how to fix this? I tried Google using multiple queries, but no dice so far.

message edited by Tobias Theebe


See More: Why cant I reach my Ubuntu server on its domain name?

Reply ↓  Report •

#1
August 16, 2019 at 12:12:42
Have you tried setting a reservation on the Netgear router?

https://wiki.dd-wrt.com/wiki/index....


Reply ↓  Report •

#2
August 16, 2019 at 12:22:56
Thanks for the reply, ijack. I don't use static DHCP leases on the router because DD-WRT requires me to enter a custom hostname for each lease. I don't know why it would disregard the hostname as announced by the device.

By the way, I just realized this issue might have something to do with the fact that the Raspberry Pi is using a static IP address, in contrast to my other systems, which use non-static DHCP leases.

I'll try adding a custom entry to dnsmasq.

message edited by Tobias Theebe


Reply ↓  Report •

#3
August 16, 2019 at 12:34:01
✔ Best Answer
I'm not quite sure that I understand your reservation. Why can't you just use the hostname that the device would announce?

Anyway, I suspect you are correct. As the Pi isn't getting an address from the DHCP server the DNS record isn't being created. I'm not familiar with DD-WRT, but can't you create a record manually in the DNS server?

https://zedt.eu/tech/adding-static-...


Edit: Ooops - my bad. I see that you said you are going to try that. I'm sure it wil do the trick.

I hope you have ensured that the static IP address for the Pi is outside the range served by the DHCP server.

message edited by ijack


Reply ↓  Report •

Related Solutions

#4
August 16, 2019 at 13:00:32
Yes, I use 192.168.1.11~1.99 for static IP addresses, my DHCP scope starts at 1.101. The Pi is at 1.15.

I will create the entry tomorrow since doing so might restart the wireless radios (family members are using WiFi right now). Will let you know how I get on.

Thanks so far!


Reply ↓  Report •

#5
August 18, 2019 at 11:46:59
I ended up adding the following entries to /etc/hosts on the router:

192.168.1.15    srv1-pi3b
192.168.1.15    srv1-pi3b.intranet.REDACTED

Afterwards I restarted the dnsmasq daemon:

stopservice dnsmasq
startservice dnsmasq

I can now ping the RasPi on its hostname and FQDN.

message edited by Tobias Theebe


Reply ↓  Report •

Ask Question