Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

quick one for Apache gurus - how to block a hostname that is simply: . -without blocking anything else. Not sure how they managed to achieve this but it seems to be a bot that doesn't want to be identified. Latest IP is uses various OS in user agent string. cheers rob

share|improve this question
Can you clarify where that hostname is coming from? A host header on a request, or the hostname of that address? – Shane Madden Mar 5 '11 at 21:39
Hi Shane - Yes, its the hostname of the address – Rothbert Mar 5 '11 at 21:59
wow. everything from the that I tried resolves to '.' – egorgry Mar 5 '11 at 22:21

You could block it with IP-tables.

iptables -I INPUT -s -j DROP
share|improve this answer
@Rothbert says that the latest IP is 204.45... so there are clearly more that have resolved to ., so iptables may not be a good solution. – Iain Mar 5 '11 at 22:30
@Iain @TiZon - that's correct, coming from a range of IPs. Wondered if there's a rewrite that would do the trick something like: RewriteCond %{HTTP_HOST} !^. ? – Rothbert Mar 6 '11 at 1:39
Can't he just block whole subnetwork in iptables? – Ency Mar 6 '11 at 9:49

Your Answer


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.