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
internet.
dasterdly:/etc# traceroute azlan.com
traceroute: Warning: azlan.com has multiple addresses; using
193.129.67.7
traceroute to azlan (193.129.67.7), 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 (158.43.227.4) 12.248 ms 10.513 ms 10.355
ms
4 fddi0-0.cr2.lba1.gbb.uk.uu.net (158.43.226.2) 10.792 ms 10.717 ms
10.650 ms
5 pos1-0.cr2.cbg1.gbb.uk.uu.net (158.43.254.126) 18.731 ms 18.802
ms 19.099 ms
6 pos0-1.cr2.lnd6.uk.gbb.uu.net (158.43.253.30) 21.447 ms 21.763 ms
21.818 ms
7 pos3-0.cr2.lnd8.gbb.uk.uu.net (158.43.253.145) 21.627 ms 21.540
ms 21.806 ms
8 ge2-0.cr1.lnd8.gbb.uk.uu.net (158.43.254.58) 21.669 ms 21.477 ms
21.891 ms
9 pos1-0.cr1.rea2.gbb.uk.uu.net (158.43.253.141) 20.242 ms 19.718
ms 19.818 ms
10 158.43.164.9 (158.43.164.9) 20.318 ms 20.591 ms 20.480 ms
11 azlagrou01-gw.pipex.net (193.129.67.126) 186.084 ms 93.238 ms
48.910 ms
Here is where I telnet to port 25 (its a mail server).
dasterdly:/etc# telnet azlan.com 25
Trying 10.44.65.120...
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
helo
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
# /etc/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.
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
host.conf
dasterdly:/etc# cat host.conf
order hosts,bind
multi on
resolv.conf
dasterdly:/etc# cat resolv.conf
order hosts bind
domain esc.azlan.co.uk
nameserver 10.44.69.102
nameserver 10.44.65.120
hosts
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
193.129.67.7 azlan azlan.com
10.44.70.8 azlan.com
# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Robert did you really mean assign my own address to azlan.com in my
hosts file, seems a bit weird.
Thanks
Pat
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
>
> and
>
> 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
> > dprovins@ucalgary.ca, provinsd@telusplanet.net
> > Linux is a stimulating and productive alternative to other PC operating systems.
> >
> >
> > --
> > To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> >
>
> --
> Robert S. Dubinski, <rsd@dubinski-family.org>
> http://dubinski-family.org/~rsd
>
>
> 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 debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: