Jump to content



Photo

Local DNS mac differences

Answered Go to the full post

  • Please log in to reply
13 replies to this topic

#1 rancid-lemon

rancid-lemon

    Neowinian

  • Joined: 05-March 09
  • Location: UK

Posted 04 February 2014 - 22:19

Interesting one for you all, anyone know me what is going on?

 

Background: I have just purchased a new mac - an entirely new experience for me actually, having only had PC's before.

 

I have noticed that the mac won't resolve my hostnames on my pfsense local DNS, not completely anyway. A little explanation:

 

Hostname 1: pfsense

Works on both windows and mac when typing in the url bar of a browser.

 

Hostname 2: TEXT-10

Only works on windows based browser when typed in the url bar. Mac just sends me off on a google search.

 

Could this be because of the '-' in the second hostname? I don't know why it wouldn't resolve one when it's perfectly happy with the other.

 

I'm probably missing some information for a diagnosis but since I don't know what im looking for I thought I would keep it relatively short and sweet. Happy to provide any more information if anyone has any ideas :)

 

Cheers all.

 

rancid

 

 



Best Answer +BudMan , 10 February 2014 - 13:56

Well perfect, if your running pfsense - just create whatever dns records you need

 

 

If pfsense is also your dhcp server - then have it register those entries

 

 

I would also suggest the bottom two checkmarks - so that your not forwarding say hostname to your isp when there is no domain on it, and would last one no reason to do rfc1918 ptr upstream.

Go to the full post



#2 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 74
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 04 February 2014 - 23:49

What is the fqdn of the hosts?  What is the domain your mac is in?

 

nslookup is a valid tool on mac

https://developer.ap...nslookup.1.html

 

I would suggest you use it to validate if a fqdn resolves or not from the mac.

 

- is a valid character for host names be it dns or even netbios only.  Atleast in MS specification of netbios names.  I am not aware if macs broadcast like a windows box will do? for a host name..

 

So simple sniff shows that windows will broadcast for something that is not resolvable.. So you see here that I put testhostname in my browser address bar, my machine queries my dns adding the domain local.lan - dns returns hey can not find that, so then the box broadcasts for the hostname

 

broadcast.png

 

broadcastdetails.png

 

I would do the same thing if trying to determine what your mac does when you put your host name in the browser window to find out how its its asking, and where its asking and if it broadcasts for it, etc.



#3 OP rancid-lemon

rancid-lemon

    Neowinian

  • Joined: 05-March 09
  • Location: UK

Posted 05 February 2014 - 21:53

Cheers for the reply budman. I will have a bash at this tomorrow and see what I can find out :)



#4 OP rancid-lemon

rancid-lemon

    Neowinian

  • Joined: 05-March 09
  • Location: UK

Posted 09 February 2014 - 22:02

Update: There seems to be a well known issue with macs accessing windows (non-mac) hosts by hostname -and not much by way of obvious solution. I am pushed for time at the moment so I have just stuck an entry into the hosts file for the time being. This has sorted the resolving. Not very elegant though and only a temp solution so I will look into it further in the not too distant future.

 

FYI I can successfully ping TEXT-10.local - fairly sure I tried that before the hosts entry!.

 

Further troubleshooting to follow.

 

Cheers,

 

rancid



#5 Brian M.

Brian M.

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 07-January 05
  • Location: London, UK

Posted 09 February 2014 - 22:08

I have a similar problem - in my case it wasn't a DNS problem, but a Safari glitch. Safari doesn't seem to recognise non FQDN addresses, instead just redirecting to a Google search as if you were looking for whatever word you were typing.

For example, if I type "lightwave" it will take me to a google search for home, rather than http://lightwave. I guess it's just a downside to having a combined address and search bar.

Pinging lightwave will always work fine, however.

#6 OP rancid-lemon

rancid-lemon

    Neowinian

  • Joined: 05-March 09
  • Location: UK

Posted 09 February 2014 - 23:10

Sounds like a little edit of the hosts file may work for you too.

 

Just remember you will have to manually update the IP if/when it changes, you will also have to do this on all macs individually.

 

Not ideal, hence wanting to find the time to further look into it.

 

I don't think it's a safari issue as such, try out the hosts file edit and see if it works. Either way, needs more looking into what is going on as per budman's suggestion above to see what the mac is actually doing.

 

I will keep this thread updated as I find out more info.

 

