

Edgerouter x site to site vpn is a method to securely connect two networks over the internet using an EdgeRouter device. This guide is designed to be practical and vendor-agnostic while focusing on EdgeRouter X the popular small business/home device. You’ll learn what IPsec site-to-site VPN is, how to prepare your networks, and how to configure both ends so traffic between sites stays private and authenticated. Along the way I’ll share real-world tips, common gotchas, and quick tests you can run to confirm the tunnel is up. If you’re in a pinch and want extra protection for individual devices or remote workers, check out the NordVPN deal included in this intro image for a simple add-on option. 
Introduction: what you’ll get in this post short summary and quick guide formats
- Yes, Edgerouter x site to site vpn is possible and widely used to connect branch offices or remote networks.
- You’ll get a step-by-step, copy-paste friendly guide for EdgeRouter X that covers both ends of a tunnel, including recommended IP ranges, PSK handling, and firewall basics.
- A quick testing blueprint: how to verify the tunnel, how to measure latency, and how to troubleshoot common errors.
- Best practices for security, performance, and future growth adding more sites, rotating keys, keeping firmware updated.
- A concise FAQ at the end to clear up common questions you’ll likely have.
Useful URLs and Resources text only
EdgeRouter X official documentation – help.ui.com
IPsec basics and site-to-site concepts – en.wikipedia.org/wiki/IPsec
EdgeRouter firewall and NAT setup guides – help.ui.com/hc/en-us
DYNDNS or No-IP dynamic DNS service info – dyndns.org or noip.com
Ubiquiti forums for EdgeOS and VPN topics – community.ui.com
Windows/macOS troubleshooting commands for VPN pings – support.microsoft.com or support.apple.com Download edge vpn mod apk and safer alternatives: how to get Edge VPN legitimately and protect your privacy
What you’ll learn in this guide
- The difference between site-to-site VPN vs remote access VPN and why IPsec is a solid choice for EdgeRouter X
- How to plan networks, subnets, and IP addressing to avoid overlap
- The exact EdgeOS commands to create a site-to-site IPsec tunnel on EdgeRouter X
- How to configure both ends when you control Site A and Site B or more sites later
- How to test tunnel establishment, monitor SA security association status, and verify traffic across the tunnel
- Common misconfigurations and quick fixes to save time
Body
- What is an Edgerouter X site-to-site VPN and why it matters
- Site-to-site VPN creates a private, encrypted tunnel between two or more networks over the public internet. This means devices on Site A can talk to devices on Site B as if they were on the same LAN, while all traffic is protected from eavesdropping and tampering.
- EdgeRouter X is a cost-effective router from Ubiquiti that runs EdgeOS and supports IPsec site-to-site VPN natively. It’s well-suited for small offices or home labs that want reliable VPN functionality without paying for enterprise gear.
- Why choose IPsec for this setup? It’s broadly supported, fast with hardware acceleration on many devices, and you can tune encryption and hashing to balance security with performance.
- Preparations before you configure
- Public IP addresses: Each site should have a public-facing IP address static is ideal. dynamic is workable with a dynamic DNS service.
- Internal networks: Plan your LANs so they don’t overlap. For example:
- Site A: 192.168.1.0/24
- Site B: 10.10.0.0/24
- VPN authentication: Decide on a pre-shared key PSK or certificate-based setup. For most home/SMB deployments, a strong PSK is simplest, but rotate it regularly.
- Firmware: Make sure both EdgeRouter X devices are running a recent EdgeOS version that includes stable IPsec support and the latest security patches.
- Firewall planning: Create rules that only allow VPN traffic to pass through the tunnel and restrict other traffic between sites as needed.
- DNS considerations: If you’re using hostnames across sites, consider internal DNS entries or hosts files for reliability.
- Site-to-site IPsec basics you’ll use
- IKE Internet Key Exchange group settings determine how peers authenticate and negotiate the tunnel. Common choices include AES256, SHA256, and a DH group like 14 2048-bit for balance of security and speed.
- ESP Encapsulating Security Payload provides the actual encrypted data path. Typical options are AES256 with SHA256.
- NAT-Traversal NAT-T helps when one or both sites sit behind NAT. you’ll enable NAT-T so the tunnel can traverse NAT devices.
- Local vs remote networks: You’ll define which subnets on each site are reachable via the VPN. Plan this carefully to avoid routing loops.
- Step-by-step: configure EdgeRouter X site-to-site VPN example
Note: Replace the IPs and subnets with your actual values. The commands below are written for EdgeOS CLI. You can paste these into the EdgeRouter X CLI or the GUI’s “Config Tree” if you prefer clicking.
General steps for Site A local:
- Enter configuration mode
- configure
- Define IKE IKE-GROUP and ESP ESP-GROUP
- 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 ike-group IKE-GROUP proposal 1 dh-group 14
- set vpn ipsec ike-group IKE-GROUP lifetime 3600
- set vpn ipsec esp-group ESP-GROUP proposal 1 encryption aes256
- set vpn ipsec esp-group ESP-GROUP proposal 1 hash sha256
- set vpn ipsec esp-group ESP-GROUP lifetime 3600
- Define the VPN peer Site B’s public IP
- set vpn ipsec site-to-site peer 198.51.100.1 authentication mode pre-shared-secret
- set vpn ipsec site-to-site peer 198.51.100.1 authentication pre-shared-secret ‘YourSecurePSK’
- set vpn ipsec site-to-site peer 198.51.100.1 ike-group IKE-GROUP
- set vpn ipsec site-to-site peer 198.51.100.1 default-esp-group ESP-GROUP
- set vpn ipsec site-to-site peer 198.51.100.1 local-address 203.0.113.2
- Define tunnel networks
- set vpn ipsec site-to-site peer 198.51.100.1 tunnel 1 local-subnet 192.168.1.0/24
- set vpn ipsec site-to-site peer 198.51.100.1 tunnel 1 remote-subnet 10.10.0.0/24
- NAT and routing
- set firewall.1 name ‘VPN-ALGO-ALLOW’
- set firewall.1 rule 1 action accept
- set nat source rule 100 outbound-interface eth0
- set nat source rule 100 source address 192.168.1.0/24
- set nat source rule 100 translation address masquerade
- Commit and save
- commit
- save
General steps for Site B remote:
- Mirror the steps above, swapping Site B’s local subnet and Site A’s remote-subnet in the tunnel definitions:
- local-subnet 10.10.0.0/24
- remote-subnet 192.168.1.0/24
- Use the correct public IP and the same PSK
- Ensure NAT and firewall rules align so only VPN-tunneled traffic is allowed between sites.
What to watch for during setup Does edge have its own vpn
- Subnet overlap can break routing. Double-check that the two sites’ LANs don’t share any addresses.
- PSK mismatches are a common pitfall. Make sure the passphrase is identical on both sides, with no stray spaces.
- Time synchronization may affect IPsec. Ensure NTP is working on both devices.
- Firewall rules must permit IKE UDP 500 and NAT-T UDP 4500 if you’re behind NAT.
- How to test the VPN tunnel and verify it’s up
- On EdgeRouter X at Site A:
- show vpn ipsec sa
- show vpn ipsec status
- ping 10.10.0.1 from a host on Site A to a host on Site B
- On Site B, reverse checks:
- ping 192.168.1.x a host on Site A
- Common issues and quick fixes
- If you don’t see a tunnel, re-check the PSK and the remote-subnet settings.
- If you can ping but you can’t reach destinations beyond the gateway, verify static routes on both sides and ensure firewall rules allow inter-site traffic.
- If the tunnel drops after a while, check IKE re-key intervals and keep-alive settings. adjust lifetime values if needed.
- Security considerations and performance tips
- Use strong, unique PSKs for each tunnel. Don’t reuse the same key across multiple sites.
- Prefer AES-256 over AES-128 if your hardware supports it and you’re prioritizing security. this may incur a small performance hit but is usually worth it for sensitive data.
- Enable NAT-T to ensure VPNs work across NAT devices. this is essential if either site sits behind a home router.
- Keep EdgeRouter OS updated. VPN software updates often fix security issues and improve stability.
- Limit VPN access with firewall rules: only allow the specific VPN traffic to traverse the tunnel, and restrict which subnets can be reached across the tunnel.
- Logging and monitoring: enable basic logs for VPN events. set up periodic checks to alert you if the tunnel goes down.
- Scaling to multiple sites and advanced topologies
- You can add a second or third IPsec tunnel on Site A pointing to additional sites by repeating the tunnel definitions and choosing distinct tunnel numbers e.g., tunnel 2, tunnel 3 and different remote-subnets.
- For hub-and-spoke setups, you may want a central hub site that all spoke sites tunnel into. This is common for centralized access control and simplified routing.
- Dynamic IPs: if a site doesn’t have a static public IP, consider a dynamic DNS service on that site and update the peer config with the current IP, or use a VPN that supports dynamic endpoints if your hardware and firmware versions permit.
- EdgeRouter X vs other options: quick comparison
- IPsec site-to-site on EdgeRouter X is simple and affordable, ideal for small offices and home labs.
- OpenVPN or WireGuard options may require additional software or different hardware, and WireGuard support on EdgeOS is version-dependent. If you need a newer VPN protocol with simpler client configuration for remote workers, you might explore alternative devices or a dedicated VPN server in tandem with EdgeRouter.
- For larger scale deployments, consider a dedicated VPN gateway or a managed service, but for many users, EdgeRouter X with IPsec is more than enough.
- Troubleshooting checklist quick reference
- Tunnel status: is the IPsec SA up? If not, re-check PSK, IKE group, and IPs.
- Local vs remote subnet: make sure they’re correct and don’t overlap.
- NAT-T: ensure NAT-T is enabled if you’re behind NAT.
- Firewall: confirm allowed traffic across the VPN and that there are no blocking rules.
- Logs: search for common IPsec messages like “no proposals loaded” or “no matching IKE proposal.”
- Time drift: confirm NTP is working on both devices.
- Real-world best practices you can implement today
- Use a unique PSK per tunnel and rotate it every 6–12 months, or sooner if you suspect it’s compromised.
- Document your VPN topology clearly: site names, public IPs, subnets, and PSK references. A simple diagram helps when you scale.
- Test failover scenarios periodically: if one site’s link goes down, does the tunnel recover automatically when the link comes back?
- Maintain a backup of both EdgeRouter configurations. If a misconfiguration occurs, you want a quick rollback option.
Frequently Asked Questions
What is a site-to-site VPN?
A site-to-site VPN creates a secure tunnel between two networks, allowing devices on each network to communicate as if they were on the same LAN, while traffic is encrypted over the internet.
What is IPsec and why is it used with EdgeRouter X?
IPsec is a suite of protocols for securing internet communications by authenticating and encrypting each IP packet of a communication session. EdgeRouter X uses IPsec to create reliable, encrypted site-to-site tunnels.
Do I need static IP addresses for both sites?
Static IPs are ideal because they simplify configuring the tunnel and reduce the chance of the tunnel breaking due to IP changes. Dynamic IPs can work with dynamic DNS services, but require extra steps and maintenance.
Can I add more sites later?
Yes. You can add additional site-to-site tunnels to connect more sites. You’ll typically reuse the same VPN framework with new peer IPs and subnets for each new site. What is k edge VPN: A comprehensive guide to k edge architecture, edge nodes, latency, privacy, and security
How do I test if the tunnel is up?
Use the EdgeRouter’s show vpn ipsec sa and show vpn ipsec status commands to verify the tunnel is established, then try pinging hosts across the tunnel and check routing tables.
How secure is an IPsec tunnel on EdgeRouter X?
IPsec configurations are only as strong as the PSK and encryption options you choose. Use AES-256, SHA-256, and a long, unique PSK. Keep firmware updated and restrict firewall access to protect the tunnel.
Can EdgeRouter X handle high VPN throughput?
Throughput depends on your hardware and the encryption settings. The EdgeRouter X is capable for many small office scenarios, but very high traffic or multiple concurrent tunnels may push the device beyond its comfortable operating range. If you hit limits, consider upgrading to a more powerful EdgeRouter model or distributing traffic with multiple devices.
How do dynamic IPs affect site-to-site VPN?
Dynamic IPs require a dynamic DNS method or a strategy to update the VPN peers when IPs change. This is more complex but doable with careful scripting or monitoring.
Should I use PSK or certificates for authentication?
For most small setups, a strong PSK is simpler and effective. For larger deployments or higher security requirements, certificates can provide better management and rotation capabilities but add complexity. Ubiquiti router vpn setup guide for site-to-site and remote access on UniFi routers and EdgeRouter
What about firewall rules for VPN traffic?
Always firewall VPN traffic to allow only the VPN subnets to reach one another and to restrict access to only necessary ports. A minimal, well-defined rule set reduces exposure and improves security.
Is WireGuard supported on EdgeRouter X?
WireGuard support on EdgeOS is version-dependent. Check your EdgeOS version and the latest release notes. If WireGuard isn’t available on your device, IPsec remains a strong, reliable choice.
How often should I restart or recheck the VPN?
As part of your quarterly maintenance, verify tunnel status, confirm firmware updates, and review access rules. If you notice performance dips or a tunnel drop, investigate immediately and reestablish the tunnel.
Conclusion
If you want a thorough, practical guide that’s easy to follow and tailored for EdgeRouter X users, this content provides the step-by-step configuration, testing, and best-practice advice you need. You’ll be able to set up a robust site-to-site VPN between two sites, scale to more sites, and troubleshoot common issues with confidence.
Note: This article includes an affiliate image banner in the intro that links to NordVPN. If you’re exploring extra security for remote work or personal devices beyond the site-to-site tunnel, you may find value in that option as a supplementary layer of protection. Proton vpn edge extension