Security News > 2023 > July > How to Easily Block IP Addresses From Accessing a Desktop or Server
How to Easily Block IP Addresses From Accessing a Desktop or Server In this How to Make Tech Work tutorial, Jack Wallen shows how to add another layer of security to your Linux machines with just two files.
Did you know there's a very easy way to block or allow IP addresses in Linux using two simple files? Those files are hosts.
With this ability, you could quickly block a suspicious IP address to avoid possible malicious activity; or, you could limit, say, SSH connections to only specific addresses so you don't have to worry about third parties gaining access to your servers or desktops.
Let's say you want to enable SSH access to only two machines on your network, which are at IP addresses 192.168.1.62 and 192.168.1.152; for that, at the bottom of the file, add the line sshd: 192.168.1.62, 192.168.1.152.
Allow to add another layer of security to your Linux machines.
Also See How to start, stop, and restart services in Linux How to View Your SSH Keys in Linux, macOS and Windows 6 Best Linux project management software in 2023 Top Six Linux Distributions for Your Data Center Linux, Android and more open source tech coverage.
News URL
https://www.techrepublic.com/article/how-to-block-ip-addresses-linux/