Cheers,

 

rancid



#7 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 74
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 10 February 2014 - 01:22

Why would you be using host files?  Just put your machines into your dns - I am guessing your routers dns is just blows chucks?  Then run your own - its quite simple to just download BIND and run a real dns server, and support of dynamic updates from your clients.

 

Or just grab http://tftpd32.jounin.net/ it has dhcp server, dns, etc.. etc.. It allows for static dhcp (reservations) etc..  So your machines would always get the same IP - and therefore you have no need to change any "host" file.



#8 The_Decryptor

The_Decryptor

    STEAL THE DECLARATION OF INDEPENDENCE

  • Tech Issues Solved: 3
  • Joined: 28-September 02
  • Location: Sol System
  • OS: iSymbian 9.2 SP24.8 Mars Bar

Posted 10 February 2014 - 01:52

OS X can do NetBIOS name lookups, but I'm pretty sure it keeps it separate from normal DNS lookups, so something like connecting to an SMB share will work, but trying the same name in Safari would probably fail. That said, Safari doesn't seem to accept plain hostnames (falls back to Google search), you need to provide a FQDN for them (Yet another reason to use a central DNS setup)

#9 OP rancid-lemon

rancid-lemon

    Neowinian

  • Joined: 05-March 09
  • Location: UK

Posted 10 February 2014 - 07:18

@budman
My current problem is understanding. I literally do not understand what is going on, and as I have said time to learn is limited at the moment.

As far as I was aware, and I think I mentioned previously, I am running my own DNS from pfSense.

@the_decryptor
That sounds like what a brief Google search seemed to be saying yesterday. Note though that that safari does work just entering 'pfsense' (not a FQDN). This leads me to think that something else is going on.

#10 The_Decryptor

The_Decryptor

    STEAL THE DECLARATION OF INDEPENDENCE

  • Tech Issues Solved: 3
  • Joined: 28-September 02
  • Location: Sol System
  • OS: iSymbian 9.2 SP24.8 Mars Bar

Posted 10 February 2014 - 07:42

I just tried Safari again, seems it will connect to a plain hostname if it's already in the history, otherwise it defaults to a search (Although you can force it via the dropdown, one of the options is "Go to")

So for me, "openwrt" goes to Google, "openwrt.lan" loads my router page, but going to "openwrt" manually then stops Safari doing a search next time. Firefox on the other hand works fine since it tries hostnames first, then doing a search if it fails.

#11 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 74
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 10 February 2014 - 13:56   Best Answer

Well perfect, if your running pfsense - just create whatever dns records you need

 

dnsentriespfsense.png

 

If pfsense is also your dhcp server - then have it register those entries

 

dhcpindns.png

 

I would also suggest the bottom two checkmarks - so that your not forwarding say hostname to your isp when there is no domain on it, and would last one no reason to do rfc1918 ptr upstream.



#12 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 74
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 10 February 2014 - 14:05

So - didn't have safari installed..  Grabbed it so could do this simple test, see my tplink alias from my dns listing in the above post

 

safarihostnames1.png

 

keep in mind, my box is in the local.lan domain - and will add it to search..

 

So here is sniff of it finding that.. I flushed my local cache with ipconfig /flushdns and then opened safari again

 

fqdnisaskedfor.png

 

Notice how it does a fqdn lookup vs just netbios broadcast..  My machine is in that domain, and local.lan is in the search suffix list

 

suffix.png



#13 OP rancid-lemon

rancid-lemon

    Neowinian

  • Joined: 05-March 09
  • Location: UK

Posted 10 February 2014 - 18:52

Cheers budman, that sorted it. It makes sense too! The entries weren't being entered into my DNS in the first place!

 

I do have a question regarding the host override image you posted though, why would I need these? I don't have any entries in this section. Is it because you aren't using pfSense as your dhcp server?

 

Cheers,

 

rancid



#14 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 74
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 10 February 2014 - 19:31

Many of my devices are not dchp, some are that are in there are with reservations.  For example that brother entry is my printer - its static, so I put a entry into dns for it.  I have aliases for some devices, etc.

 

Doesn't hurt anything to have the entries in there even if they are pulling IPs from dhcp - But since I assign most of my devices specific IPs either static on the device or through a reservation I like to have the dns in there so it resolves to the IP be it there is a dhcp lease or not active for that device.





Click here to login or here to register to remove this ad, it's free!