Under attack from ByteSpider bots from Singapore

Hi, I have a small Ghost blog at https://ghost-tech.up.railway.app/ that's serving the blog for https://techinterview.coach/blog (through a Netlify redirect). I am under attack from a ByteSpider crawler from Singapore, that's causing my Cloudinary usage (and bills) to spike. I am trying to block them. So far: - I have put https://techinterview.coach/ behind Cloudflare, but I think bots are hitting the railway.app domain directly so I am not sure this will help. - I've modified the https://ghost-tech.up.railway.app/robots.txt to disallow crawling. Can I do anything else? Is there a way to put the railway app domain itself behind CloudFlare? Thanks, Andrea
13 Replies
Percy
Percy2y ago
Project ID: 3e1d8e5a-85d2-453c-ae03-c5983d51b5e0
.valiumknight
.valiumknightOP2y ago
3e1d8e5a-85d2-453c-ae03-c5983d51b5e0
Brody
Brody2y ago
you can change the railway domain
ThallesComH
ThallesComH2y ago
As brody suggested change the domain. you can also block any traffic that isn't going through cloudflare, just validates if the origin IP is from Cloudflare: https://www.cloudflare.com/ips/ Also, you can probably block their user agent https://stackoverflow.com/questions/57908900/what-is-the-bytespider-user-agent Here's a guide for doing that in Cloudflare: https://developers.cloudflare.com/waf/tools/user-agent-blocking/
.valiumknight
.valiumknightOP2y ago
Amazing - thank you! How do I validate that the IPs are from Cloudflare? I will change the domain in the meantime, but keen to learn alternatives in case they find the new one...
Brody
Brody2y ago
that depends entirely on what kind of app you are running maybe there's a middleware available that will only respond to cloudflare ip's
.valiumknight
.valiumknightOP2y ago
GitHub
GitHub - railwayapp-templates/ghost: A self-hosted version of Ghost...
A self-hosted version of Ghost with a MySQL database. - GitHub - railwayapp-templates/ghost: A self-hosted version of Ghost with a MySQL database.
.valiumknight
.valiumknightOP2y ago
btw, looks like the robots.txt and putting https://techinterview.coach behind cloudflare solved the problem... can't tell which of the two though...
.valiumknight
.valiumknightOP2y ago
traffic before
.valiumknight
.valiumknightOP2y ago
traffic after
Brody
Brody2y ago
62.7 thousand holy moly
.valiumknight
.valiumknightOP2y ago
I know, brutal...
Want results from more Discord servers?
Add your server