PortGuard: Keep Your Services Invisible to Scanners
PortGuard combines a modified fwknop-based server with a cross-platform client that supports the fwknop SPA protocol. Ports stay closed by default and open temporarily only after a valid AES/GPG-signed packet is verified.
Quick Server Install
Installs the latest open-source package built by GitHub Actions from the PortGuard server repository.
curl -fsSL https://portguard.net/install.sh | sudo bash
Traditional Exposure Mode (Risk)
- ✕Ports remain open all day and are continuously probed by global scanners.
- ✕Exposed services face brute-force attempts and exploit attacks directly.
- ✕Firewall allowlists become complex to maintain and lack dynamic flexibility.
PortGuard Mode (Solution)
- ✓Default Deny: Ports are completely invisible before authorization (stealth).
- ✓SPA Auth: Only specially formatted encrypted single packets can trigger access.
- ✓Dynamic Access: Temporarily allow only the source IP, then close automatically.
Core Features
Core Security Features
Strong defaults for teams that want SSH, admin panels, and private services to disappear until authorization is intentional.
Efficient SPA Communication
Send fwknop-compatible single-packet authorization without TCP handshake overhead, with strong stealth.
AES/GPG + HMAC
Integrated SHA256 integrity checks ensure commands are authentic and untampered.
Full Port Stealth
Default DROP behavior makes services appear unreachable to scanners.
Replay Attack Resistance
Time-window validation plus integrity checks quickly invalidates old packets.
PortGuard Client
A cleaner fwknop-compatible client for every device.
PortGuard Client supports the fwknop SPA protocol. Profiles, one-tap SPA, QR import, encrypted export, and activation stay compatible with fwknopd and PortGuard Server workflows.
How It Works
Security Workflow
PortGuard runs at the firewall edge of protected servers. It continuously inspects network traffic for authorization packets without exposing service handshakes externally.
Generate Authorization Packet
The client uses keys and a timestamp to generate an encrypted single packet.
Handshake-less Delivery
The packet is sent via UDP and similar methods, making handshake-based probing ineffective.
Dynamic Open
After validation, the server temporarily allows the source IP and then automatically removes the rule.
Use Cases
SSH Remote Operations
Protect port 22 and make it visible only briefly after an admin sends SPA.
Multi-Cloud Security
Unified access control across AWS/Azure and more to reduce exposure.
IoT Device Management
Protect IoT control interfaces and avoid direct public exposure.
ACL Automation
Combine scripts and rule cycles to automate temporary authorization.
Downloads and Installation
Supports multi-platform clients and server-side packages
Server Packages
Install PortGuard Server on Debian, Ubuntu, Rocky, CentOS, and OpenWrt
Use the quick installer for supported Linux servers, or download the latest package generated from the open-source GitHub Actions release pipeline.
Quick Install
One command server setup
curl -fsSL https://portguard.net/install.sh | sudo bash
The script detects the operating system, selects the matching package from the GitHub release manifest, verifies SHA256, installs dependencies, and leaves fwknopd ready for configuration export to PortGuard Client.
Open Source Release
Packages synced from GitHub
These packages are built automatically by GitHub Actions from the public PortGuard server source code.
| System | Version | Architecture | Package | Download |
|---|---|---|---|---|
| Loading packages from GitHub release... | ||||
Related Products
Product
OpenAT
Secure, time-locked data storage powered by drand's mathematical certainty. Encrypt your future today without a central authority.
Visit website
Product
Lockmem
End-to-end encrypted personal media vault for your NAS. Privacy-first management for your self-hosted infrastructure.
Visit websiteFAQ & Use Cases
Last updated:
What is the relationship between PortGuard and fwknop?
PortGuard is built around the fwknop SPA protocol. PortGuard Client is a cross-platform client that sends fwknop-compatible SPA packets, while PortGuard Server is a modified server based on the upstream fwknop project. Compared with traditional sequence-based port knocking, this single encrypted packet model is faster, stealthier, and resistant to replay attacks.
Can I generate one profile and use one knock to allow a specific IP to access every service port?
Yes. Configure the server access stanza with OPEN_PORTS ANY and use a client profile with ACCESS ANY. The profile can be generated and imported once, then reused. Each valid knock creates a temporary source-IP rule that allows the IP selected by ALLOW_IP to reach all TCP and UDP service ports until FW_TIMEOUT expires. After expiration, send a new knock. This is a high-privilege mode: use a short timeout, protect the profile and keys, and remember that upstream cloud firewalls, router rules, and service authentication still apply.
How does fwknop compare to tnock?
While both aim to cloak network ports, fwknop is a more advanced Single Packet Authorization (SPA) solution. tnock and similar sequence-based knocking daemons rely on detecting a specific pattern of connection attempts across multiple closed ports, which takes longer to execute and is vulnerable to replay attacks. fwknop resolves this by transmitting a single, cryptographically signed and timestamped payload. The advantage of fwknop is significantly higher security, resistance to replay attacks, and seamless integration with modern firewalls.
How can I make my website or private service accessible only to specific people?
By default, PortGuard Server, modified from fwknop, configures your server's firewall to block all inbound traffic to your service port. The service appears completely offline to the public. When an authorized user needs access, they use PortGuard Client with their unique cryptographic key to send a fwknop-compatible Single Packet Authorization (SPA) packet. Once verified, the server dynamically whitelists their current IP address for a brief period.
How to ensure the security and privacy of a NAS exposed to the public network without leaking data?
Exposing your NAS directly to the internet is highly risky due to constant botnets and scanner probes. There are generally two secure solutions:
- Plan 1: Cloudflare Zero Trust (Tunnels) This routes your NAS traffic through Cloudflare's network without opening any inbound ports. Pros: Very easy to set up, no public IP required, provides an extra WAF layer. Cons: Traffic must pass through a third-party server, meaning you rely on Cloudflare's privacy policy. Transfer speeds are often limited by Cloudflare's free tier routing, which is not ideal for large media file streaming.
- Plan 2: Self-hosted Public IP + fwknop Port Knocking You open a port on your router but protect it with fwknop (SPA). The port remains invisible to the public internet and only opens when you send a valid cryptographically-signed access packet. Pros: 100% data privacy since you don't route traffic through third-party servers. Maximum hardware transfer speeds (great for video streaming) since connection is direct. Cons: Requires a real public IP address and a slightly more technical initial setup.
Does fwknop PortGuard slow down my connection speed after the port is opened?
No. The fwknop-compatible PortGuard Server only handles the initial authorization packet. Once the firewall rule is dynamically created and your IP is authorized, your connection via SSH, WireGuard, or directly to your NAS operates directly between your client and the server at full line speed.
Trusted by DevOps and Security Experts Worldwide
Official Contact
Need help with PortGuard?
For purchase recovery, activation issues, deployment questions, or security reports, contact the official PortGuard support mailbox.
[email protected]