Re: /etc/hosts file not being used - OpenBSD v5.1
Hi Raf Would rather not gives these files out as they do reveal the layout of my network. But the simple hosts file I tried was along the lines of: 127.0.0.1 localhost 192.168.1.1 myserver.domain.com TheServer Like I say the hosts file should do its work without the resolv.conf file (which I tried), so that can't by itself be the issue. Probably best to keep things simple to start with, then re-introduce the resolv.conf file later once we get the resolver using the hosts file. On Friday, 2 January 2015, Raf r...@devio.us wrote: On Fri, Jan 02, 2015 at 04:16:47PM EST, Richard Brooks wrote: As you can probably tell from the version number, I've been using OpenBSD for a while, but have only recently discovered that name resolution entries in the hosts file are not being used and that the o/s waltz's merrily off to the remote DNS server when the info it needs is in the hosts file. resolv.conf file has the 'lookup file bind' option along with entries for domain and search. Also tried deleting the hosts file and just adding a couple of entries, but no joy. The hosts file has read access for all users set. Am not running named or dhcp servers. Just did an o/s and user land update. That didn't help either. Also tried renaming resolv.conf to _resolv.conf and rebooted so the o/s didn't have a resolv.conf file, the default behaviour in this scenario being that the hosts file is all that gets used, but alas it's not so. Does anyone have any ideas on what's going on? Hi Richard, Could you include both the 'hosts' and 'resolv.conf' files, please? As already pointed out, how are you doing the lookup? Regards, Raf -- Regards Richard
Re: /etc/hosts file not being used - OpenBSD v5.1
On Fri, Jan 02, 2015 at 04:16:47PM EST, Richard Brooks wrote: As you can probably tell from the version number, I've been using OpenBSD for a while, but have only recently discovered that name resolution entries in the hosts file are not being used and that the o/s waltz's merrily off to the remote DNS server when the info it needs is in the hosts file. resolv.conf file has the 'lookup file bind' option along with entries for domain and search. Also tried deleting the hosts file and just adding a couple of entries, but no joy. The hosts file has read access for all users set. Am not running named or dhcp servers. Just did an o/s and user land update. That didn't help either. Also tried renaming resolv.conf to _resolv.conf and rebooted so the o/s didn't have a resolv.conf file, the default behaviour in this scenario being that the hosts file is all that gets used, but alas it's not so. Does anyone have any ideas on what's going on? Hi Richard, Could you include both the 'hosts' and 'resolv.conf' files, please? As already pointed out, how are you doing the lookup? Regards, Raf
Re: /etc/hosts file not being used - OpenBSD v5.1
On Fri, Jan 02, 2015 at 09:16:47PM +, Richard Brooks wrote: As you can probably tell from the version number, I've been using OpenBSD for a while, but have only recently discovered that name resolution entries in the hosts file are not being used and that the o/s waltz's merrily off to the remote DNS server when the info it needs is in the hosts file. resolv.conf file has the 'lookup file bind' option along with entries for domain and search. Also tried deleting the hosts file and just adding a couple of entries, but no joy. The hosts file has read access for all users set. Am not running named or dhcp servers. Just did an o/s and user land update. That didn't help either. Also tried renaming resolv.conf to _resolv.conf and rebooted so the o/s didn't have a resolv.conf file, the default behaviour in this scenario being that the hosts file is all that gets used, but alas it's not so. Does anyone have any ideas on what's going on? How are you checking that /etc/hosts is not used? Some commands (like dig) ignore /etc/hosts always. -Otto
Re: /etc/hosts file not being used - OpenBSD v5.1
Hi Raf, It's all been sorted. Should have used getent to check my tweaks. On Friday, 2 January 2015, Raf r...@devio.us wrote: On Fri, Jan 02, 2015 at 04:53:32PM EST, Richard Brooks wrote: Hi Raf Hi Richard, Would rather not gives these files out as they do reveal the layout of my network. But the simple hosts file I tried was along the lines of: Content of 'resolv.conf' might be crucial here - otherwise you may be wasting all our time here. I'm not asking for a verbatim copy of either of the files but knowing which options you have used apart from the aforementioned 'lookup' and 'nameserver', would be very nice. 127.0.0.1 localhost 192.168.1.1 myserver.domain.com TheServer You haven't answered my other question - how are you doing the lookup? host myserver.domain.com or host myserver or host TheServer also, please specify which utility you are using (host?). Regards, Raf -- Regards Richard
Re: /etc/hosts file not being used - OpenBSD v5.1
On Fri, Jan 02, 2015 at 04:53:32PM EST, Richard Brooks wrote: Hi Raf Hi Richard, Would rather not gives these files out as they do reveal the layout of my network. But the simple hosts file I tried was along the lines of: Content of 'resolv.conf' might be crucial here - otherwise you may be wasting all our time here. I'm not asking for a verbatim copy of either of the files but knowing which options you have used apart from the aforementioned 'lookup' and 'nameserver', would be very nice. 127.0.0.1 localhost 192.168.1.1 myserver.domain.com TheServer You haven't answered my other question - how are you doing the lookup? host myserver.domain.com or host myserver or host TheServer also, please specify which utility you are using (host?). Regards, Raf