Ubiquiti EdgeRouter VPN server is built into EdgeOS and enables IPsec-based remote access and site-to-site VPN connections. In this guide, you’ll learn how to set up, optimize, and troubleshoot EdgeRouter VPNs, including step-by-step GUI and CLI instructions, security best practices, and real-world tips to keep everything running smoothly. Whether you’re securing a home lab, a small office, or a multi-site network, this post covers the essentials, common pitfalls, and performance tweaks you’ll actually use.
If you’re looking for extra privacy while you test things out, consider this NordVPN deal you can grab now: 
Useful resources non-clickable text for quick reference: EdgeRouter official documentation – ubnt.com, EdgeOS VPN setup guide – go.ubnt.com/edgeos-vpn, OpenVPN remote access with EdgeRouter – go.ubnt.com/edgeos-openvpn, IPsec site-to-site VPN with EdgeRouter – go.ubnt.com/edgeos-ipsec-site-to-site
What this guide covers
– An overview of EdgeRouter VPN server capabilities and why you’d use them
– The main VPN types EdgeRouter supports IPsec remote access, IPsec site-to-site, OpenVPN, and the WireGuard
– Step-by-step setup guidance for both GUI and CLI configurations
– Performance considerations and practical tuning tips
– Common issues and how to troubleshoot them
– A thorough FAQ with practical answers you can reuse in your own setup
What is the EdgeRouter VPN server and why use it
EdgeRouter VPN server refers to the built-in functionality in EdgeOS that lets you run VPN services directly on your EdgeRouter devices. This means you can:
– Provide remote access for laptops and mobile devices to your home or office network, without exposing everything to the internet
– Link multiple sites with site-to-site VPNs so devices across locations can share resources securely
– Centralize VPN management on your EdgeRouter rather than using third-party appliances
The advantages are real-time control, better integration with your firewall rules, and the ability to leverage the router’s existing hardware for encryption and routing. A common setup is to deploy IPsec for remote clients laptops, phones and to establish site-to-site tunnels between office locations. As networks evolve, you’ll often see admins mix IPsec for reliability with newer options like WireGuard for performance, depending on firmware support and hardware constraints.
EdgeRouter models span the range from compact EdgeRouter X to higher-performance devices EdgeRouter 4, EdgeRouter 6P and beyond. Even on smaller models, VPN throughput can be excellent with modern cipher suites, provided you tune settings and match expectations to the device’s CPU and RAM. A practical rule of thumb: VPN throughput tends to be a fraction of the router’s maximum routing capacity, and it largely depends on the VPN protocol, cipher choices, and the number of concurrent tunnels.
Key factors that influence your EdgeRouter VPN experience:
– VPN protocol chosen: IPsec is typically very capable and widely supported. OpenVPN provides compatibility with many clients. WireGuard can offer higher performance on newer firmware/hardware
– Encryption and hashing algorithms: AES-256 with SHA-256 is common for strong security, but AES-128 with a lighter hash can improve speeds on constrained devices
– Hardware model and firmware: newer EdgeRouter models and firmware bring better crypto acceleration and stability
– Network conditions: WAN connection quality, MTU settings, and firewall rules all affect tunnel stability and throughput
VPN types supported on EdgeRouter
EdgeRouter devices support multiple VPN deployment styles. Here’s a quick breakdown so you can pick what fits your network.
# IPsec remote access VPN
– Use case: Allow individual users to connect securely from anywhere to your network LAN resources, printers, NAS, etc.
– Typical setup: One or more user accounts with pre-shared key or certificates. tunnel with a client device laptop, phone configured to connect to the EdgeRouter’s public IP or dynamic DNS hostname
– Pros: Strong security, broad client support, good performance
– Cons: Setups can be a bit fiddly for non-technical users. certificate management adds complexity
# IPsec site-to-site VPN
– Use case: Connect two or more fixed sites securely so devices at different locations appear on a single network
– Typical setup: Each site runs an IPsec tunnel with a defined local/remote network pair. routing updates on each EdgeRouter ensure traffic uses the VPN
– Pros: Stable, scalable for multiple sites. preserves private addressing
– Cons: Requires coordination between sites. troubleshooting can be more involved
# OpenVPN on EdgeRouter
– Use case: When you need broad client compatibility or specific features from OpenVPN
– Typical setup: OpenVPN server on EdgeRouter with client profiles .ovpn distribution
– Pros: Excellent cross-platform support and granular client controls
– Cons: Can be heavier on CPU. relies on OpenVPN implementation outside the core IPsec stack
# WireGuard on EdgeRouter
– Use case: High-performance VPN with simple configuration, especially for mobile clients or dynamic sites
– Typical setup: WireGuard interface plus peers. often deployed for site-to-site and/or remote access
– Pros: Fast, modern cryptography, simple config in many cases
– Cons: Native support varies by firmware. some EdgeRouter models require newer firmware or third-party packages
Note: WireGuard adoption on EdgeRouter has progressed with firmware updates, but you should verify your exact model and EdgeOS version to confirm native support and ease of configuration. If native support isn’t available, you’ll still have options via community packages or alternative routing approaches, though official docs and stability may lag behind.
Hardware considerations and performance
VPN performance on EdgeRouter is a balance of CPU power, encryption load, and the number of concurrent tunnels. In practice:
– EdgeRouter X compact, lower-end CPU: expect VPN throughput in the tens to low hundreds of Mbps range under ideal conditions
– EdgeRouter 4 and EdgeRouter 6P: higher ceiling with better VPN throughput, often capable of 200 Mbps to 1 Gbps ranges depending on cipher and traffic mix
– Real-world rule of thumb: VPN throughput frequently sits at 50-70% of the router’s non-VPN maximum throughput when using strong encryption. lighter ciphers can push it higher but with lower security margins
To maximize performance:
– Use modern ciphers with hardware acceleration when available AES-GCM where supported
– Minimize the number of concurrent tunnels to what you truly need
– Keep firmware up to date for performance and security improvements
– Place VPN termination on a dedicated interface when possible to optimize routing
– Separate VPN traffic with carefully crafted firewall rules and per-tunnel routing policy-based routing where needed
– Consider offloading devices with higher-end EdgeRouter models if you’re hitting bottlenecks
Security best practices for EdgeRouter VPNs:
– Use strong authentication pre-shared keys with long, random values or certificates if you’re comfortable managing them
– Lock down admin access to the EdgeRouter restrict SSH/WebUI from trusted networks only
– Regularly rotate PSKs or certificates and monitor VPN activity logs
– Apply least-privilege rules on VPN interfaces, so VPN clients don’t have unrestricted access to the whole LAN
– Keep your EdgeRouter firmware current and review official release notes for crypto-related improvements
Setting up IPsec remote access VPN on EdgeRouter GUI and CLI
Below are practical steps you can follow to get IPsec remote access up and running. This guide emphasizes a stable default setup you can test quickly, with notes on adjustments for security or performance.
GUI setup EdgeOS Web UI
– Log into your EdgeRouter’s web interface
– Go to VPN or VPN > IPsec the exact path may vary slightly by firmware
– Create a new IPsec peer for remote access with:
– Local IP: your EdgeRouter’s public IP or dynamic DNS hostname
– Remote IP: the client’s public IP or 0.0.0.0/0 for dynamic clients. often dynamic
– Authentication: pre-shared secret PSK or certificates if you’ve set up a CA
– IKE group: select a strong option e.g., IKEv2 with AES-256
– Phase 2: select AES-256 for encryption and SHA-256 for integrity
– Local/Remote subnets: Local network your LAN and Remote client subnets as needed
– Create VPN user accounts for remote access with usernames and either:
– Passwords for username-password-based remote access
– Or certificates if you’ve implemented certificate-based auth
– Create firewall rules to permit VPN traffic allow ESP, UDP 500, UDP 4500. optional: UDP 1701 for L2TP if used
– Save, apply, and test with a client Windows, macOS, iOS, Android
CLI setup high-level, with representative commands
– Enter configuration mode:
configure
– Bind the VPN interfaces and IKE/Child SAs illustrative example. adjust to your environment:
set vpn ipsec ipsec-interfaces interface eth1
set vpn ipsec ike-group IKE-GROUP lifetime 3600
set vpn ipsec ike-group IKE-GROUP proposal 1 encryption AES256
set vpn ipsec ike-group IKE-GROUP proposal 1 hash SHA256
set vpn ipsec ipsec-attributesike-allow-weak-crypto disable
– Configure a remote access peer or a site-to-site peer as needed:
set vpn ipsec site-to-site peer 203.0.113.1 authentication mode pre-shared-secret
set vpn ipsec site-to-site peer 203.0.113.1 authentication pre-shared-secret ‘YourPSKHere’
set vpn ipsec site-to-site peer 203.0.113.1 ike-group IKE-GROUP
set vpn ipsec site-to-site peer 203.0.113.1 local-address
set vpn ipsec site-to-site peer 203.0.113.1 tunnel 1 allow-nat-traversal disable
– Commit and save:
commit
save
– Add firewall rules to permit VPN traffic example, adjust to your network:
set firewall name VPN-LOCAL_LOCAL_RULES rule 10 action accept
set firewall name VPN-LOCAL_LOCAL_RULES rule 10 description “Allow VPN traffic”
set firewall name VPN-LOCAL_LOCAL_RULES rule 10 destination address
set firewall name VPN-LOCAL_LOCAL_RULES rule 10 protocol all
– Apply changes and test with a client
– Exit:
exit
Important notes:
– The exact command syntax can vary by EdgeOS version, so consult the official EdgeRouter/IPsec docs for your firmware version
– For remote access, you’ll typically create a user or a certificate-based profile and point the client to your EdgeRouter’s public IP or DDNS hostname
– Always create firewall rules that limit VPN traffic to your intended subnets and services
OpenVPN and WireGuard: what to know
– OpenVPN: If you need broad client compatibility, you can enable OpenVPN on EdgeRouter, but be aware it can put more CPU load on the device. You’ll generate server and client keys, configure the server, and distribute client profiles.
– WireGuard: In recent firmware, WireGuard support has improved on EdgeRouter devices, delivering higher throughput with simpler configuration. If your EdgeRouter model and firmware support it, WireGuard can offer a smoother experience for both remote access and site-to-site.
Troubleshooting common VPN issues
– VPN tunnel not establishing: double-check PSK or certificate configuration, ensure the peer IPs are correct, and verify IKE/Phase 1 and Phase 2 settings match on both sides
– Clients can connect but cannot reach LAN resources: review routing on the EdgeRouter, ensure correct NAT rules, and confirm firewall policies allow traffic from VPN subnets to LAN subnets
– Slow VPN performance: assess CPU load on the EdgeRouter, verify encryption cipher, and consider reducing the number of active tunnels or upgrading to a more capable device
– DNS resolution issues from VPN clients: configure VPN to push DNS servers e.g., your internal DNS or a trusted external server and ensure DNS traffic is allowed through the tunnel
Performance tuning quick wins
– Use AES-256 with SHA-256 or better as a baseline. avoid older, slower algorithms
– If you’re on supported firmware, enable hardware crypto acceleration where available
– Limit per-user bandwidth if you have heavier clients to prevent a few users from starving others
– Consider split tunneling for client VPNs so only necessary traffic goes through the VPN, reducing encryption overhead for non-essential traffic
– Regularly review firewall rules to ensure they’re not unnecessarily blocking VPN traffic or adding overhead
VPN security tips and best practices
– Use strong authentication and rotate credentials regularly
– Keep EdgeRouter firmware updated to benefit from security fixes and performance improvements
– Disable remote admin access from public networks. use VPN to reach the admin interface if needed
– Implement per-tunnel firewall rules so VPN users are restricted to only the resources they require
– Monitor VPN logs for unusual activity and set up alerts for repeated failed logins
– Back up your EdgeRouter configuration after you’ve tested a VPN setup so you can restore quickly if needed
– Document your VPN topology remote access users, site-to-site partners, subnets to reduce misconfigurations
Real-world tips from the field
– Start small: set up one remote-access VPN user and one site-to-site tunnel first, then scale
– Use a predictable naming convention for VPN peers and tunnels to avoid confusion as you grow
– Test on multiple clients Windows, macOS, iOS, Android to verify compatibility and quirks
– Keep security at the forefront: don’t expose VPN endpoints to the wild internet without robust firewall rules
– When in doubt, reach out to Ubnt community forums or official support for EdgeRouter-related nuances, as firmware behavior can vary by version
Frequently asked questions
# Q1: Can EdgeRouter act as a VPN server?
EdgeRouter can act as a VPN server using IPsec for remote access and site-to-site connections, and it can host OpenVPN or WireGuard where supported by the firmware. This lets you connect clients or sites directly to your LAN.
# Q2: Which VPN protocols are supported on EdgeRouter?
EdgeRouter supports IPsec remote access and site-to-site, OpenVPN where available, and WireGuard where supported by the firmware/hardware. The best choice depends on client compatibility and your performance goals.
# Q3: Is WireGuard supported on EdgeRouter?
WireGuard support has improved with newer EdgeOS firmware and certain EdgeRouter models. If your firmware includes native WireGuard support, you can configure it for high-performance remote access or site-to-site VPNs. If not, you can use OpenVPN or IPsec as a reliable alternative.
# Q4: How do I set up a remote-access IPsec VPN on EdgeRouter?
In short: create an IPsec remote-access tunnel, configure a PSK or certificates, add your VPN users, set appropriate firewall rules, and test with a client device. The UI is pretty intuitive, and you can also follow CLI steps if you prefer.
# Q5: How do I configure a site-to-site IPsec VPN on EdgeRouter?
You’ll define a tunnel between two EdgeRouters, each side announcing its local and remote subnets, and share a PSK or a certificate. Then you apply routing so traffic between subnets uses the VPN.
# Q6: How does NAT affect VPN on EdgeRouter?
NAT can impact VPN traffic if not configured carefully. Typically you want VPN traffic to be routed through the VPN interface and not NATed inappropriately. Ensure NAT rules on VPN interfaces are correct and firewall rules permit VPN flows.
# Q7: What’s the difference between IPsec and OpenVPN on EdgeRouter?
IPsec is generally faster on many devices and is widely supported by native clients. OpenVPN is widely compatible and easier to troubleshoot across diverse platforms but can be heavier on CPU. Your choice depends on needs for performance vs. client compatibility.
# Q8: How can I test my EdgeRouter VPN connection?
Test by connecting a client device to the VPN, then ping core LAN resources, access a file share, or use a network tool to confirm routes. Check both tunnel status in EdgeOS and client connection status. Look at logs for any errors if things don’t work.
# Q9: How do I secure the EdgeRouter admin interface when running a VPN?
Limit admin access to trusted networks, use strong admin passwords, enable two-factor authentication if available, and disable or restrict remote admin exposure. Regularly audit SSH and WebUI access attempts.
# Q10: How do I troubleshoot VPN throughput on EdgeRouter?
Check CPU load during VPN use, verify encryption settings, test with different cipher suites, verify tunnel counts, and consider firmware updates. If performance remains below expectations, evaluate hardware limitations or upgrade to a model with stronger crypto acceleration.
# Q11: Can I run two different VPNs IPsec and WireGuard on the same EdgeRouter?
Yes, in many configurations you can have IPsec for remote access or site-to-site and WireGuard for another tunnel type. Be mindful of routing, firewall policies, and potential interference between tunnels.
# Q12: Is it safe to use cheap or generic VPN configurations on EdgeRouter?
Security hinges on strong authentication, up-to-date firmware, and properly configured firewall rules. Avoid default or weak PSKs, and always test thoroughly before deploying to production.
If you’re building or tightening your EdgeRouter VPN setup, this guide should give you a solid foundation. Remember, the right VPN choice often comes down to your devices, your network topology, and how much you value performance versus broad client support. Start with IPsec remote access for most users, consider site-to-site for multi-location networks, and explore WireGuard if your firmware supports it and you want higher speed with modern crypto. Always test, document, and review your configuration regularly to keep everything running smoothly.