XF 1.4 Baidu as Guest


Active member
It appears all of the Baidu visits to my site are appearing as Guests (IP 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?


XenForo developer
Staff member
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.


Well-known member
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:


mkdir -p ${PFDIR}

for ZONE in cn az by kz kg ru tj tm uz vn
ftp -o - http://ipdeny.com/ipblocks/data/countries/${ZONE}.zone >> ${PFDIR}/${ZONEFILE}
sleep 1 #respect ipdeny policies
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.


Tracy Perry

Well-known member
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.


Well-known member
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:

Tracy Perry

Well-known member
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..