Author Topic: Editing hosts file?  (Read 857 times)

Offline PNWDrew

  • Jr. Member
  • **
  • Posts: 50
Editing hosts file?
« on: April 30, 2015, 04:53:14 am »
way12go pointed me to http://someonewhocares.org/hosts/ to avoid using adblockers. And of course I have newbie questions about it!

Do I need to retain any of the current content of hosts?  The original lines for localhost are different and I'm not sure what I'm doing if I change them to what is included in the hosts file he linked to.  For the time being I have commented the conflicting lines out.

The original file:
127.0.0.1       localhost
127.0.1.1       debian
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

New hosts file:
#<localhost>
#127.0.0.1      localhost
#127.0.0.1      localhost.localdomain
#255.255.255.255        broadcasthost
#::1            localhost
#127.0.0.1      local
#fe80::1%lo0    localhost
#</localhost

Thanks for the suggestion way12go

Offline MoroS

  • Sr. Member
  • ****
  • Posts: 255
  • Problem solver ;)
Re: Editing hosts file?
« Reply #1 on: April 30, 2015, 12:25:09 pm »
For conflicting lines use the lines from the original file. That way, when you have any network (like DNS) issues in the future your configuration won't differ from our own (makes problem solving a little bit less frustrating). ;)
There isn't a single thing that's impossible. Just the things that we don't yet know how to deal with. ;)

Offline way12go

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 476
  • Existence is all about what matters & what doesn't
Re: Editing hosts file?
« Reply #2 on: May 04, 2015, 09:20:39 am »
I don't uncomment anything.

The default hosts file is opened via sudo filemanager ( open hosts  in filemanager )

and then I just add entire text, I don't even bothering not to  copy the uncommented text.

Here is what I do...

The default hosts text-keep it- and in the next line I copy entire text from adblock hosts file.

This is good practice.

You need to update the posted-below text as soon as new hosts-file-text is updated.

The only problem is, you don't get to support sparkylinux as sparkylinux ads are also blocked-and ad frame removed!!!!
Existence is all about what matters and what doesn't. - Sagar Gorijala.

Offline PNWDrew

  • Jr. Member
  • **
  • Posts: 50
Re: Editing hosts file?
« Reply #3 on: May 04, 2015, 05:13:32 pm »
I don't uncomment anything.

The default hosts file is opened via sudo filemanager ( open hosts  in filemanager )

and then I just add entire text.

The only problem is, you don't get to support sparkylinux as sparkylinux ads are also blocked-and ad frame removed!!!!

It seems to work well so I'll leave it as is for now. How complex would it be to write a script to check for updates to the list and change the hosts file as needed?

I assume I could find out where the ads here are served from and try removing that source from the list? I'd like to support Sparky in some manner since I was unable to get the donate button to work.