XF 1.4 Baidu as Guest

Gary

Active member
It appears all of the Baidu visits to my site are appearing as Guests (IP 123.125.71.96 baiduspider-123-125-71-96.crawl.baidu.com).

I see they are listed in Session.php to detect as a Robot, so any idea what may be causing them to appear otherwise?
 
It is not IP related. It's based on the reported user agent. It's possible they are using a user agent that is not detected. The determination is far from complete or foolproof and should really just be used as a general guide.
 
If you don't expect traffic from China I recommend you to block the entire country. I used this script in OpenBSD (you should use wget instead of ftp if you run Linux) to generate the IP list:
Code:
#!/bin/sh

PFDIR=/etc/pf-files
ZONEFILE=blocked_zones

mkdir -p ${PFDIR}
> ${PFDIR}/${ZONEFILE}

for ZONE in cn az by kz kg ru tj tm uz vn
do
ftp -o - http://ipdeny.com/ipblocks/data/countries/${ZONE}.zone >> ${PFDIR}/${ZONEFILE}
sleep 1 #respect ipdeny policies
done
From here: How to block traffic by country-IPs?

In my forum cpu usage has dropped ~50% since I blocked China and some other countries.

bots.webp
 
Why screw with a script for one thing when you can install CSF and do what you are doing and MUCH more?
Oh, that's right, last time I checked, CSF didn't work on those BSD "real secure" flavors.
 
I prefer to run non-bloated separate programs for separate tasks, packet filter is very efficient. It's part of the core so it's audited and it requires less maintenance and resources. If something fails it's easier to spot the problem when using this modular design.
 
Last edited:
Different boats for different folks... 13-15 scripts to perform the functions of 1 gets a little tedious. And for the "bloated"... CSF is no more bloated than the scripts you run..
 
Back
Top Bottom