Re: Is there any point to full host names in /etc/hosts ?
- From: David Brown <david.brown@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 07 Nov 2007 23:05:10 +0100
Moe Trin wrote:
On Wed, 07 Nov 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <4731f293$0$3218$8404b019@xxxxxxxxxxxxxxx>, David Brown wrote:
Moe Trin wrote:
I don't use dnsmasq, but I suspect you want to look at the -A option.It's the -H option (or --addn-hosts, which I use in the conf file). I don't see any -A option.
-A, --address=/<domain>/[domain/]<ipaddr>
Specify an IP address to return for any host in the given
domains. Queries in the domains are never forwarded and always
replied to with the specified IP address which may be IPv4 or
IPv6. To give both IPv4 and IPv6 addresses for a domain, use
repeated -A flags. Note that /etc/hosts and DHCP leases override
this for individual names. A common use of this is to redirect
the entire doubleclick.net domain to some friendly local web
server to avoid banner ads. The domain specification works in the
same was as for --server, with the additional facility that /#/
matches any domain. Thus --address=/#/1.2.3.4 will always return
1.2.3.4 for any query not answered from /etc/hosts or DHCP and
not sent to an upstream nameserver by a more specific --server
directive.
At least that's what it says on the man page I have ;-)
I don't know how I missed that before, but the option is in my man page now!
As far as I can see, the -H option works like a file full of -A lines, and is thus more convenient for me.
You may need to be careful if you are grabbing updates for windozeYes, it's important to be careful to avoid blocking useful domains that also host adverts. On the other hand, windows updates often cause more harm than good, so blocking them might be a good plan!
systems, as they frequently use a network bandwidth provider such as
akamai to do the actual delivery. There are other applications in
addition to those used by windoze that MAY use a bandwidth provider.
I've had reports from my users who have run into this problem with their
home installations. It's usually overly aggressive filtering/blocking on
their part. I dunno about windoze - I stopped using that in 1992.
I didn't see the -A option you mention, but the -H option loads a whole file, and it's possible to use it many times (thus the downloaded file would be in addition to the dns / dhcp server's own /etc/hosts and another list I have for local machines).
Above - The man page I have is about 900 lines long, and the -A option
is about line 250.
While I've use lynx a few times, I really don't think there are many others in my company who would be happy with it! I've bullied them all into using Firefox or Opera, and threatened them with wire cutters (for their network cables, of course) if they ever use IE, but there's a limit to my authority :-(
Well, you could always set up a local proxy server (and block outbound
access to port 80 from all but that server) and configure it to abuse the
users who try to connect using IE... but you may not win many friends by
doing so ;-)
I intend to set up a proxy server sometime (I'm going to test out squid with clamd virus scanning, at least for web-based email sites which bypass the normal email scanner). I'll log access by IE rather than block it (as the IT man, I have few enough friends...)
mvh.,
David
Old guy.
- Follow-Ups:
- Re: Is there any point to full host names in /etc/hosts ?
- From: Moe Trin
- Re: Is there any point to full host names in /etc/hosts ?
- References:
- Is there any point to full host names in /etc/hosts ?
- From: Rikishi 42
- Re: Is there any point to full host names in /etc/hosts ?
- From: Moe Trin
- Re: Is there any point to full host names in /etc/hosts ?
- From: David Brown
- Re: Is there any point to full host names in /etc/hosts ?
- From: Moe Trin
- Re: Is there any point to full host names in /etc/hosts ?
- From: David Brown
- Re: Is there any point to full host names in /etc/hosts ?
- From: Moe Trin
- Re: Is there any point to full host names in /etc/hosts ?
- From: David Brown
- Re: Is there any point to full host names in /etc/hosts ?
- From: Moe Trin
- Re: Is there any point to full host names in /etc/hosts ?
- From: David Brown
- Re: Is there any point to full host names in /etc/hosts ?
- From: Moe Trin
- Is there any point to full host names in /etc/hosts ?
- Prev by Date: Which software to setup networked MP3/Ogg rip farm??
- Next by Date: Re: Listening on many ports on Linux
- Previous by thread: Re: Is there any point to full host names in /etc/hosts ?
- Next by thread: Re: Is there any point to full host names in /etc/hosts ?
- Index(es):
Relevant Pages
|
Loading