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.
آموزش پورتگارد
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 | دانلود کنید |
|---|---|---|---|---|
| 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 websiteپرسشهای متداول و موارد استفاده
آخرین بهروزرسانی:
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.
آیا می توانم یک نمایه ایجاد کنم و از یک ضربه استفاده کنم تا به یک IP خاص اجازه دسترسی به هر پورت سرویس را بدهم؟
بله. بند دسترسی به سرور را با OPEN_PORTS ANY پیکربندی کنید و از نمایه مشتری با ACCESS ANY استفاده کنید. نمایه را می توان یک بار تولید و وارد کرد، سپس دوباره استفاده کرد. هر ضربه معتبر یک قانون منبع IP موقت ایجاد می کند که به IP انتخاب شده توسط ALLOW_IP اجازه می دهد تا به تمام پورت های سرویس TCP و UDP دسترسی پیدا کند تا زمانی که FW_TIMEOUT منقضی شود. پس از انقضا، یک ضربه جدید ارسال کنید. این یک حالت با امتیاز بالا است: از یک بازه زمانی کوتاه استفاده کنید، از نمایه و کلیدها محافظت کنید، و به یاد داشته باشید که فایروال های ابری بالادست، قوانین روتر و احراز هویت سرویس همچنان اعمال می شوند.
fwknop در مقایسه با tnock چگونه است؟
هر دو برای پنهان کردن پورتهای شبکه طراحی شدهاند، اما fwknop یک راهکار SPA پیشرفتهتر است. tnock و دیمونهای مشابه مبتنی بر توالی باید الگوی خاصی از تلاش اتصال روی چند پورت بسته را تشخیص دهند که هم کندتر است و هم در برابر بازپخش آسیبپذیرتر. fwknop این مشکل را با ارسال یک payload واحدِ امضاشده رمزنگاریشده و دارای زمان حل میکند. مزایا: امنیت بسیار بالاتر، مقاومت در برابر replay، و یکپارچگی روان با فایروالهای مدرن.
چطور وبسایت یا سرویس خصوصی خودم را فقط برای افراد مشخص قابل دسترس کنم؟
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.
چطور امنیت و حریم خصوصی NAS متصل به شبکه عمومی را بدون نشت داده تضمین کنیم؟
قرار دادن مستقیم NAS روی اینترنت به دلیل رباتنتها و اسکنرهای دائمی بسیار پرریسک است. معمولاً دو راهکار امن وجود دارد:
- طرح ۱: Cloudflare Zero Trust (Tunnels) ترافیک NAS را بدون باز کردن پورت ورودی از شبکه Cloudflare عبور میدهد. مزایا: راهاندازی بسیار ساده، بدون نیاز به IP عمومی، و یک لایه WAF اضافه. معایب: ترافیک از سرور شخص ثالث عبور میکند، بنابراین به سیاست حریم خصوصی Cloudflare وابسته میشوید؛ سرعت انتقال هم در مسیر رایگان معمولاً محدود است و برای استریم فایلهای بزرگ ایدهآل نیست.
- طرح ۲: IP عمومی شخصی + fwknop Port Knocking روی روتر یک پورت باز میکنید اما با fwknop (SPA) از آن محافظت میکنید. پورت در اینترنت عمومی نامرئی میماند و فقط وقتی باز میشود که بسته دسترسی معتبر با امضای رمزنگاریشده ارسال کنید. مزایا: حریم خصوصی داده بسیار بالا چون از مسیر شخص ثالث عبور نمیکند، و بیشترین سرعت سختافزاری بهدلیل اتصال مستقیم (مناسب استریم ویدئو). معایب: نیاز به IP عمومی واقعی و تنظیم اولیه کمی فنیتر.
آیا بعد از باز شدن پورت، fwknop PortGuard سرعت اتصال را کم میکند؟
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]