Knightmare Posted April 13, 2017 Share Posted April 13, 2017 I've been testing different settings and doing research on the best way to block ads. Currently, I'm running Hostsman, which added 83,785 entries for blocking ads. I'm using the following sources: -MVPS Hosts -hpHosts (Ad and Tracking Servers only) -Peter Lowe's AdServers List -Cameleon -Malware Domain List -Dan Pollock's Hosts File Despite all of the ads that are blocked, their frames are still showing. One of the reasons I like using the hosts file is because it works with all browsers. Is there a way that I can block ad frames universally through the hosts file too? I didn't know if there was a filter list that isn't included in Hostsman that would block frames specifically. Currently, I'm using uBlock Origin with just Easylist enabled to hide the frames. Also I wanted to know if using the hosts file and uBlock is overkill. I feel like a lot of the entries overlap but then again, Easylist is just for frames and not the tracking part. I was thinking that if I can find a way to block the frames in the hosts file, then I might want to switch to using NoScript. Link to comment Share on other sites More sharing options...
jbleck Posted April 13, 2017 Share Posted April 13, 2017 block frames (i guess u mean by it the "window" the ad is displayed in) through hosts... who told u this is possible? https://en.wikipedia.org/wiki/Hosts_(file) here it is what it can do... no special powers... yet. oh... the orthodox priest isn't Batman either... some people tested and seems he can't fly. Link to comment Share on other sites More sharing options...
Knightmare Posted April 13, 2017 Author Share Posted April 13, 2017 1 hour ago, jbleck said: block frames (i guess u mean by it the "window" the ad is displayed in) through hosts... who told u this is possible? https://en.wikipedia.org/wiki/Hosts_(file) here it is what it can do... no special powers... yet. oh... the orthodox priest isn't Batman either... some people tested and seems he can't fly. No one told me that it was possible. I just wanted to see if it could be done. If it can't be done, then should I used NoScript or stick with uBlock? Link to comment Share on other sites More sharing options...
Nastrahl Posted April 13, 2017 Share Posted April 13, 2017 Since blocking frames is rule based you can't do with just using the HOSTS file so you'll have to stick with uBlock for the time being. :/ Link to comment Share on other sites More sharing options...
pc71520 Posted April 14, 2017 Share Posted April 14, 2017 18 hours ago, Knightmare said: Also, I wanted to know if using the hosts file and uBlock is overkill. Kind of... Link to comment Share on other sites More sharing options...
Knightmare Posted April 14, 2017 Author Share Posted April 14, 2017 4 hours ago, pc71520 said: Kind of... I'm just using Easylist in uBlock Origin for the frame blocking. Can the filters and the hosts entries slow my connection? Link to comment Share on other sites More sharing options...
Nastrahl Posted April 14, 2017 Share Posted April 14, 2017 1 hour ago, Knightmare said: I'm just using Easylist in uBlock Origin for the frame blocking. Can the filters and the hosts entries slow my connection? I won't. Just one thing : having a huge HOST file can "block" any connection until your system DNS client service caches all the entries (and it's important to keep DNS client running unless you want to slow down your connection and flooding DNS servers), and takes a lot of RAM too after. I found which also works with Hostman if you want : https://github.com/StevenBlack/hosts A lot of curated lists with a few hosts as possible to keep your PC run smoothly but blocking the most annoyances possible. With this you don't have to find all over the Internet for lists. Link to comment Share on other sites More sharing options...
Knightmare Posted April 14, 2017 Author Share Posted April 14, 2017 6 hours ago, Nastrahl said: I won't. Just one thing : having a huge HOST file can "block" any connection until your system DNS client service caches all the entries (and it's important to keep DNS client running unless you want to slow down your connection and flooding DNS servers), and takes a lot of RAM too after. I found which also works with Hostman if you want : https://github.com/StevenBlack/hosts A lot of curated lists with a few hosts as possible to keep your PC run smoothly but blocking the most annoyances possible. With this you don't have to find all over the Internet for lists. Thanks for the information! I did find Steven Black hosts, which is what prompted me to add all of the entries that I did from Hostsman. I think the developers of Hostsman recommend disabling the DNS Client Service. My connection isn't slow with the settings that I have. Link to comment Share on other sites More sharing options...
pc71520 Posted April 15, 2017 Share Posted April 15, 2017 19 hours ago, Knightmare said: Can the filters and the hosts entries slow my connection? The larger the Hosts file, the greater the impact on Browsing... Link to comment Share on other sites More sharing options...
Knightmare Posted April 15, 2017 Author Share Posted April 15, 2017 5 hours ago, pc71520 said: The larger the Hosts file, the greater the impact on Browsing... I did notice that hpHosts has 600,000+ entries in its hosts file! When I added that, I couldn't even connect to any websites! Link to comment Share on other sites More sharing options...
Nastrahl Posted April 15, 2017 Share Posted April 15, 2017 18 hours ago, Knightmare said: Thanks for the information! I did find Steven Black hosts, which is what prompted me to add all of the entries that I did from Hostsman. I think the developers of Hostsman recommend disabling the DNS Client Service. My connection isn't slow with the settings that I have. You're welcome. They recommend wrong, since for every connection you'll do that require a name resolution (roughly 99% of them) you'll have to make a DNS request first even if you already have connected to before. You flood all the network and make your overall connection worse. It's better to have a curated HOSTS file with less IP that's actually effective than a 1809156019821 list you'll never connect to anyway. Maybe using a firewall that is HOSTS file compatible for blocking (like Comodo) will do a better job (save your profile just in case before). A better solution will be that you create your own DNS server with a Rasberry Pi or equivalent containing the HOSTS as huge as you want, then make it your primary DNS server in your Windows settings. 57 minutes ago, Knightmare said: I did notice that hpHosts has 600,000+ entries in its hosts file! When I added that, I couldn't even connect to any websites! Yeah ^^ You need to wait at least 15 minutes for the DNS client to cache all these entries, if your computer doesn't crash before since it will require a LOT LOT LOT of RAM. Link to comment Share on other sites More sharing options...
pc71520 Posted April 16, 2017 Share Posted April 16, 2017 16 hours ago, Knightmare said: I did notice that hpHosts has 600,000+ entries in its hosts file! When I added that, I couldn't even connect to any websites! Now, you know... Link to comment Share on other sites More sharing options...
Knightmare Posted April 16, 2017 Author Share Posted April 16, 2017 I did notice that Hostman has an option to rearrange lines so that up to 9 entries can be on a single line to save space in the hosts files and on the system. Is there a disadvantage to this feature? Link to comment Share on other sites More sharing options...
debebee Posted April 16, 2017 Share Posted April 16, 2017 - harder to exclude individual hosts by commenting them out.. - Link to comment Share on other sites More sharing options...
Knightmare Posted April 16, 2017 Author Share Posted April 16, 2017 1 hour ago, teodz1984 said: - harder to exclude individual hosts by commenting them out.. - I haven't had to worry about excluding entries, so I think I might have to rearranging them. I guess I could do that manually too, since it seems like if you want to add multiple entries to one line, you just separate them with a space. That would come in handy with programs like Bandicam and Photoshop. Is there a limit on how many entries you can add to one line? Link to comment Share on other sites More sharing options...
debebee Posted April 16, 2017 Share Posted April 16, 2017 Just use differrent sets and use the backup restore feature of hostman to chose what set of hosts you want to use.. This way you can have a light load if you are viewing safe sites and use a heavy set if you are surfing on the dark side of the web.. Link to comment Share on other sites More sharing options...
Knightmare Posted April 17, 2017 Author Share Posted April 17, 2017 Along with uBlock and my hosts settings, I'm also using HTTPS Everywhere. I don't know if it's actually doing anything or not with all of the security I'm using with it, not to mention I don't know how to configure the addon or if it even needs to be configured. The only setting I have enabled is for HTTPS Everywhere to block all unencrypted requests. Link to comment Share on other sites More sharing options...
Nastrahl Posted April 17, 2017 Share Posted April 17, 2017 On 16/04/2017 at 1:47 PM, Knightmare said: I did notice that Hostman has an option to rearrange lines so that up to 9 entries can be on a single line to save space in the hosts files and on the system. Is there a disadvantage to this feature? It considerably reduce the HOSTS file size (so the time DNS client service needs to cache the file so a lesser RAM consumption too) with no disadvantage since you can easily exclude any host you want with Hostman (and it's working with regex too if I remember well). (Strangely I can't find any documentation about that anywhere on the Internet but it's working) Just remember to enable the option to use 0.0.0.0 instead of 127.0.0.1 in the settings, because with 0.0.0.0 the requests to the blocked sites will be discarded instantly. With 127.0.0.1 it will search a DNS server in your localhost and wait until a timeout occurs, so you won't have a page loading for minutes for nothing. 2 hours ago, Knightmare said: Along with uBlock and my hosts settings, I'm also using HTTPS Everywhere. I don't know if it's actually doing anything or not with all of the security I'm using with it, not to mention I don't know how to configure the addon or if it even needs to be configured. The only setting I have enabled is for HTTPS Everywhere to block all unencrypted requests. If your HOSTS file is already blocking something uBlock will have nothing to block since it's already blocked. BUT, it will still "blocks" the placeholders of ads so you won't have empty frame along you pages. Link to comment Share on other sites More sharing options...
Knightmare Posted April 17, 2017 Author Share Posted April 17, 2017 2 hours ago, Nastrahl said: It considerably reduce the HOSTS file size (so the time DNS client service needs to cache the file so a lesser RAM consumption too) with no disadvantage since you can easily exclude any host you want with Hostman (and it's working with regex too if I remember well). (Strangely I can't find any documentation about that anywhere on the Internet but it's working) Just remember to enable the option to use 0.0.0.0 instead of 127.0.0.1 in the settings, because with 0.0.0.0 the requests to the blocked sites will be discarded instantly. With 127.0.0.1 it will search a DNS server in your localhost and wait until a timeout occurs, so you won't have a page loading for minutes for nothing. If your HOSTS file is already blocking something uBlock will have nothing to block since it's already blocked. BUT, it will still "blocks" the placeholders of ads so you won't have empty frame along you pages. I'm just using Easylist to block frames. The hosts file blocks the ads from tracking me. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.