Linux Journal: Port Knocking

Written By
Web Webster
Web Webster
Jun 18, 2003

“Firewall administrators are challenged to balance flexibility
and security when designing a comprehensive rule set. A firewall
should provide protection against malfeasants, while allowing
trusted users to connect. Unfortunately, it is not always possible
to filter out the bad guys, because filtering on the basis of IP
addresses and ports does not distinguish connecting users. Bad guys
can and do come from trusted IP addresses. Open ports remain a
necessary vulnerability: they allow connections to applications but
also may turn into open doors for attack. This article presents a
new security system, termed port knocking, in which trusted users
manipulate firewall rules by transmitting information across closed
ports.

“Briefly, users make connection attempts to sequences of closed
ports. The failed connections are logged by the server-side packet
filtering firewall and detected by a dæmon that monitors the
firewall log file. When a properly formatted knock sequence,
playing the role of the secret used in the authentication, is
received, firewall rules are manipulated based on the information
content of the sequence. This user-based authentication system is
both robust, being mediated by the kernel firewall, and
stealthy–it’s not possible to detect whether a networked machine
is listening for port knocks. Port knocking does not require any
open ports, and it can be extended to transmit any type of
information encoded in a port sequence…”

Advertisement

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.