Bug 18123

Summary: allow wildcards in /etc/hosts
Product: glibc Reporter: god12
Component: networkAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: drepper.fsp
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description god12 2015-03-12 15:43:12 UTC
Currently only trivial entries are allowed in /etc/hosts:
0.0.0.0 s.adframesrc.com
0.0.0.0 p.adframesrc.com
...
are allowed in /etc/hosts
For pinning all the subdomains to a give ip one have to run DNS server which seems like huge waste of resources for such a simple job.

Would be much better to extend glibc to parse simple wildcard entries whne performing name resolution so the entries above could be substituted with single line:
0.0.0.0 *.adframesrc.com

This would simplify configuration and maintenance (no need to run dedicated daemon) in many cases, not only ad-blocking.
Comment 1 Joseph Myers 2015-08-24 09:44:18 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 14520 ***