By ambedorn
I developed locally a very simple app, which takes webhooks from twitch.tv and sends messages to a Discord server. Few months ago, this app was written in php and hosted on a shared hosting provider. But recently I decided to redo it, this time in node.js and host it on DO. So before, on the shared hosting account I could see logs of all my visitors. And they would be exactly what I expect - only a few requests per day, coming from a twitch IP and sometimes google bots. On this new node.js app, I implemented morgan logging and as soon as the app started running, my logs started filling with http requests from China. Multiple requests every hour. It basically defeats the purpose of my app having a logging feature. And I really would have liked it to be able to browse my logs to see in detail what info is passing through my app. So, what are my options here? Should I use some kind of IP blocker? (I am student and would like to use a free solution)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @ambedorn,
The difference is that on the Shared Server there were already security in place.
I’ll recommend installing a firewall and configure it to block requests from an IP if it’s not in the allow list and exceeds the configured limits.
A good tool like that one would be Fail2Ban or just plain old CSF. Both have a configuration file that would allow you to block traffic from certain countries or just limit the number of requests.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.