Re: Is there any point to full host names in /etc/hosts ?



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 windoze
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.
Yes, 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!

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
.



Relevant Pages

  • Re: VMware ESXi
    ... Virtual Server because my bios does not support virtualization. ... the vSpere client on my XP workstation. ... Now I want to create another VM on the same host this ... egg scenario if you have VMWare running with a DHCP assigned ...
    (microsoft.public.windows.server.sbs)
  • Re: Email Programming using System.Web.Mail
    ... 'The book' says that if you do not supply a target 'host', either in the constructor or by setting the Host property then the instance will use whatever is specified in your application or machine configuration files. ... While it doesn't say so in so many words, it implies that it doesn't 'look' anywhere else, therefore I would expect that, if you don't specify it and it isn't specified in either of the configuration files, an exception would be thrown when you call the Send method. ... The SmtpClient class is, as it's name suggests, a 'client' object and not a 'server' object. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VMware ESXi
    ... the vSpere client on my XP workstation. ... Now I want to create another VM on the same host this ... the VM server through the client and then click the DVD/CD Connect ... egg scenario if you have VMWare running with a DHCP assigned ...
    (microsoft.public.windows.server.sbs)
  • Re: VMware ESXi
    ... Now I want to create another VM on the same host this time ... Using the vSphere client on my desktop I can go ... the VM server through the client and then click the DVD/CD Connect ... egg scenario if you have VMWare running with a DHCP assigned ...
    (microsoft.public.windows.server.sbs)
  • Re: DHCP client - Help configuring.
    ... The DHCP server did not pass a host name for this host to use. ... error processing name service request ...
    (comp.os.vms)

Loading