Egress IP Routing & VPN
Many APIs require whitelisting specific IP addresses. KnoxCall supports routing requests through dedicated egress servers with static IPs—either managed by KnoxCall or through your own VPN infrastructure.The Problem
Dynamic IPs:- Banking and financial APIs (Open Banking, Plaid)
- Government services (tax, compliance)
- Enterprise B2B integrations
- Payment processors (some configurations)
- Internal corporate APIs
The Solution
Static egress IP:- ✅ Single static IP to whitelist
- ✅ Works from any source (dev, staging, prod)
- ✅ Automatic failover if egress server down
- ✅ Choose geographic region
- ✅ Multiple egress IPs per tenant (if needed)
Types of Egress Routing
KnoxCall supports two deployment models:1. Managed Egress Servers (Recommended)
What it is:- KnoxCall provisions and manages egress servers for you
- Static IP provisioned in your chosen region
- Automatic health monitoring and failover
- No infrastructure management required
- You need a quick, turnkey solution
- You want KnoxCall to handle operations
- You don’t have existing VPN infrastructure
- 🇺🇸 US East (New York)
- 🇺🇸 US West (San Francisco)
- 🇪🇺 EU West (London)
- 🇪🇺 EU Central (Frankfurt)
- 🇦🇺 APAC (Sydney)
- 🇸🇬 APAC (Singapore)
- Included in Business and Enterprise plans
- $29/month per additional egress server (if you need multiple regions)
2. Self-Hosted VPN Integration
What it is:- Connect KnoxCall to your existing VPN infrastructure
- Routes traffic through your VPN gateway
- You manage the VPN server, KnoxCall just uses it
- You have existing VPN infrastructure
- Compliance requires self-hosted networking
- You need specific routing or firewall rules
- You want full control over egress traffic
- WireGuard
- OpenVPN
- Custom proxy servers (SOCKS5, HTTP forward proxy)
- Included in Enterprise plan
- Contact sales for availability on lower tiers
Setting Up Managed Egress
Step 1: Request Egress Server
- Navigate to Infrastructure → Egress Servers
- Click Create Egress Server
- Configure:
- Click Provision
Step 2: Wait for Provisioning
KnoxCall automatically:- Creates a DigitalOcean Droplet in your region
- Configures forward proxy software
- Assigns a static IP (reserved IP)
- Sets up health checks
- Registers in data plane registry
Step 3: Note Your Static IP
After provisioning completes:Step 4: Assign to Routes
Configure which routes use the egress server: Option A: Per-environment (recommended)- Go to route detail page
- Select environment (e.g., “production”)
- Scroll to Advanced → Egress Routing
- Select egress server: “US East Egress”
- Save
Step 5: Test & Verify
Make a test request through your route:203.0.113.200.
Setting Up Self-Hosted VPN
Prerequisites
- VPN server (WireGuard or OpenVPN)
- VPN configuration file or credentials
- Network access from KnoxCall servers
Step 1: Prepare VPN Configuration
WireGuard example:Step 2: Register VPN in KnoxCall
- Navigate to Infrastructure → Data Plane Nodes
- Click Add Self-Hosted VPN
- Configure:
- Click Save
Step 3: Test Connection
KnoxCall will:- Establish VPN tunnel
- Perform health check (if configured)
- Report connectivity status
Step 4: Assign to Routes
Same as managed egress—assign the VPN node to routes via environment configuration.Advanced Configuration
Multiple Egress Servers per Tenant
Use different egress IPs for different APIs:- Route A (Stripe) → uses US East Egress
- Route B (European bank) → uses EU West Egress
- Route C (partner) → uses Corporate VPN
Failover & High Availability
Managed egress servers:- Automatic health monitoring (every 30 seconds)
- If unhealthy, routes fall back to direct routing
- Email alerts on failover
- Auto-recovery when health restored
- Manual health check URL (optional)
- No automatic failover unless configured
- You’re responsible for VPN uptime
Regional Routing
Route requests through the closest region to the destination API:Security Considerations
Managed Egress Servers
Isolation:- Dedicated Droplet per egress server (not shared)
- Firewall rules restrict traffic to your routes only
- No direct SSH access (managed via API)
- Requests authenticated with tenant-specific secret
- HMAC signature verification
- Replay attack prevention
- All traffic logged
- Health checks every 30 seconds
- Alerts on anomalies
Self-Hosted VPN
Security checklist:- VPN credentials stored encrypted in KnoxCall
- Firewall allows only KnoxCall server IPs
- VPN configuration doesn’t expose internal network
- Health check endpoint authenticated (if public)
- Egress traffic monitored on your side
- Ensure VPN tunnel doesn’t grant KnoxCall access to internal network
- Use split tunneling (only route API traffic through VPN)
- Configure firewall rules on VPN gateway
Monitoring & Troubleshooting
Health Status
Check egress server health:active- Healthy and routing traffic ✅unhealthy- Failed health check ⚠️unreachable- Cannot connect 🔴provisioning- Being created 🔄
Request Logs
View which requests used egress routing:Common Issues
Problem: “Egress server unreachable”- Check server status in dashboard
- If managed: wait 2-3 min for auto-recovery
- If self-hosted: verify VPN server is running
- Check firewall allows KnoxCall IPs
- Verify correct egress server assigned to route
- Check route’s environment is correct
- Test with:
curl https://ifconfig.me/ipthrough egress server - Confirm API provider whitelisted the right IP
- Check for typos in IP address (common!)
- Egress server in wrong region (e.g., US egress for EU API)
- VPN has high latency
- Use egress server closest to destination API
- For self-hosted VPN: measure VPN latency
- Consider multiple regional egress servers
- Check VPN server logs for disconnections
- Increase WireGuard PersistentKeepalive value
- Configure health check to detect failures faster
- Ensure firewall isn’t blocking keep-alive packets
Cost Optimization
When to Use Egress Routing
Use egress when:- ✅ API requires IP whitelisting
- ✅ You need consistent source IP for logging/audit
- ✅ Compliance mandates specific egress points
- ✅ API has regional restrictions
- ❌ API doesn’t require IP whitelisting
- ❌ Added latency is critical (use direct routing)
- ❌ Route has very high traffic (cheaper to provision own server)
Multi-Tenant Cost Sharing
For enterprise deployments with many routes:API Reference
Create Managed Egress Server
Register Self-Hosted VPN
Assign to Route Environment
List All Egress Servers
Delete Egress Server
Best Practices
✅ Do This
-
Test with dummy route first
- Create test route, assign egress, verify IP
- Don’t configure production routes immediately
-
Document which API requires which IP
- Keep spreadsheet of API → egress IP mappings
- Share with team for future reference
-
Set up alerts
- Email when egress server goes unhealthy
- Monitor latency changes
-
Use regional egress servers
- Match egress region to API region when possible
- Reduces latency
-
Keep egress credentials secure
- For self-hosted VPN, treat credentials as secrets
- Rotate VPN keys quarterly
❌ Avoid This
-
Don’t use same egress for unrelated APIs
- If one API blocks your IP, all routes affected
- Use separate egress servers for high-risk APIs
-
Don’t skip health checks for self-hosted VPN
- You’ll only discover downtime when users complain
- Set up health check URL
-
Don’t delete egress server while routes use it
- Routes will fall back to direct routing
- May break IP whitelisting
-
Don’t expose internal network via VPN
- Use split tunneling
- Firewall VPN gateway appropriately
Migration Guide
From Direct Routing to Egress
Before:- Provision egress server
- Get static IP
- Contact API provider to whitelist IP
- Wait for confirmation (don’t skip!)
- Assign egress to route (test environment first)
- Test
- Assign to production
- Monitor
- Remove
data_plane_node_idfrom route - Traffic reverts to direct routing
Next Steps
Multi-Region Deployment
Deploy KnoxCall across regions
Route Configuration
Learn about route setup
Monitoring
Monitor egress server health
Security
Secure your routes
📊 Guide Info
- Level: Intermediate to Advanced
- Time: 15-30 minutes
- Prerequisites: Understanding of IP whitelisting and networking
🏷️ Tags
egress, vpn, networking, ip-whitelisting, infrastructure