This guide verifies that your Virtru Self-Hosted Gateway is publicly reachable on your configured SMTP port (e.g., 9000, 9001, 25, 587) and can send and receive traffic successfully.
1. Install Netcat (nc)
RHEL / CentOS / Rocky / AlmaLinux:
sudo yum install -y nc # or sudo dnf install -y nc
Ubuntu / Debian:
sudo apt update sudo apt install -y netcat # or for enhanced features: sudo apt install -y netcat-openbsd
macOS (via Homebrew):
brew install netcat
Verify Installation:
nc -h
2. Check Server’s Public IP
On the Virtru Gateway server:
curl ifconfig.me
Example Output: 33.233.36.80 this your be your server external IP address
3. Start a Netcat Listener (Inbound Test)
On the gateway server:
nc -l -p <your defined port>
Alternatively: Confirm Postfix or another service is already listening:
sudo ss -tulnp | grep <your defined port>
4. Test Inbound Connectivity (From External Machine)
From an external system:
nc <public-ip> <your defined port>
Example:
nc 33.233.36.80 9001
Expected Output:
220 gw.yourdomain.com ESMTP gw.yourdomain.com
Success Criteria:
- Port is open
- DNS resolution works
- Server accepts SMTP connections
5. Troubleshooting Tips
- Ensure a listener is active on the specified port
- Verify firewall or cloud security rules allow TCP inbound on that port
-
Check listening services:
sudo ss -tulnp | grep <port>
Alternative Approaches
If you want to test if your server is reachable from the internet on your defined port, here are your options:
-
Use an Online Port Scanner:
6. Outbound Connectivity TestÂ
From the gateway server, test outbound SMTP reachability:
nc smtp.gmail.com 587 #or for Microsot nc MX Record 25 #or custom nc 1.1.1.1 25
Example Expected Output:
220 smtp.gmail.com ESMTP ...
Conclusion
Netcat confirms inbound and outbound connectivity to/from your Virtru Gateway. Seeing the SMTP 220 banner verifies that the mail server is reachable and listening.