2
1
I have tried dnsmasq
, squid
and this dns proxy, however, none of them does what I want. I want to do something like this:
127.0.0.1 *facebook.com
127.0.0.1 *imgur.com
Where every URL matched is redirected to 127.0.0.1
, or just straight up blocked. (whether on the command line, on apps, on browsers, simply an emulation of some of the functions of /etc/hosts
but with wildcards).
Although if nothing works, then via the browser is the most important.
1AFAIK, no version of Unix supports wildcards in
/etc/hosts
. – G-Man Says 'Reinstate Monica' – 2015-12-13T19:16:39.440@G-Man I know, that's why I want some Application to do this. – DisplayName – 2015-12-13T20:22:08.030
1Well, then, maybe you should have mentioned
/etc/hosts
fewer than three times in your question. It looks like your question is "What name resolution service will let me do wildcard mapping of host/domain names to IP addresses?" And that would be off-topic as a product request. – Scott – 2015-12-13T21:09:50.083@Scott The title was misleading ok, but the last says what I want. – DisplayName – 2015-12-13T21:23:38.390
1@DisplayName, can you please clarify if you're only trying to use this from the command line or from with apps/browsers? What's the use case and maybe we can direct you towards a better solution. Please update your post with this info – SaxDaddy – 2015-12-15T23:49:09.473