>goatse.cx It's actually an email service now. hello.jpg is gone.
Using a Hosts File To Make The Internet Not Suck As Much
91–100 of 104 posts
Re: Using a Hosts File To Make The Internet Not Suck As Much
#92Earlier quoted context omitted.
Will browsers immediately fail the connection, or will it try to make the connection and wait for a timeout? I generally use 0.42.42.42 because Class-A addresses can't start with 0, so they fail immediately.
IIRC, addresses 0/8 addresses are for multicast, so depending on your and your upstream's router configuration, that potentially sends those requests to a weird set of hosts on your class-A.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#93Can most of this be accomplished more easily by using OpenDNS?
If you use the hosts file, your browser doesn't need to wait to make the DNS request to OpenDNS, since it already has the loopback/null route in hosts.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#94Earlier quoted context omitted.
If every entry routes to 127.0.0.1, what's the worst that could happen?
One can also null route them as well via 0.0.0.0. Hosts tend to die instantly that way versus timing out with 127.0.0.1
Re: Using a Hosts File To Make The Internet Not Suck As Much
#95Earlier quoted context omitted.
If you use the hosts file, your browser doesn't need to wait to make the DNS request to OpenDNS, since it already has the loopback/null route in hosts.
But you have an entire community addressing real time changes (like adding sites that get infected with malware or being used in phishing attacks) and dealing with false positives.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#96goatse.cx isn't objectionable any more. It's a (novelty, of course) email provider.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#97Earlier quoted context omitted.
If every entry routes to 127.0.0.1, what's the worst that could happen?
One can also null route them as well via 0.0.0.0. Hosts tend to die instantly that way versus timing out with 127.0.0.1
Honestly, there's no need for this stuff in the age of browser based ad blocking. I gave up on it when I saw how easy it was to write rules and wildcards in ad block plus. Interest in it fell. I'm surprised to see one still maintained.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#98Could someone post the same approach, but using bind (DNS), handling all those entries in one zone? Is it possible?
First, create a zone file that all of the domains will share. I put mine in /var/named/master/dummy:
$TTL 1d
@ IN SOA ns1.localdomain. hostmaster.ns1.localdomain. (
2012100601 ; serial
8h ; refresh
2h ; retry
7d ; expire
1h ; default_ttl
)
;
; Name servers
;
@ IN NS ns1.localdomain.
@ IN NS ns2.localdomain.
;
; Host addresses
; Leave commented to return NXDOMAIN
; Uncomment to resolve to IP address
;@ IN A 127.0.0.1
I prefer not resolve these hosts at all (NXDOMAIN), because it seems to be faster and I don't want client machines to probe themselves, but you can uncomment the A record and use whatever IP address you want (e.g. for sinkhole monitoring). Remember to increment the serial number with every edit (which will be rare or never, once you've set it to your liking).Next, create a simple file with each domain you want to block on one line. I put mine in /var/named/dummy:
ads.example.com
tracker.example.com
example.org
Now create a conf file in the format bind expects, pointing every domain to the zone file (for convenience, put this in /var/named/Makefile in a 'dummy' target): sed 's/.*/zone "&" { type master; file "master\/dummy"; };/' dummy.conf
Which will result in /var/named/dummy.conf containing: zone "ads.example.com" { type master; file "master/dummy"; };
zone "tracker.example.com" { type master; file "master/dummy"; };
zone "example.org" { type master; file "master/dummy"; };
Finally, add to your named.conf: include "/var/named/dummy.conf";
Restart bind and you're now authoritative for those zones on your network!Re: Using a Hosts File To Make The Internet Not Suck As Much
#99Is there an IP block lists for Servers ? I see a lot of traffic from ip addresses that seem to probe my measly AWS EC2 instance and I wish there was a list I could feed to my NGINX or IPtables so they would just drop those packets .
Why would you want to block search engines and other crawlers?
Re: Using a Hosts File To Make The Internet Not Suck As Much
#100Could someone post the same approach, but using bind (DNS), handling all those entries in one zone? Is it possible?
Yes, it's actually pretty easy. First, create a zone file that all of the domains will share. I put mine in /var/named/master/dummy: $TTL 1d @ IN SOA ns1.localdomain. hostmaster.ns1.localdomain. ( 2012100601 ; serial 8h ; refresh 2h ; retry 7d ; expire 1h ; default_ttl ) ; ; Name servers ; @ IN NS ns1.localdomain. @ IN NS ns2.localdomain. ; ; Host addresses ; Leave commented to return NXDOMAIN ; Uncomment to resolve…
One of these days I'm gonna roll my own DNS server in Python with a sane configuration syntax.