Secure Socket Tunneling Protocol (SSTP) is a reliable VPN transport that encapsulates PPP traffic inside TLS over TCP. It is commonly used because it traverses restrictive firewalls and proxies by appearing as HTTPS traffic. While SSTP defaults to TCP port 443, there are practical reasons to run it on a custom port — avoiding conflicts, working around ISP port filtering, or coexisting with a webserver on the same host. This guide walks through the technical considerations and step‑by‑step configuration patterns for deploying SSTP on custom ports, with attention to security, performance tuning, and troubleshooting for system administrators, developers and enterprise operators.
Why run SSTP on a custom port?
Using a non‑standard port for SSTP can be necessary or desirable when:
- Port 443 is already used by a web server or reverse proxy on the same IP.
- An ISP blocks or inspects traffic on 443 in a way that breaks SSTP.
- You want to isolate admin/control planes across different ports for security policies.
- Load balancing or multi‑tenant setups require distinct TCP listeners per tenant.
Note: custom ports remove the “HTTPS disguise” advantage to some extent — deep packet inspection can still identify VPN traffic — so deploy additional countermeasures if stealth is required.
Architectural options
There are three common approaches to host SSTP on a custom port:
- Change the SSTP daemon’s listening port — where supported (e.g., Linux SSTP server implementations).
- Use a TLS reverse proxy (nginx, HAProxy, stunnel) to accept traffic on a custom port and forward it to a local SSTP backend on a different port or socket.
- Port-forward at the network edge (firewall/NAT) from the public custom port to the SSTP server’s internal port 443.
Which approach to choose?
For Windows RRAS SSTP deployments, the SSTP listener is bound via HTTP.SYS and typically expects port 443; changing that is complex. Using a reverse proxy or firewall DNAT is the practical choice. On Linux, modern SSTP servers (for example, accel‑ppp with SSTP plugin or the sstp‑server projects) allow configuring a custom listen port directly.
Certificate and TLS considerations
SSTP is TLS‑based; TLS configuration is the security foundation:
- Use an X.509 certificate issued by a trusted CA that matches the server hostname clients use; with a custom port the hostname behavior is unchanged.
- Prefer RSA 2048+ or ECDSA P‑256+ keys. Use ECDHE cipher suites to ensure Perfect Forward Secrecy (PFS).
- Disable legacy TLS versions and weak ciphers: allow TLS 1.2 and TLS 1.3 only. Turn off RSA key exchange, MD5, and RC4.
- Enable OCSP stapling on the TLS frontend (nginx/HAProxy) to improve revocation checks and performance.
Example nginx TLS config snippet (for a reverse proxy listening on port 8443):
<!– place in server block –>
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers ‘ECDHE‑ECDSA‑AES128‑GCM‑SHA256:ECDHE‑RSA‑AES128‑GCM‑SHA256:…’;
Port binding and firewall rules
When choosing a custom port (e.g., 8443, 10443, 55555), ensure you update network ACLs and host firewall rules. Below are sample command patterns.
iptables / nftables examples
iptables DNAT from public port 8443 to local 443:
iptables -t nat -A PREROUTING -p tcp –dport 8443 -j DNAT –to-destination 10.0.0.5:443
Allow forwarding and firewall accept:
iptables -A FORWARD -p tcp -d 10.0.0.5 –dport 443 -m state –state NEW,ESTABLISHED -j ACCEPT
For nftables:
nft add rule ip nat prerouting tcp dport 8443 dnat to 10.0.0.5:443
If you run a local reverse proxy listening on the custom port, add a local firewall rule instead:
iptables -A INPUT -p tcp –dport 8443 -m state –state NEW,ESTABLISHED -j ACCEPT
Configuring common server implementations
Windows Server (RRAS)
- RRAS binds SSTP to the SSL stack via HTTP.SYS and typically listens on 443. Changing the port is not supported via RRAS UI. Recommended options: use a reverse proxy (e.g., IIS ARR with URL Rewrite) or perform port forwarding at the edge router.
- Install the SSL certificate in the machine personal store and bind it to the HTTPS namespace used by SSTP via netsh http add sslcert (used internally by RRAS).
- Ensure RRAS has SSTP enabled and user authentication configured (EAP, MS‑CHAPv2, or certificate‑based authentication).
Linux SSTP servers
- For accel‑ppp or sstp‑server, set the listen port in the daemon’s config (check the specific project’s docs). Example accel‑ppp section: listen = 0.0.0.0:10443;
- Use systemd socket activation if desired so the service is started when the port is accessed; create a .socket unit that listens on the chosen port.
- Bind the TLS certificate and key in the server config or delegate TLS to a reverse proxy and forward decrypted streams to the SSTP daemon via a UNIX socket or loopback TCP port.
Client configuration notes
Clients must point to hostname:port when using a non‑standard port. Some clients support specifying a port field; others require syntax like “vpn.example.com:10443”.
- Windows built‑in SSTP client: in the VPN connection advanced settings, specify the server name as hostname:port or use rasphone.pbk modifications. If the GUI does not accept the port, use PowerShell/rasphone commands or a registry tweak.
- Linux clients (sstp‑client / sstp‑lib): pass the –port argument or include the port in the remote parameter.
- Mobile: Android SSTP clients (third‑party) often accept host:port syntax. iOS lacks a native SSTP client — you must use third‑party apps or deploy alternative transports (IKEv2) if iOS support is required.
MTU, TCP-over-TCP and performance tuning
Because SSTP runs over TCP, you may encounter TCP‑over‑TCP issues: nested retransmissions can amplify latency and reduce throughput. Recommendations:
- Lower the PPP/MPPE MTU to avoid excessive fragmentation. Typical safe MTU values: 1400–1420. For example:
On a Linux client: ip link set dev tun0 mtu 1400
- Enable MSS clamping on the edge firewall to avoid path MTU issues: iptables -t mangle -A FORWARD -p tcp –tcp-flags SYN,RST SYN -j TCPMSS –clamp-mss-to-pmtu
- Use TCP BBR or tuned congestion control on server and client for higher throughput in high latency links: sysctl -w net.ipv4.tcp_congestion_control=bbr
- If latency-sensitive traffic suffers, consider deploying UDP‑based VPNs (WireGuard, IPsec/udp) as alternatives. SSTP’s advantage is traversal, not latency performance.
Troubleshooting checklist
- Verify port reachable: telnet host port or nc -vz host port. Example: openssl s_client -connect vpn.example.com:10443 -servername vpn.example.com to inspect TLS handshake.
- Capture packets: tcpdump -i any tcp port 10443 -w sstp.pcap and analyze with Wireshark. Look for TLS ClientHello and ServerHello.
- Check server logs: SSTP or proxy logs for TLS errors, e.g., certificate mismatch, unsupported protocol, or handshake aborts.
- Confirm certificate CN/SAN matches hostname used by clients. SAN mismatch will cause validation failures.
- Ensure firewall state tracking and NAT are not mangling TCP options (like SACK/TS) causing instability.
- For Windows RRAS, inspect Event Viewer under “Applications and Services LogsMicrosoftWindowsRAS” for SSTP-specific events.
Security hardening checklist
- Enforce TLS 1.2+ and strong ciphers only.
- Use organizationally‑issued certificates or reputable public CAs; rotate certificates before expiration.
- Enable logging and centralized log aggregation for forensic analysis.
- Harden server OS: disable unnecessary services, apply kernel/network security hardening, maintain patch cadence.
- Rate‑limit connection attempts and use CAPTCHA/logging on auxiliary portals to deter credential stuffing.
- Consider multi‑factor authentication (EAP with certificate + password or RADIUS + MFA) to protect credentials.
Testing and validation
Run these checks after deployment:
- TLS handshake: openssl s_client -connect host:port -servername host — verify cert chain and selected cipher.
- SSTP session establishment: connect a test client and verify PPP negotiation, IP assignment, and route pushing.
- Throughput and latency tests: run iperf3 over the VPN to validate performance. Check behavior under packet loss to observe TCP‑over‑TCP impact.
- Failover testing: if you use a proxy or NAT, ensure reconnection behavior and session persistence are as expected.
Operational tips
- Document the chosen custom ports and ensure change control tracks any future port changes.
- Monitor TLS certificate expiration proactively and automate issuance using ACME where feasible (reverse proxy more easily integrates with ACME clients like certbot).
- Use health probes on the reverse proxy or load balancer to detect backend SSTP failures quickly.
- Keep a small number of supported client configurations and publish exact settings to users to minimize connection issues.
Running SSTP on a custom port is a practical and secure option when standard 443 usage is constrained. The key elements are maintaining robust TLS configuration, ensuring correct port binding and NAT/firewall behavior, addressing TCP‑over‑TCP performance nuances, and implementing comprehensive logging and monitoring. With these measures in place, SSTP continues to be an effective transport for enterprise VPN needs.
For additional guides and managed options related to dedicated IP VPN deployments, visit Dedicated‑IP‑VPN: https://dedicated-ip-vpn.com/