By kartikdhar
So our website (clothing e-commerce startup) was recently attacked by an SYN flood initiated by a Chinese IP. It took almost a full day getting everything back up, reloading the database, copying images etc. - Needless to say, not a very pleasant experience and lost a lot of precious time.
Tech stack: Django 1.6.7/ Postgres / Nginx / Gunicorn / Elasticsearch
I want to know what all I can do to prevent something like this from happening again. Have already done the following steps, following the DO tutorials (they are great btw) at https://www.digitalocean.com/community/tutorial_series/new-ubuntu-14-04-server-checklist
Anything else I can do to prevent such a hack from happening again? Also do I need to install fail2ban given that root login is disabled and UFW rules are setup?
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!
I am not tech expert here but no matter how strong steps we take, if some one wants to hack, he/she or they will hack… Heck even country specific security and intelligence agencies with highest level protection possible gets hacked…
Anyway, try CDN service as a layer of extra protection and services like cloudflare allows you to block specific region, like China for ex.
Manual via server rules, and firewall, you can block, but professional service like CDN services has much better database of such blocked IP or faster update as IP gets handed over from one ISP to another !!
Regarding security, best is a good backup cycle, with professional website like yours, top up with modular backup also…
So when things goes wrong, restore ASAP…
With CDN, even if server IP gets change, impact is minimal since Domain was and will continue to resolve to that CDN provider and its CDN provider’s end your IP details may get modified…
I agree with hunky, but there are many tools that may help you out a bit. I would highly recommend OSSEC Great write up on DO here It is an intrusion detection system, but has a couple of ips features like iptables dropping. This should stop brute force attacks. Also is you limit your root login to Digital Ocean to ssh keys that would almost certainly reduce the risk of hacking. That said make sure file and folder permissions are all good and search the web for other things to do. Web applications are usually the weak point in a hacking attempt as their surface area is much greater. Hope this helps! And good luck!
Hii, MicroPyramid sponsored Django-mfa is a simple package to add extra layer of security to your django web application. It gives web app a randomly changing password as an extra protection. Follow documentation and raise issues if you want further support, features.
Read more about multifactor authentication: https://micropyramid.com/blog/securing-django-with-multi-factor-authentication-using-django-mfa/ Get the code in our git repository, https://github.com/MicroPyramid/django-mfa For detail documentation visit http://django-mfa.readthedocs.io/en/latest/index.html
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.