Build a Linux firewall, that will only be opened when you needed it to be | Linux Today

Build a Linux firewall, that will only be opened when you needed it to be

Written By
Web Webster
Web Webster
Mar 31, 2009

[ Thanks to Ggarron
for this link. ]

“One of the beauties about Linux is that it is really
easy to administer it remotely, but that is also one of the major
concerns about Linux security, if you have weak passwords, you are
exposed to attacks, there are lots of ways to protect yourself, one
of the easiest is to close the firewall, and only permit access to
port 22 from some specific IPs, but this is not an option if you
travel a lot or if you do not have a fixed IP, at the place you use
to be when you access your remote server.

“Another approach is to have something like DenyHosts or
fail2ban, both of them do almost the same, they block a port, (22
in the most used cases) when a threshold point of number of tries
have been reached.

“Now I have found another way, you may have your firewall closed
by default, but you will be able to open it when you need to access
your server, and closed it again after use, the package that will
do the magic is knockd, and as its name says, you will knock the
door of the firewall and it will open itself for you, but you will
need a secret type of knock, it is like the “Open/Close, Simsim”
(Open/Close sesame).”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.