![]() |
VOOZH | about |
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Software Engineer @ DigitalOcean. Former SeΓ±or Technical Writer (I no longer update articles or respond to comments). Expertise in areas including Ubuntu, PostgreSQL, MySQL, and more.
I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix
With over 6 years of experience in tech publishing, Mani has edited and published more than 75 books covering a wide range of data science topics. Known for his strong attention to detail and technical knowledge, Mani specializes in creating clear, concise, and easy-to-understand content tailored for developers.
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!
This comment has been deleted
Another great tutorial I would like to add that is you want to reduce the number of SSH brute force attacks you can add this CHAIN to your iptables rules. Adjust accordingly to the seconds and hitcount and port for your server.
Create chain for ssh attacks
$ iptables -N SSH_CHECK
$ iptables -I INPUT -p tcp --dport 22 -m state --state NEW -j SSH_CHECK $ iptables -A SSH_CHECK -m recent --set --name SSH $ iptables -A SSH_CHECK -m recent --update --seconds 120 --hitcount 5 --name SSH -j DROP
I locked out myself from ssh ? How do i fix it?
wow⦠nice, concise, and useful⦠thank you very much
Great tutorial, it worth to add:
iptables -t nat -X
which will clean chains in nat table too.
Thank you!
Iβm having issues deleting a specific rule from my iptables. I used iptables -t nat -S to list the rule: -A POSTROUTING -s 10.8.0.0/24 ! -d 10.8.0.0/24 -j SNAT --to-source 192.168.111.111
and tried to delete it with: $ sudo iptables -D POSTROUTING -s 10.8.0.0/24 ! -d 10.8.0.0/24 -j SNAT --to-source 192.168.111.111 iptables: Bad rule (does a matching rule exist in that chain?).
Iβm sure itβs just a syntax issue but Iβm having trouble finding a reference that clears it up for me. Any help would be greatly appreciated.
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.