How to use port call waiting to secure an SSH service on Linux
Port call waiting is a great technique for controlling access to a port by allowing only legitimate users to access the service running on the server. It works in such a way that when the correct connection attempt sequence is established, the firewall will preferably open a closed port. The logic of port knocking is to protect your Linux system from automatic port scanners barking at open ports. In this guide, we will look at how to set up port call waiting and how to configure it to secure your SSH service. For demonstration purposes we use Ubuntu 18.04 . Step 1: Install and configure knockd To get started, log in to your Linux system and install knockd daemon as shown. $ sudo apt install knockd
Once installed, open knockd.conf configuration with the desired text editor. Here we use the vim command line text editor. $ sudo vim /etc/knockd.conf
The default configuration file is displayed as follows. knockd configuration file Below [openSSH] section, we need to ch...