Re: Applications not using hosts file for name resolution
Thanks guys but still not working.
I am trying to reach a mail server that exists on our internal LAN (but
in a different office on a different subnet) as an RFC 1918 address (as
does my machine). I actually want to reach it via its public address ie
out of our firewall acrross the internet and back in via the firewall in
the other office.
Here is a the start of a traceroute, as you can see it goes out via the
dasterdly:/etc# traceroute azlan.com
traceroute: Warning: azlan.com has multiple addresses; using
traceroute to azlan (18.104.22.168), 30 hops max, 38 byte packets
1 10.44.68.1 (10.44.68.1) 0.542 ms 0.441 ms 0.349 ms
2 * * *
3 gw4.lba1.gbb.uk.uu.net (22.214.171.124) 12.248 ms 10.513 ms 10.355
4 fddi0-0.cr2.lba1.gbb.uk.uu.net (126.96.36.199) 10.792 ms 10.717 ms
5 pos1-0.cr2.cbg1.gbb.uk.uu.net (188.8.131.52) 18.731 ms 18.802
ms 19.099 ms
6 pos0-1.cr2.lnd6.uk.gbb.uu.net (184.108.40.206) 21.447 ms 21.763 ms
7 pos3-0.cr2.lnd8.gbb.uk.uu.net (220.127.116.11) 21.627 ms 21.540
ms 21.806 ms
8 ge2-0.cr1.lnd8.gbb.uk.uu.net (18.104.22.168) 21.669 ms 21.477 ms
9 pos1-0.cr1.rea2.gbb.uk.uu.net (22.214.171.124) 20.242 ms 19.718
ms 19.818 ms
10 126.96.36.199 (188.8.131.52) 20.318 ms 20.591 ms 20.480 ms
11 azlagrou01-gw.pipex.net (184.108.40.206) 186.084 ms 93.238 ms
Here is where I telnet to port 25 (its a mail server).
dasterdly:/etc# telnet azlan.com 25
Connected to uk-yk1-dc-01.azlan.com.
Escape character is '^]'.
220 uk-yk1-dc-01.azlan.com Microsoft ESMTP MAIL Service, Version:
5.0.2195.2966 ready at Tue, 28 May 2002 09:26:39 +0100
250 uk-yk1-dc-01.azlan.com Hello [10.44.70.8]
As you can see it thinks I am coming from my internal address not the
NATed public address !
Here is nnswitch.conf
dasterdly:/etc# cat nsswitch.conf
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
hosts: files dns
protocols: db files
services: db files
ethers: db files
rpc: db files
dasterdly:/etc# cat host.conf
dasterdly:/etc# cat resolv.conf
order hosts bind
dasterdly:/etc# cat hosts
127.0.0.1 dasterdly localhost localhost.esc.azlan.co.uk
10.44.70.8 dasterdly dasterdly.esc.azlan.co.uk
10.44.69.115 mail mail.esc.azlan.co.uk
220.127.116.11 azlan azlan.com
# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)
::1 ip6-localhost ip6-loopback
Robert did you really mean assign my own address to azlan.com in my
hosts file, seems a bit weird.
On Mon, 2002-05-27 at 23:27, Robert S. Dubinski wrote:
> I filed this almost a year ago as a bug, but was rebuked. It's
> something to do with glibc. Search the libc6 bugs page and you'll
> see the thread myself and some friends had with the package maintainer.
> My solution, after giving up, was to use the internal/external grouping
> capability in BIND 9.
> This bug still exists even today.
> Set the line
> hosts: files dns
> in your /etc/nsswitch.conf
> a.b.c.d www.yahoo.com # where a.b.c.d is your local machine
> in /etc/hosts
> then telnet to www.yahoo.com
> ta-da...your internal address is ignored.
> On Mon, May 27, 2002 at 07:47:53AM -0600, Dean Allen Provins wrote:
> > Pat:
> > The "order hosts bind" line should be in /etc/host.conf, and
> > formatted as "order hosts,bind". This line is followed (in my
> > /etc/host.conf file) with the single line "multi on".
> > The remainder looks fine to me.
> > Dean
> > ---------
> > On Mon, May 27, 2002 at 02:13:17PM +0100, Pat Colbeck wrote:
> > > Hi
> > >
> > > I have noticed something starnge about my Woody system. I have to
> > > maintain a hosts file due to some firewall and external DNS weirdness
> > > for some of the hosts in the office. If I ping them then they resolve
> > > via the hosts file but applications like telnet and postfix seem to be
> > > using DNS (thus getting the wrong address). Any ideas why ?
> > >
> > > Here is my resolv.conf file from /etc
> > >
> > > order hosts bind
> > > domain esc.azlan.co.uk
> > > nameserver 10.44.69.102
> > > nameserver 10.44.65.120
> > >
> > > Thanks
> > >
> > > Pat
> > --
> > Dean Provins
> > firstname.lastname@example.org, email@example.com
> > Linux is a stimulating and productive alternative to other PC operating systems.
> > --
> > To UNSUBSCRIBE, email to firstname.lastname@example.org
> > with a subject of "unsubscribe". Trouble? Contact email@example.com
> Robert S. Dubinski, <firstname.lastname@example.org>
> Homer: Here's your magazines. How many of these guys are named Corey?
> Lisa: Eight. Thanks, Dad.
> Bart's Dog Gets An F
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org