Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to disable reverse DNS in Apache 2. I have done the following steps:

In apache2/apache2.conf file ,HostnameLookups is set as OFF

Tcpdump session confirmed thatApache was doing double reverse lookups even though the HostnameLookupsdirective was clearly turned off.

No hostnames insites-available. The problem still remains.

UPD: version of apache is

dpkg -l | grep apache2

ii apache2-mpm-prefork 2.2.16-6+squeeze4 Apache HTTP Server - traditional non-threaded model

ii apache2-utils 2.2.16-6+squeeze4 utility programs for webservers

ii apache2.2-bin 2.2.16-6+squeeze4 Apache HTTP Server common binary files

ii apache2.2-common 2.2.16-6+squeeze4 Apache HTTP Server common files

apache2 -l

Compiled in modules:

core.c

mod_log_config.c

mod_logio.c

prefork.c

http_core.c

mod_so.c

I think mod_security is not present.

share|improve this question

migrated from superuser.com Oct 30 '12 at 15:07

This question came from our site for computer enthusiasts and power users.

    
are any apache modules enabled that may cause this behaviour? Especially things like mod_security? –  Martin Oct 30 '12 at 11:39
    
@Martin Mod_security module is not present, any other solution? –  Creighton Hale Nov 2 '12 at 23:32
    
I would start by eliminating possibilities. Use a2dismod to disable as many modules as possibles. You can re-enable them with a2enmod. Make sure its not related to some dynamic content served etc. –  Martin Nov 3 '12 at 17:05
1  
@Martin Regardless of the setting, when mod_authz_host is used for controlling access by hostname, a double reverse lookup will be performed. I have disabled mod-authz_host still the same problem. Also I have compiled with -DMINIMAL_DNS option. Still the same. Any suggestions? Thanks in advance. –  Creighton Hale Nov 6 '12 at 16:13

2 Answers 2

Apache does not perform double nameserver lookups (i.e. client IP -> PTR -> A record must match client IP). This kind of functionality is used by mail servers only.

Regardless, if HostNameLookups is Off, and there are no hostnames used inside any vhost definitions or access rules, some 3rd-party module is doing this.

mod_security is a likely candidate, as Martin said before.

share|improve this answer

Can you please share your configuration? I tried to resolve similar situation. In my configuration I have "deny from none". In google is many topic that it is a reason for hostname lookups.

share|improve this answer
    
This should be a comment, not an answer. –  dawud Aug 8 '13 at 20:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.