![]() |
VOOZH | about |
Exposing services to the internet is always a risk but is often the entire reason behind having a server in the first place. Any open port or exposed service can be subjected to a quite a lot of probing and access attempts by malicious users or automated scripts.
While some services must remain accessible because they are meant to be publicly consumable (like a web server hosting a site), other services are only meant to be used by one or a few authorized users and no one else (like SSH). In the best case scenario, these services would be well secured, but also only accessible when we actually want to use them.
Single Packet Authentication is a method of allowing the firewall to block access to a service until a specialized, encrypted packet is sent to a listening service. When the service validates this packet, it promptly modifies the firewall rules to expose the needed port.
A tool called fwknop, which stands for Firewall Knock Operator, can be used to interpret these packets and modify firewall rules. In this guide, we will be configuring a fwknop server and client on Ubuntu 12.04 systems. This will enable us to shield our SSH server until specifically requested.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Port knocking is a security concept that involves dynamically altering firewall rules to expose access to an otherwise protected service. This is done by sending a pre-configured special packet, or a pattern of packets that the port knocking software is listening for. In this series, we will discuss a variety of ways to configure port knocking to add an extra layer of security around your SSH daemon.
Former Senior Technical Writer at DigitalOcean, specializing in DevOps topics across multiple Linux distributions, including Ubuntu 18.04, 20.04, 22.04, as well as Debian 10 and 11.
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!
Thanks for the great tut.
I want to know if there is a way to combining psad and Fwsnort or not!!!
It would be very interesting to know about that.
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.