You are not logged in.

#1 2016-11-21 21:05:21

schwim
Member
From: Coastal VA, Murica
Registered: 2015-09-29
Posts: 342
Website

routing domain to blackhole or localhost?

Hi there folks!

I need to route a few troublesome domains to localhost or blackhole so I can keep the browser from attempting to contact them.  I did some googling but during my effort to follow instructions(this one for instance), I'm finding that my file structure isn't anywhere close to those listed so I'm unable to attempt it.

Does anyone have some instructs or a tutorial they could point out specifically for our version of Deb?

Thanks for your time!


Schw.im! A social site with an identity crisis.

Offline

#2 2016-11-22 11:45:09

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,755

Re: routing domain to blackhole or localhost?

@nobody, and

0.0.0.0 someDomainToBlock.com

is not what would one want?

Last edited by brontosaurusrex (2016-11-22 11:45:24)

Offline

#3 2016-11-22 18:36:16

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: routing domain to blackhole or localhost?

+1 to the editing of the /etc/hosts file. While it doesn't scale well if you have a metric ton of domains to block, it's great if you have a couple of troublesome domains. Creating a script to automate the task should be pretty simple as well.

Nobody, when you say 0.0.0.0 is a "meta address" do you mean that anything sent there is still technically looked at as a valid IP, from your browser or program but is dropped by your router?


**EDIT**

Nevermind found my answer:
" If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens on 0.0.0.0, it will be reachable at both of those IPs."

Last edited by Horizon_Brave (2016-11-22 18:40:08)


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#4 2016-11-22 22:04:28

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: routing domain to blackhole or localhost?

nobody wrote:
Horizon_Brave wrote:

+1 to the editing of the /etc/hosts file. While it doesn't scale well if you have a metric ton of domains to block, it's great if you have a couple of troublesome domains. Creating a script to automate the task should be pretty simple as well.

Nobody, when you say 0.0.0.0 is a "meta address" do you mean that anything sent there is still technically looked at as a valid IP, from your browser or program but is dropped by your router?


**EDIT**

Nevermind found my answer:
" If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens on 0.0.0.0, it will be reachable at both of those IPs."

Binding a socket to 0.0.0.0 will make it listen on all interfaces, that is correct, though the meaning of 0.0.0.0 in this usage context is different from using 0.0.0.0 to designate a non-existing destination. The meaning of 0.0.0.0 is very context- and also implementation-specific.


Also, *that* is different than when you see a 0.0.0.0 in a routing table though right? In a routing table, the default route is usually set for 0.0.0.0  right? So any destination that's not listed on the routing table specifically, falls into the 0.0.0.0 category? Is that the same thing to what you're referring to?


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

Board footer

Powered by FluxBB