How to update hosts file dynamically?

Using applications, configuring, problems
Post Reply
Message
Author
Bushbuck
Posts: 179
Joined: Sat 26 Jan 2013, 01:33

How to update hosts file dynamically?

#1 Post by Bushbuck »

I use a "hosts" file to block popups etc, but recently I wanted to relax the rules temporarily, to allow through a site (waterhole webcam) that has adverts.

Not surprisingly, just editing "hosts" didn't take effect -- it appears to be (efficiently) cached somewhere in memory.

What process or service would I have to stop and start, to make the system re-read the hosts file, or does this require a reboot?

Using Tahr Puppy 6.02.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hi, bushbuck.

Do you mean that putting a number sign ("#") in front of the url line you want to allow
didn't work? That's how I do it, and it works for me every time. It's immediate, too, you
don't have to reboot your computer or restart your browser.

I don't know exactly how the hosts process works, but I don't think anything is stored in
RAM or at a secondary location in your Puppy. I think the hosts file is read (directly or
indirectly), where it is at /etc/hosts, by the browser, every time, before it tries to access
an outside URL.

I hope this helps. Bye for now.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Bushbuck
Posts: 179
Joined: Sat 26 Jan 2013, 01:33

#3 Post by Bushbuck »

Yes, putting the # didn't seem to work.
musher0 wrote:I think the hosts file is read (directly or
indirectly), where it is at /etc/hosts, by the browser, every time, before it tries to access
an outside URL.
Thanks, musher... maybe the browser (Pale Moon 24) is doing something weird, then. I'll experiment some more.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#4 Post by musher0 »

If you have additional ad blockers such as ghostery and ad-block, maybe they have
caches in RAM and delay things. Try de-activating them. (Just working with the hosts
file -- as a test.)

I noticed that you need only one blocker. Two is overkill. Problem is no one blocker
blocks everything you want blocked.

Your puppy should have a "Puppy ad-blocker" entry in the Internet sub-menu. Have
you tried it? What it does is, It creates a maxi hosts file from various reliable sources.
With it, you don't need ghostery, etc. Easier to edit, too, since it's on your machine at /
etc/hosts.

BFN.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Bushbuck
Posts: 179
Joined: Sat 26 Jan 2013, 01:33

#5 Post by Bushbuck »

Thanks for the explanation, musher.

I've been using the manually installed hosts file, just because I knew how to do it that way, and getting the list from the MSVP site. I prefer the hosts method anyway, because I can see how it works. I don't have any other blockers installed.

I'll give the combined hosts in the menu a shot -- can't hurt to add a few more pests to the list.

Meanwhile, it turned out the waterhole webcams also broadcast on Youtube, and seemed to get through OK:
https://www.youtube.com/user/WildEarthMedia

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#6 Post by Ted Dog »

no hosts.allow file in your linux?

Bushbuck
Posts: 179
Joined: Sat 26 Jan 2013, 01:33

#7 Post by Bushbuck »

Ted Dog wrote:no hosts.allow file in your linux?
Yes, there is -- it says
ALL: LOCAL

Isn't that about who gets to see my system, or am I not understanding it?

Post Reply