• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Baidu as Guest

Gary

Active member
#1
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?
 

Mike

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

Puntocom

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

Tracy Perry

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

Puntocom

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