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 204.45.209.208 uses various OS in user agent string. cheers rob
Asked
Active
Viewed 982 times
1
-
2Can you clarify where that hostname is coming from? A host header on a request, or the hostname of that 204.45.209.208 address? – Shane Madden Mar 05 '11 at 21:39
-
Hi Shane - Yes, its the hostname of the address 204.45.209.208 – Rothbert Mar 05 '11 at 21:59
-
wow. everything from the 209.xxx that I tried resolves to '.' – egorgry Mar 05 '11 at 22:21
1 Answers
1
You could block it with IP-tables.
iptables -I INPUT -s 204.45.209.208 -j DROP

Bart De Vos
- 17,911
- 6
- 63
- 82
-
@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. – user9517 Mar 05 '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 06 '11 at 01:39
-
1