Whitelisting CQG's ports and IPs in your Windows VPS firewall can help improve connection stability and reduce interruptions — especially during high-volume trading hours. Follow the steps below to create both inbound and outbound rules using Windows Defender Firewall with Advanced Security.
IPs and ports last verified: July 2026.
Video Guide
Step #1: Open Windows Defender Firewall
On your VPS, search for and open:
Windows Defender Firewall with Advanced Security
In the left sidebar, you’ll see options for Inbound Rules and Outbound Rules
Step #2: Whitelist Ports 31654
Go to Inbound Rules
Click New Rule → choose Port → click Next
Select TCP and enter:
31654
Select Allow the connection → click Next
Apply to all profiles (Domain, Private, Public)
Name the rule: CQG Ports
Click Finish
Step #3: Outbound Rule (Ports)
Repeat the same steps above under Outbound Rules
→ Name the rule: CQG Ports (Outbound)
Step #4: Whitelist CQG IP Addresses (Inbound Rule)
Still under Inbound Rules, click New Rule
Select Custom, then click Next
Navigate to the Scope tab
Under “Remote IP address,” select These IP addresses
Click Add, and enter the following IP:
208.48.16.130
Under Protocol and Ports, leave default (Any) → click Next
Under Action, select Allow the connection → click Next
Apply to all profiles → click Next
Name the rule: CQG - Inbound IPs
Click Finish
Here is the matching Outbound Rule section for whitelisting CQG IPs:
Step #5: Whitelist CQG IP Addresses (Outbound Rule)
Go to Outbound Rules, click New Rule
Select Custom, then click Next
Go to the Scope tab
Under “Remote IP address,” select These IP addresses
Click Add, and enter the following IP:
208.48.16.130
Under Protocol and Ports, leave as default (Any) → click Next
Under Action, choose Allow the connection → click Next
Apply to all profiles → click Next
Name the rule: CQG - Outbound IPs
Click Finish
Step #6: Confirm Rules Are Active
After adding the rules:
Open the Firewall rule list under Inbound and Outbound Rules.
Ensure the new rules are listed and enabled (green checkmarks).
Restart your platform and test connectivity to confirm improvements.
Pro Tip: Use This PowerShell Script to Automate the Entire Process
# ===============================
# CQG Firewall Whitelist Script
# ===============================
# Run as Administrator
Write-Host "Creating Windows Firewall rules for CQG..." -ForegroundColor Cyan
# --- Step 2: Inbound Port 31654 ---
New-NetFirewallRule -DisplayName "CQG Port (Inbound)" `
-Direction Inbound -Action Allow -Protocol TCP -LocalPort 31654 `
-Profile Domain,Private,Public
# --- Step 3: Outbound Port 31654 ---
New-NetFirewallRule -DisplayName "CQG Port (Outbound)" `
-Direction Outbound -Action Allow -Protocol TCP -LocalPort 31654 `
-Profile Domain,Private,Public
# --- Step 4 & 5: Whitelist CQG IP (Inbound & Outbound) ---
$cqgIPs = @(
"208.48.16.130"
)
foreach ($ip in $cqgIPs) {
# Inbound IP rule
New-NetFirewallRule -DisplayName "CQG - Inbound IP $ip" `
-Direction Inbound -Action Allow -RemoteAddress $ip `
-Profile Domain,Private,Public -Protocol Any
# Outbound IP rule
New-NetFirewallRule -DisplayName "CQG - Outbound IP $ip" `
-Direction Outbound -Action Allow -RemoteAddress $ip `
-Profile Domain,Private,Public -Protocol Any
}
Write-Host "CQG Firewall Rules have been successfully created." -ForegroundColor Green
Need Assistance?
Our support team is available 24/7. If you have any questions or run into issues, open a support ticket from your QuantVPS dashboard and we'll get back to you as quickly as possible.
