Search squid archive

Re: Resolve ip_address to hostname in access.log ( no dns lookup )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/02/2012 5:26 a.m., Jevos, Peter wrote:
Hi

I'd like to store the hostnames instead of ip addresses of our AD PCs in the access.log
I know that there's feature log_fqdn, but as far as I know it works as the DNS resolver.
This however doesn't work for me, because we don't have PTR records of PCs at the DNS server ( DHCP is Cisco )

Lack of PTR record is your problem and is a violation of DNS interoperability requirements that every IP address have a reversible hostname associated. The problem you are facing is one of the reasons that it is a requirement.

To resolve this configure the DDNS update features of your Cisco DHCP server. It can register allocated IPs and hostname with DNS, just needs configuring. Check your documentation for teh DHCP and DNS servers for how to do that.


However , I have samba there and command "nmblookup -A IP_Address" works without any problem

Is it possible to implement nmblookup hostname resolving to store the hostnames in the access.log ?

To quote wikipedia:
"A host name meaningful to a Microsoft NetBIOS <http://en.wikipedia.org/wiki/NetBIOS> workgroup may be an invalid Internet <http://en.wikipedia.org/wiki/Internet> hostname"


As a workaround if you really can't be bothered making proper PTR registrations you can do anything with a external_acl_type ACL helper and output a result line ' OK log="blah" '
This log text "blah" can be logged with %ea in a custom access.log format

http://www.squid-cache.org/Doc/config/external_acl_type/
http://www.squid-cache.org/Doc/config/logformat/


Amos


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux