Networking Forums

Networking Forums > Computer Networking > Linux Networking > /etc/hosts used only sometimes

Reply
Thread Tools Display Modes

/etc/hosts used only sometimes

 
 
graeme.pietersz@gmail.com
Guest
Posts: n/a

 
      03-07-2005, 10:16 AM
I wanted to override DNS in order to see an old version of a web site.

So I added the IP of the old version to /etc/hosts

The result was:

Graphical web browsers usually show the new site (IP from DNS), but
occaisionally show the old (IP from /etc/hosts).
HTTPS in graphical web bowser takes me to the old site - new site has
no SSL BTW
Ping picks up the IP from /etc/hosts, as does Telnet
HTTP with Lynx takes me to a directory listing containing files from
both servers - and not a full listing of either. Clicking through to a
file or directory shows it correctly
Https with Lynx goes to the old site (i.e. IP from /etc/hosts).
wget behaves much as Lynx does, but gets stuck after the first few
files over plain http (becuase it tries to get the file from the wrong
server?).
ftp transfers of directories containg a few hundred files seem to leave
me with some files missing - I am not sure about this though.

I do not know how it would affect things but the old version was on a
dedicated server, new is on a shared host.

Can anyone tell me what is happening and how I can get a complete
backup (or even better wget a snapshot) of the old site. At the moment
I am trying wget over ssl: seems to be working but very slowly.

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      03-07-2005, 04:31 PM
(E-Mail Removed) wrote:
> I wanted to override DNS in order to see an old version of a web site.
>
> So I added the IP of the old version to /etc/hosts
>
> The result was:
>
> Graphical web browsers usually show the new site (IP from DNS), but
> occaisionally show the old (IP from /etc/hosts).
> HTTPS in graphical web bowser takes me to the old site - new site has
> no SSL BTW
> Ping picks up the IP from /etc/hosts, as does Telnet
> HTTP with Lynx takes me to a directory listing containing files from
> both servers - and not a full listing of either. Clicking through to a
> file or directory shows it correctly
> Https with Lynx goes to the old site (i.e. IP from /etc/hosts).
> wget behaves much as Lynx does, but gets stuck after the first few
> files over plain http (becuase it tries to get the file from the wrong
> server?).
> ftp transfers of directories containg a few hundred files seem to leave
> me with some files missing - I am not sure about this though.
>
> I do not know how it would affect things but the old version was on a
> dedicated server, new is on a shared host.
>
> Can anyone tell me what is happening and how I can get a complete
> backup (or even better wget a snapshot) of the old site. At the moment
> I am trying wget over ssl: seems to be working but very slowly.
>


What is the DNS resolution order in /etc/resolv.conf?

Do you have a HTTP cache/proxy running (squid)? The things
you see may be stale data from a cache.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
graeme.pietersz@gmail.com
Guest
Posts: n/a

 
      03-09-2005, 06:28 AM
Tauno Voipio wrote:
> (E-Mail Removed) wrote:
> > I wanted to override DNS in order to see an old version of a web

site.
> >
> > So I added the IP of the old version to /etc/hosts
> >
> > The result was:
> >
> > Graphical web browsers usually show the new site (IP from DNS), but
> > occaisionally show the old (IP from /etc/hosts).
> > HTTPS in graphical web bowser takes me to the old site - new site

has
> > no SSL BTW
> > Ping picks up the IP from /etc/hosts, as does Telnet
> > HTTP with Lynx takes me to a directory listing containing files

from
> > both servers - and not a full listing of either. Clicking through

to a
> > file or directory shows it correctly
> > Https with Lynx goes to the old site (i.e. IP from /etc/hosts).
> > wget behaves much as Lynx does, but gets stuck after the first few
> > files over plain http (becuase it tries to get the file from the

wrong
> > server?).
> > ftp transfers of directories containg a few hundred files seem to

leave
> > me with some files missing - I am not sure about this though.
> >
> > I do not know how it would affect things but the old version was on

a
> > dedicated server, new is on a shared host.
> >
> > Can anyone tell me what is happening and how I can get a complete
> > backup (or even better wget a snapshot) of the old site. At the

moment
> > I am trying wget over ssl: seems to be working but very slowly.
> >

>
> What is the DNS resolution order in /etc/resolv.conf?
>
> Do you have a HTTP cache/proxy running (squid)? The things
> you see may be stale data from a cache.
>
> --
>
> Tauno Voipio
> tauno voipio (at) iki fi


No proxy or cache on my LAN, alhtough i think my ISP may well run a
transparent proxy the problem hs lasted almost a week which seems a
rather long time to cache it. I have a small LAN connected to ADSL so
it is a consumer connection :-(

resolv.conf contains:

search localdomain
nameserver 192.168.101.1

the IP address is of the ADSL router modem.

nsswitch.conf contains the line:

hosts: files nisplus nis dns

which is the default Mandrake 10.1 setting (I am not actually using so
I assume the two middle entries will be ignored)

Can nsswtich be over-ridden by resolv.conf or elsewhere?

Thanks,

Graeme

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LAN with no hosts :( will 18 Linux Networking 12 10-18-2006 11:39 PM
hosts file McHenry Linux Networking 2 06-08-2006 08:03 PM
hosts.deny and hosts.allow problem dan Linux Networking 3 06-15-2005 07:26 PM
Many Hosts via few Modems Walter Harms Linux Networking 5 01-20-2004 12:05 PM
hosts JW Linux Networking 1 12-20-2003 02:22 PM



1 2 3 4 5 6 7 8 9 10 11