make a wildcrd in hosts file? possible?

ive been using my hosts file to block bad stuff. For example I have blocked by routing to 127. 0. 0. 1 I would like to route *. baddomain. com to 127. 0. 0. 1 I tried this with a ping hgjtdgvje.

Windows Networking 2246 This topic was started by ,


data/avatar/default/avatar03.webp

581 Posts
Location -
Joined 2002-04-27
ive been using my hosts file to block bad stuff.
For example I have blocked www.baddomain.com by routing to 127.0.0.1
 
I would like to route
*.baddomain.com to 127.0.0.1
 
I tried this with a
ping hgjtdgvje.baddomain.com and the real ip resolved. Is there a way to do it?

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar03.webp

581 Posts
Location -
Joined 2002-04-27
OP
I didnt mention it but I did also block
baddomain.com and grsgreger.baddomain.com still resolved.

data/avatar/default/avatar03.webp

581 Posts
Location -
Joined 2002-04-27
OP
Can windows DNS server support wildcards? this could be a solution for me. (I have a windows server in my home.

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
If you setup your DNS server to be authoritative for a given zone, it will return results for any record in that zone. This behavior includes host names and subdomains for that zone. So, if you are looking for a record in somedomain.com, and your server is hosting that zone, it will state if that record is available or not. Therefore, you can setup that zone with no records in it and any system using that DNS server will never find valid hosts in it.