Yes, Edgerouter x site to site vpn can be configured. In this guide, you’ll learn how to set up a reliable IPsec site-to-site VPN on EdgeRouter X, including UI and CLI setup, recommended encryption settings, routing considerations, NAT traversal tips, common pitfalls, and performance tweaks. This is a practical, reader-friendly walkthrough designed for IT admins, network enthusiasts, and anyone who wants to securely connect two or more physical or cloud environments. Plus, if you’re looking to add extra layer of security during testing and remote management, you might want to check out NordVPN’s current offer—click this deal to explore the 77% off plus 3 months free, a handy companion while you experiment with VPN configurations. 
Useful URLs and Resources unlinked, plain text
- EdgeRouter X official documentation – https://edge-router.docs example placeholder
- EdgeRouter community forum – https://community.ui.com/forums
- Ubiquiti Support Knowledge Base – https://help.ui.com/hc/en-us
- strongSwan IPsec documentation – https://www.strongswan.org
- IPsec site-to-site VPN best practices – https://www.cisco.com/c/en/us/support/docs/ip/ipsec-vpn
- NAT traversal tips for IPsec – https://docs.hetzner-cloud.com/technical/secure-ipsec-nat-traversal
- Dynamic DNS options for remote sites – https://www.dyn.com
- Common EdgeRouter X troubleshooting steps – https://community.ui.com/questions
- Network monitoring basics for VPN tunnels – https://www.sdxcentral.com
What is Edgerouter x site-to-site vpn and why it matters
Site-to-site VPNs create a secure, encrypted tunnel between two networks, so devices on each side can talk as if they were on the same LAN. For EdgeRouter X ER-X, this is typically achieved with IPsec, the industry standard for encrypted tunnels. Why choose an ER-X for site-to-site VPNs? It’s a compact, consumer-friendly router with solid EdgeOS software that supports robust VPN features without breaking the bank. If you’re running two small offices, a data center edge, or a branch office paired with a central hub, ER-X makes it feasible to:
- Protect traffic between sites from eavesdropping and tampering
- Maintain consistent internal IP addressing across locations
- Control which traffic traverses the VPN split tunneling vs full tunneling
- Integrate with existing security appliances or cloud firewalls
In practice, a well-configured ER-X site-to-site VPN can handle typical small-to-medium business workloads: file transfers, SMB traffic, remote service access, and inter-site backups without becoming a bottleneck. The EdgeRouter X offers five Gigabit Ethernet ports, a modest CPU, and a straightforward web UI, which many admins find approachable for initial deployments and gradual hardening. As of 2025, VPN adoption continues to grow as organizations blend remote work with distributed infrastructure, and IPsec remains a reliable, standards-based choice.
Prerequisites: what you need before you start
- Two EdgeRouter X devices one at each site with EdgeOS installed and up to date
- Public IP addresses for both sites static is ideal. dynamic can work with dynamic DNS, see below
- A LAN subnet at Site A for example, 192.168.10.0/24 and a LAN subnet at Site B for example, 192.168.20.0/24
- A shared pre-shared key PSK or, for certificate-based setups, a PKI workflow
- An understanding of which subnets should traverse the VPN and which should stay local
- Optional: a dynamic DNS service if either site doesn’t have a static public IP
- A basic security baseline: updated firmware, strong PSK, considered encryption algorithms, and proper firewall rules
If you’re worried about remote access management during testing, NordVPN’s current deal 77% off + 3 months free is a handy option to add a protective layer while you work—see the NordVPN deal in the intro for details. 
Encryption choices and security considerations for ER-X VPNs
- Protocol: IPsec is the standard for site-to-site. Prefer IKEv2 for resilience and faster rekeying, but IKEv1 is still common on older devices.
- Encryption: AES-256 is the go-to for strong confidentiality. AES-128 is faster on low-powered devices but offers less protection in theory.
- Hash: SHA-256 is a solid choice. SHA-1 is deprecated for security reasons.
- DH group: Use a modern group like group 14 or higher to ensure strong key exchange but be mindful of hardware compatibility and throughput.
- Perfect Forward Secrecy: Enable PFS D-H groups so that session keys aren’t reused for different tunnels.
- Authentication: Pre-shared keys are simplest, certificates offer stronger central management for larger deployments. If you’re new to IPsec, PSK is fine to start with, then migrate to certificates later.
- NAT traversal: If either site sits behind NAT, ensure IPsec NAT-T is enabled. It’s often automatic, but verify to avoid tunnel failures.
These choices balance security and performance. In practice, a typical, secure baseline for ER-X site-to-site VPNs uses AES-256, SHA-256, IKEv2, DH group 14, and a 3600-second lifetime for quick rekeying, with NAT traversal enabled.
Step-by-step setup: using the EdgeRouter X UI UI-based guide
Note: The exact UI layout can vary slightly by EdgeOS version, but the overall flow remains the same. You’re aiming to create an IPsec site-to-site tunnel with one site as the local network and the other as the remote network. Download edge vpn mod apk: why modded VPNs are risky and how to choose a legitimate VPN for privacy, speed, and streaming
- Access the EdgeRouter X web UI
- Open a browser and navigate to the router’s LAN IP often 192.168.1.1.
- Log in with your admin credentials.
- Define the local network and remote network
- Local network: the subnet behind Site A for example, 192.168.10.0/24.
- Remote network: the subnet behind Site B for example, 192.168.20.0/24.
- Create a VPN IPsec peer at Site A
- Navigate to VPN > IPsec.
- Add a new IPsec peer with:
- Local IP address: your Site A public IP
- Remote IP address: Site B public IP
- Authentication: Pre-Shared Key enter a strong key
- IKE Group: choose a modern group e.g., IKE v2 with AES-256, SHA-256, DH group 14
- ESP IPsec Proposal: AES-256, SHA-256, 3600 seconds
- Enable NAT-T if either site is behind NAT
- Set up the tunnel endpoints and routing
- In the same IPsec screen, define the tunnel:
- Local subnets: 192.168.10.0/24
- Remote subnets: 192.168.20.0/24
- Ensure your firewall allows the IPsec traffic ports 500/4500 UDP for IKE and NAT-T, and ESP protocol 50 if used by the device.
- Configure firewall policies to permit VPN traffic
- Create a policy or firewall rule to allow traffic from 192.168.10.0/24 to 192.168.20.0/24 over the VPN.
- Add a mirror rule for the return traffic if needed.
- Ensure there’s no NAT applied to VPN traffic that would break the tunnel some deployments require NAT exemption for VPN traffic.
- Apply, test, and monitor
- Save the configuration and apply changes.
- Use built-in diagnostics to test the VPN tunnel: ping the remote LAN from the local LAN, check IKE/IPsec SA status, and watch tunnel statistics.
- Confirm that traffic routes through the tunnel: traceroute or path traces can help verify the path.
- Optional: DNS and name resolution across sites
- If you rely on internal hostnames, consider using an internal DNS resolver that knows both subnets or add static DNS records for remote hosts.
- Optional: remote management considerations
- If you’re managing the ER-X remotely, ensure you have a secure path back to your management network. NordVPN’s protection can be used as an additional layer during access testing, as noted above.
Step-by-step setup: sample CLI workflow for EdgeRouter X
If you prefer the CLI or are scripting deployments, here’s a high-level outline you can adapt. Replace placeholders with your actual IPs and subnets.
-
Enter configuration mode
- configure
-
Define IKE and IPsec parameters
- set vpn ipsec ike-group IKE-1 proposal 1 encryption aes256
- set vpn ipsec ike-group IKE-1 proposal 1 hash sha256
- set vpn ipsec ike-group IKE-1 proposal 1 dh-group 14
- set vpn ipsec esp-group ESP-1 proposal 1 encryption aes256
- set vpn ipsec esp-group ESP-1 proposal 1 hash sha256
- set vpn ipsec auto-firewall-nat-excluded enable
- set vpn ipsec site-to-site peer
authentication mode pre-shared-secret - set vpn ipsec site-to-site peer
authentication pre-shared-secret ‘ ‘ - set vpn ipsec site-to-site peer
ike-group IKE-1 - set vpn ipsec site-to-site peer
default-esp-group ESP-1 - set vpn ipsec site-to-site peer
local-address - set vpn ipsec site-to-site peer
remote-address
-
Define local and remote subnets
- set vpn ipsec site-to-site peer
tunnel 1 local-subnet 192.168.10.0/24 - set vpn ipsec site-to-site peer
tunnel 1 remote-subnet 192.168.20.0/24
- set vpn ipsec site-to-site peer
-
Ensure the tunnel is attached to the correct interface if necessary Ubiquiti edge router vpn setup guide: OpenVPN IPsec WireGuard on EdgeOS for EdgeRouter devices
- set vpn ipsec site-to-site peer
tunnel 1 local-traffic 192.168.10.0/24 - set vpn ipsec site-to-site peer
tunnel 1 remote-traffic 192.168.20.0/24
- set vpn ipsec site-to-site peer
-
Commit and save
- commit
- save
- exit
Note: CLI syntax can vary slightly between EdgeOS versions. Always verify with the latest EdgeRouter documentation or the EdgeOS CLI help if you’re unsure.
Common pitfalls and quick fixes
- NAT-T not negotiating: Ensure NAT-T is enabled on both sides. check firewall rules to allow UDP ports 4500 and 500 if used and the ESP/AH protocols.
- Subnet overlap: Two LANs sharing overlapping IP ranges will break routing. Adjust subnets or use NAT for specific hosts.
- Firewall blocks: The VPN may fail if the firewall accidentally blocks IPsec or ESP. ensure IPsec traffic is allowed.
- Mismatched Phase 1/Phase 2 settings: You must align IKE group, encryption, and hashing between both sides.
- Dynamic IPs: If your remote site changes IPs, use Dynamic DNS at the remote site and update the peer on the ER-X accordingly.
- Performance bottlenecks: ER-X has limited CPU. If you push through heavy traffic or multiple tunnels, you may see performance impacts. consider upgrading to a more capable EdgeRouter model or offloading to a dedicated VPN appliance for high-throughput needs.
- Certificates vs PSK: PSK is easier for small deployments. moving to certificate-based authentication reduces key management overhead for multiple tunnels.
Monitoring, maintenance, and performance tips
- Regularly check tunnel status:
- Look for BUILTIN IKE/IPsec SA status, check for rekeys, and watch for dropped packets.
- Schedule rekeys:
- Shorter lifetimes increase security but may cause more frequent rekey events. strike a balance e.g., 3600 seconds for IKE, 3600 for ESP.
- Use a dedicated monitoring tool:
- For example, SNMP-based monitoring or a simple ping-based monitor to verify uptime on each VPN endpoint.
- Align with your network policy:
- Ensure VPN traffic is counted in QoS policies, and set appropriate bandwidth limits if needed.
- Backups:
- Export and save EdgeRouter X configurations after a stable tunnel setup. version-control changes to avoid configuration drift.
Real-world tips and topologies
- Hub-and-spoke topology: One central site acts as the hub, with multiple spokes connecting to it. This reduces the number of tunnels from the hub.
- Mesh topology: Each site can connect to every other site. as you add sites, the number of tunnels grows, so plan routing and hardware capacity accordingly.
- Cloud integration: If one side sits in a cloud environment or remote data center, ensure the cloud security group rules allow IPsec traffic and ensure that the public IPs or NAT settings don’t conflict with the tunnel endpoints.
- Split tunneling: Consider whether you want all traffic to go through the VPN or only inter-site traffic. Split tunneling reduces VPN load and can improve performance, but you must carefully consider security implications.
Security hardening and best practices
- Use strong PSKs or, better, a PKI-based approach with certificates for larger deployments.
- Disable unused services on the ER-X. restrict management access to trusted networks.
- Keep firmware up to date with the latest security patches.
- Use firewall rules that tightly control what traffic can flow across the VPN tunnel.
- Consider enabling periodic VPN health checks and automatic failover if you have a redundant hub site.
Use cases and how to choose between ER-X vs other options
- Small offices with modest traffic: ER-X site-to-site VPN is a solid fit. It’s affordable, relatively easy to configure, and once set up, it’s low maintenance.
- Branch-to-branch connections across two or more locations: Start with a hub-and-spoke design, and then scale as needed. For very high throughput requirements, consider a higher-end EdgeRouter model or a dedicated VPN appliance to maintain performance.
- Remote management and testing: Use a separate secure path like NordVPN to reduce exposure during testing. The NordVPN deal can be a convenient addition during experimentation.
Performance expectations and numbers you can plan around
- Throughput: EdgeRouter X can handle typical small-business VPN traffic reasonably well, but real-world throughput depends on encryption settings, tunnel count, and the speed of the underlying WAN links. Expect tens to hundreds of Mbps of VPN throughput in many ER-X deployments. for higher throughput, plan for a more capable router or multiple tunnels with load distribution.
- Latency: IPsec tunnels add minimal latency under normal conditions, typically a few milliseconds to tens of milliseconds depending on route and physical distance.
- Reliability: IPsec tunnels are generally stable once correctly configured. Regular health checks and proper firewall rules help minimize downtime.
Frequently Asked Questions
Can I run more than one site-to-site VPN tunnel on EdgeRouter X?
Yes. You can configure multiple IPsec site-to-site tunnels on ER-X, connecting to different remote sites. Each tunnel must have its own peer definition, local/remote subnets, and security parameters. Monitor CPU and memory usage if you run many tunnels, and consider upgrading if you’re hitting resource limits.
Should I use IKEv2 or IKEv1 for my ER-X site-to-site VPN?
IKEv2 is generally preferred due to better stability, faster re-keying, and improved compatibility with NAT-T, especially on unstable connections. If you’re working with older devices or firmware that only support IKEv1, you can still get solid results, but consider upgrading firmware and devices when possible.
What subnets should I use for the local and remote networks?
Pick non-overlapping subnets for each side of the tunnel. Overlapping subnets cause routing loops and blackholes. For example, Site A could use 192.168.10.0/24 and Site B could use 192.168.20.0/24. If you already have existing networks, adjust accordingly and document the configuration to avoid conflicts. Does edge have its own vpn and how to use a vpn with edge in 2025
How do I test if the VPN tunnel is working?
- Ping a host on the remote network from a host on the local network.
- Check the VPN status in the ER-X UI or via CLI for IKE/IPsec SA status.
- Use traceroute to see if traffic goes through the VPN tunnel.
- Verify that routes are correctly added to the routing table for the remote subnet.
How can I migrate from PSK to certificates for the site-to-site VPN?
You’ll need to set up a PKI infrastructure CA, server, and client certificates, export the certificates to both ER-X devices, configure IPsec to use certificate-based authentication, and ensure the trust chain is valid on both sides. Certificates typically reduce the risk of key compromise and simplify large-scale deployments.
How do I handle NAT when VPN traffic needs to reach the internet at the same site?
You’ll typically exclude VPN traffic from NAT on the tunnel endpoints NAT exemption. For traffic that must exit through the VPN to reach the other site and then the internet, you may add additional routing policies and firewall rules to cut through the VPN path accordingly.
Can EdgeRouter X handle VPNs with dynamic IP addresses on either side?
Yes, but you’ll want to implement dynamic DNS on the side with the changing IP. Update the peer configuration when the remote IP changes, or use a dynamic DNS hostname for the remote peer and script automatic updates so the tunnel remains connected.
What are the recommended firewall rules to protect the VPN?
- Allow IPsec/NAT-T traffic UDP 500, UDP 4500, IP protocol 50 as applicable
- Permit traffic between the two VPN subnets only
- Block traffic from the VPN to unused internal services unless needed
- Monitor and log VPN activity to identify anomalies
How can I optimize performance on ER-X for IPsec traffic?
- Use AES-256, SHA-256, and a modern DH group
- Enable additional hardware acceleration if available depends on router hardware
- Disable unnecessary features to free up CPU cycles for VPN processing
- If the VPN load is high, consider upgrading to a more capable EdgeRouter or splitting traffic across multiple tunnels or devices
Is it necessary to keep edge firewall rules and VPN rules synchronized?
Yes. Mismatched rules can cause traffic to be dropped or misrouted, weakening the tunnel. Always verify rules after changes, test with representative traffic, and keep a documented rule set to avoid drift.
Final notes
Edgerouter x site to site vpn setups are accessible to IT admins and tech enthusiasts who want a robust, scalable solution for inter-site connectivity. With careful planning, correct parameter selection, and ongoing monitoring, you’ll have a reliable, secure tunnel that supports your business needs without overcomplicating your network. Remember to balance security with performance, maintain a clean, documented configuration, and take advantage of online communities and official docs when you hit snags. If you want extra protection during test runs or remote management, the NordVPN deal highlighted in this post can be a helpful companion as you experiment with secure connections.
Uk vpn edge: the ultimate guide to using a UK-based VPN edge for privacy, streaming, security, and access