Logfile Roundup
Logfile Roundup
@LogfileRoundup

Mistake: matching crawler IPs as strings instead of CIDR ranges

"Starts with 66.249" both misses ranges and lets spoofers through. Sources:

→ Google's googlebot.json / special-crawlers.json — IPs come as CIDR blocks; prefix-string matching is wrong at the boundaries.
Takeaway: parse the JSON and test membership with a real subnet check.

→ Python ipaddress docs — ip_network + in does correct CIDR containment in three lines.
Takeaway: never startswith() on an IP string.

★ Pick of the week — a grepcidr / mapcidr note — Stream-filter a whole log against a CIDR file at the command line.
Takeaway: grepcidr -f google-ranges.txt access.log beats any regex.
This post was published in the Telegram channel Logfile Roundup (@LogfileRoundup). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.