Local server name no longer recongnized - OpenBSD

0

I've been scratching my head with this for a while and don't seem to be getting any closer to a solution at the system level.

Brief note: A while back I set up an OpenBSD based server to run my websites/dashboard off. The server sits within my company's local network with no external access -- all the connections are blocked by a firewall. Initially -- I had no problems at all; I installed the OS, set up the domain name and everybody could access the server by the name. Recently, I bought a small gigabit switch (D-Link, 5-port) and now I cannot even ping the machine by the name (pinging IP works fine).

I've already tried editing the /etc/hosts file by adding the appropriate information (thought the IP has changed). I also edited the /etc/resolv.conf file. Still, these changes gave me nothing in return.

The only solution that I found to be working (although it would be really tedious to implement) is to ask all my users (over 100, not all of them can execute a command through cmd) to execute a command that adds to the /etc/hosts file on each local machine (within Windows/System32/drivers folder).

Any help would be truly appreciated as I'm losing it.

Thanks, -Tom

TDrabas

Posted 2014-01-20T03:28:08.257

Reputation: 166

Is there a dns server on your network – Gaurav Joseph – 2014-01-20T05:25:45.453

Yes. I've included it in the /etc/resolv.conf file. Yet, it worked before. The only thing that I changed was to add the switch in between (running low on Ethernet ports on my desk). – TDrabas – 2014-01-20T06:12:21.327

1Some more details would help: what commands are you trying, what error message do you get? Also, what @Gaurav asked: is there a DNS server on your network? Does it answer queries at all? If not, what's the error message on the DNS server? As it worked before, what changed? (And don't say "I didn't change anything" :-D) – ckujau – 2014-01-20T06:07:09.280

Try "dig somehost @dns-server-ip" and post the reply. Also, increase logging on your DNS server and see if 1) queries are received and 2) the (error) message when the server tries to answer it. tcpdump (on both ends) may help too. – ckujau – 2014-01-20T14:51:18.217

If installing the small gigabit switch caused this problem to appear, does -removing- that switch make it disappear again? Just to confirm that the switch is indeed the culprit or if it was just a coincidence. – Vucar Timnärakrul – 2014-01-20T23:53:21.293

I run the dig command. Here's what I got back: ... flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ... ;; AUTHORITY SECTION: vah.internal. 3600 IN SOA adcpv101.vah.internal hostmaster.vah.internal 7184539 900 600 86400 3600 – TDrabas – 2014-01-21T03:35:06.303

Yes, I tried removing the switch but the problem is still there... I'm literally running out of ideas... – TDrabas – 2014-01-21T03:51:56.330

Running dig discovery.vah.internal @adcpv101.vah.internal isn't bringing anything useful either i.e. I'm getting exactly the same response, without the ANSWER section. – TDrabas – 2014-01-21T03:56:52.910

Answers

0

If you can't ping through the hostname but IP ping works, so you likely have a DNS issue. Check if your hostname is resolving to the same IP:

host -t a hostname.domainname

You have to make sure you have this hostname registered in your local networks' DNS server.

denisvm

Posted 2014-01-20T03:28:08.257

Reputation: 604

-1

I do not have an OpenBSD installation at the moment to try this out, but I can presume that, just like Linuxes, Unixes make their NetBios names available to the network only after installing Samba. So:

  pkg_add samba-3.5.6p4

(this is the command for my 4.9, you will have to adapt it to your version). Then edit the file /etc/samba/smb.conf, and modify these two lines, in the Global Settings section, as per your needs:

  workgroup = your_workgtoup
  netbios name = your_hostname 

Restart samba and nmbd, or reboot, it should work.

MariusMatutiae

Posted 2014-01-20T03:28:08.257

Reputation: 41 321

If you are in the same broadcast domain, NetBIOS will allow simple name resolution (nmbd from samba package) inside SMB network only, so it won't work with every operating system. If you want to make sure it will work transparently for all users, you should use DNS for this. – denisvm – 2014-07-21T01:38:24.123

If Samba wasn't necessary before (otherwise the O.P. would have mentioned it), then installing it now would not only not do anything good, but create a slew of other problems which would all but prevent diagnosing the problems the O.P. already has. – Vucar Timnärakrul – 2014-01-20T23:58:35.953

Thanks Marius. I had Samba installed already a just checked the smb.conf file. I have the workgroup set up, just added the netbios and rebooted but the problem still persists. Although, for a moment there, I got a response from the server... Seems like the problem may be with the machine itself... Curious... – TDrabas – 2014-01-21T03:46:34.517