access logs as delivered to cPanel

Started by basd, July 08, 2021, 02:06:09 AM

Previous topic - Next topic

basd

My question is whether I can put a statement in .htaccess that will insure I receive IP addresses in my raw access log file.

I have a website on a shared hosting account.  Recently, my account began providing hostname_lookup rather than raw IPs. The best information from the hosting company tech support is that if I put hostname deny statements (eg., deny someone.com), then my raw access logs will show hostname_lookup. I have a pretty long deny list, but I attempted as a test to remove all hostname deny statements.  I still failed to get IP addresses. Maybe I have [still] overlooked an error, because among other things I found a deny statement I made that was "deny xxx-xxx-xxx-xxx" instead of "deny xxx.xxx.xxx.xxx". It's possible I have overlooked a similar statement.

It would be helpful if I could elicit IP addresses along with hostname_lookup.  Hostname blocking can be more convenient than IP blocking. But, sometimes this is not useful.  The reason is, a few of the hostname_lookup names are gibberish and the IP cannot be found by DNS lookup. So, I could end up trying to block an infinite number of hostnames.

Thank you for any help you can provide.

mario