make a wildcrd in hosts file? possible?

This is a discussion about make a wildcrd in hosts file? possible? in the Windows Networking category; 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 in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Apr 15
Created
Apr 16
Last Response
0
Likes
1 minute
Read Time
User User
Users

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.