[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dselect and resolving



On Tuesday 12 February 2002 06:35, Michel Loos wrote:
> Em Ter, 2002-02-12 às 00:32, Richard Cobbe escreveu:
> > Lo, on Monday, February 11, John Cichy did write:
> > > Hello all,
> > >
> > > It seems the dselect ignores the host file when updating it's lists. I
> > > have a debian mirror in my DMZ and have added an entry in my hosts file
> > > to use an internal address to access the mirror, but it seems that
> > > dselect is ignoring that entry and trying the public address instead.
> > > Does anyone know how to make dselect look at the hosts file, my
> > > host.conf has the entry :
> > >
> > > order hosts,bind
> > >
> > > so I would think that it would resolve to the address in the host file.
> >
> > I'm not entirely sure how this works, but there's a very good chance
> > that /etc/nsswitch.conf is more significant than /etc/host.conf.  What
> > does the `hosts' line say from nsswitch.conf?
>
> I am not sure this is the problem.
> Since when using mirror you get an error, you will get the same error by
> using the enterprise.com from your hosts file, since the name to IP
> resolution is done locally the result will be exactly the same. After
> getting that error apt-get will assume wrong address and begin solving
> using the second option: dns and connect to the public server.
>

The DMZ is NAT'd, ie according to dns it has a public IP address, but the 
addresses the servers talk to are private. In my host file, I put the private 
address, this is how I know that apt is going to dns first, because it is 
saying that it is trying to connect to the public address, but when I added 
'mirror' to the hosts line defining enterprisepenguin.com, and used 'mirror' 
sources.list apt said it was connecting to the private address, but at that 
point the web server had no idea what it was supposed to serve, so it 
returned a 404.

>
> Anyway since you can't get in your server with the name mirror: you will
> not be able to use it. Put the server back in the inside zone and not in
> the DMZ.

It works now.

Thanks for your help...
John



Reply to: