Yes, you can show the VPN config on Edgerouter by using the CLI command ‘show vpn’. In this guide, you’ll get a practical, step-by-step approach to displaying VPN settings on EdgeRouter, interpreting the outputs, and validating that tunnels are up. We’ll cover the common VPN types EdgeRouter supports IPsec Site-to-Site and L2TP/IPsec remote-access, how to view VPN details both in the CLI and the Web UI, plus quick tips for safety, performance, and troubleshooting. If you’re testing or configuring a home or small office network, this article has you covered with real-world steps, concrete examples, and a few pro tips.
For extra privacy while you test and learn, you can check out this NordVPN deal I’ve found that’s easy to grab: 
Useful URLs and Resources un clickable text
https://help.ubnt.com/hc/en-us/articles/204970380-EdgeRouter-configuration-guide
https://help.ubnt.com/hc/en-us/articles/204970860-EdgeRouter-CLI-commands
https://help.ubnt.com/hc/en-us/articles/204970390-EdgeRouter-VPN-Setup
https://docs.vyos.io/en/latest/
https://openvpn.net/community-resources/how-to/
https://en.wikipedia.org/wiki/Internet_Protocol_Security
https://www.cloudflare.com/learning-security/what-is-ipsec/
Understanding EdgeRouter VPN capabilities
EdgeRouter runs EdgeOS, which supports several VPN scenarios you’ll likely encounter:
– IPsec Site-to-Site VPN: Great for linking two sites securely over the internet. It uses strong encryption AES-256, SHA-256 and offers reliable authentication via pre-shared keys or certificates.
– L2TP/IPsec Remote Access: Lets individual clients connect to your network from remote locations. This is handy for roaming workers or family members who need a quick, relatively simple VPN setup.
– OpenVPN options: EdgeRouter itself doesn’t ship with a full OpenVPN server by default, but you can run OpenVPN in a container or on a connected device if you want that protocol. If you’re pure EdgeOS, IPsec and L2TP cover most home/solo office needs.
– Web UI vs CLI: You’ll often read VPN settings in the EdgeOS Web UI under VPN sections, but the real-time status and troubleshooting commands live in the CLI.
Key facts and numbers to know:
– VPNs add a layer of privacy and enable secure site-to-site or remote access without exposing your internal network to the public Internet.
– L2TP/IPsec remote access is common for small setups due to ease of use, while IPsec Site-to-Site is preferred for dedicated link-to-link tunnels.
– AES-256 with SHA-256 or stronger is the standard for modern VPN configurations, and Perfect Forward Secrecy PFS is a best practice for IPsec tunnels.
Step-by-step: show VPN config on EdgeRouter using the CLI
This is where you’ll spend most of your time if you’re diagnosing or validating a VPN. These commands assume you have SSH access to your EdgeRouter and appropriate privileges.
– Step 1: Connect to your EdgeRouter
– Command: ssh [email protected] replace with your actual IP
– Pro tip: Use key-based authentication to speed things up and stay secure.
– Step 2: See overall VPN status
– Command: show vpn
– What you’ll see: A snapshot of configured IPsec sites, L2TP remote-access sections, and any active sessions. If you don’t see anything, you may not have VPNs configured yet or you’re in a different config mode.
– Step 3: Inspect IPsec Site-to-Site tunnels
– Command: show vpn ipsec sa
– What to look for:
– tunnel status up or down
– peer IPs and connected networks
– SA Security Association lifetimes and data throughput
– Quick interpretation: If the SA is up, you’ll see an established tunnel. If it’s down, you’ll want to check peer reachability, pre-shared keys, and firewall rules.
– Step 4: Check IPsec peer and tunnel config
– Command: show vpn ipsec remote-access for client VPNs, if you’ve set that up
– For site-to-site peers, you might also use:
– Command: show configuration commands | include vpn
– What you’re looking for:
– Correct peer addresses
– Encryption and integrity algorithms AES-256, SHA-256, etc.
– Pre-shared keys or certificate-based authentication
– Step 5: View L2TP remote-access settings if you’re using L2TP/IPsec
– Command: show vpn l2tp remote-access
– Look for:
– User profiles
– Shared secrets note: do not expose secrets in production. output typically omits the actual PSK for security
– Step 6: Export or replicate VPN config
– Command: show configuration commands | match vpn
– Alternatively, to export the full config for backup:
– Command: show configuration commands
– Or back up the boot config file:
– Command: sudo cat /config/config.boot
– Practical tip: Save outputs to a file on your workstation for reference, e.g., ssh admin@router “show vpn” > vpn-status.txt
– Step 7: Verify connectivity and routing
– Commands:
– ping
– traceroute to remote networks to ensure traffic is flowing through the VPN
– What you’re checking: That traffic is being routed through the VPN tunnel when expected.
– Step 8: Debugging tips if tunnels aren’t up
– Check system time on both ends. time skew can break IPsec
– Confirm firewall rules allow VPN traffic UDP 500, UDP 4500 for NAT-T, IPsec ESP
– Verify that the pre-shared keys or certificates match on both sides
– Review VPN logs for specific error messages
– If you recently edited the config, reapply the config and reload the VPN services:
– Command: commit
– Command: save
– Command: restart vpn
– Step 9: Viewing VPN config in the EdgeOS Web UI alternative path
– Navigate to: VPN > IPsec or VPN > L2TP remote-access
– You’ll see a visual list of tunnels, peers, and statuses
– Use the UI for quick checks on status, then switch to CLI for deeper inspection or export
– Step 10: Best-practice tweaks you can implement right away
– Ensure you’re using strong encryption AES-256 and integrity SHA-256
– Enable PFS, prefer higher DH groups e.g., Group 14 or higher
– Enforce perfect forward secrecy for IPsec tunnels
– Regularly rotate pre-shared keys if you’re not using certificates
– Keep EdgeOS firmware up to date to patch vulnerabilities and improve VPN performance
Interpreting VPN outputs: what the numbers mean
– Peer address and identity: confirms you’re connected to the right remote device.
– IKE and ESP proposals: tells you which algorithms are negotiated. mismatches point to config issues.
– SA state: “ESTABLISHED” means the tunnel is active. “VIA” or “INIT” can indicate negotiation or rekeying in progress.
– Data throughput: VPNs can add overhead. expect some performance drop compared to raw wire speed. Heavy encryption with long paths can affect latency.
Pro tips:
– If SA is up but you can’t route traffic, check the firewall rules and NAT configuration to ensure VPN interfaces are allowed to pass traffic.
– If you’re using dynamic IPs on either end, consider using a dynamic DNS name on the peer side to avoid manual updates.
Viewing VPN config in the EdgeRouter Web UI: a quick visual guide
– IPsec section: Check the list of tunnels, their status, and the current phase 1 and phase 2 proposals.
– Remote-access: Review user profiles, authentication methods, and status of clients connected to the VPN.
– Firewalls and NAT: Ensure VPN traffic is allowed by firewall rules and that NAT is not unintentionally modifying VPN packets.
– Logs: Look for VPN-related messages in system logs to catch errors like “peer not responding” or “handshake failed.”
Real-world tips:
– Use the UI to map out which subnets are allowed across tunnels. it’s easy to misconfigure a route, which makes it look like the VPN is broken when it’s just a routing issue.
– Keep a guardrail: disable unnecessary services on VPN interfaces to minimize attack surface.
Common issues and quick fixes
– Issue: VPN tunnel won’t establish
– Fix: Double-check pre-shared keys, certificate paths, and IP addresses, plus ensure ports UDP 500 and UDP 4500 aren’t blocked by your ISP or another device on the path.
– Issue: Mismatched encryption settings
– Fix: Align phase 1/phase 2 proposals on both ends encryption algorithms, hash, DH group, lifetimes.
– Issue: Client VPN connects but traffic doesn’t pass
– Fix: Confirm client IP pool and local LAN networks don’t overlap. verify routes on both ends.
– Issue: Intermittent VPN connectivity
– Fix: Check for intermittent ISP outages, DNS issues, or flaky hardware. re-key settings with shorter lifetimes can help in some scenarios.
– Issue: OpenVPN not available on EdgeRouter
– Fix: If you truly need OpenVPN, run it in a container or on another device in your network, or consider IPsec/L2TP as the built-in solution.
Security considerations and best practices
– Use strong authentication: PSK is fine for small setups, but certificates are more scalable and secure for IPsec.
– Encrypt with AES-256 and authenticate with SHA-256 or higher.
– Enable PFS with an appropriate DH group. it strengthens forward secrecy.
– Rotate keys on a schedule and after suspected exposure.
– Keep firmware updated to patch vulnerabilities, particularly around VPN implementations.
– Limit VPN exposure: only allow VPN access to necessary subnets and hosts. restrict admin access to VPN clients where possible.
Backups and disaster recovery for VPN config
– Regularly export VPN-related configuration: use show configuration commands | match vpn to capture the VPN config commands.
– Backup the entire EdgeRouter config.boot file: sudo cat /config/config.boot. store it securely.
– Maintain a change log: note changes to VPN proposals, peer IPs, and firewall rules so you can roll back if something breaks.
– Test recovery: periodically perform a simulated failover test to ensure your remote sites or clients can reconnect after a switch or reboot.
Real-world scenarios: common setups you’ll likely see
– Small office with a single IPsec site-to-site tunnel to a partner network
– Use a dedicated static IP for the remote peer
– Lock down subnets across the tunnel to avoid routing conflicts
– Remote workers using L2TP/IPsec remote-access
– Create user profiles with strong passwords or certificates
– Consider split tunneling to reduce load on the VPN server while keeping critical resources protected
– Home lab integrating multiple VPN paths
– Use multiple IPsec tunnels for redundancy
– Carefully plan routing so that traffic uses the correct tunnel and doesn’t cause asymmetric paths
Frequently Asked Questions
# What does “show vpn” display on EdgeRouter?
Show vpn provides a high-level snapshot of configured VPNs, including IPsec tunnels and any L2TP remote-access entries, plus the status of those tunnels.
# How do I view IPsec SA on EdgeRouter?
Use the CLI command: show vpn ipsec sa. This reveals active security associations, tunnel states, and negotiated parameters.
# How can I verify a VPN tunnel is up?
Check the IPsec SA state ESTABLISHED from show vpn ipsec sa, confirm remote peer reachability, and ping across the tunnel from a client behind EdgeRouter to a host on the remote side.
# How do I view L2TP remote-access users?
Run: show vpn l2tp remote-access. You’ll see connected users, authentication status, and session details if connected.
# Can EdgeRouter run OpenVPN natively?
EdgeRouter doesn’t ship with a built-in OpenVPN server by default. You can run OpenVPN in a container or on a separate device if you require OpenVPN, but IPsec and L2TP are the native options in EdgeOS.
# How do I export VPN configuration from EdgeRouter?
Use: show configuration commands | match vpn to export VPN-specific commands, or export the full config with: show configuration commands and optionally save to a file. You can also back up /config/config.boot.
# What should I do if my VPN tunnel keeps dropping?
Check time synchronization, confirm firewall allowances for UDP 500/4500 and ESP, validate shared keys or certificates, and rekey when necessary. Review logs for specific errors.
# How do I troubleshoot mismatched IPsec proposals?
Ensure both ends are using compatible encryption, hash, and DH group values. Align Phase 1 IKE and Phase 2 IPsec settings on both ends and re-negotiate the tunnel.
# Is it safe to use a VPN for remote access on a home network?
Yes, it improves privacy and security for remote connections, especially if you access sensitive resources. Use strong authentication, keep software up to date, and segment VPN traffic from your home network when possible.
# How do I secure VPN performance on EdgeRouter?
Enable modern ciphers AES-256, use SHA-256 for integrity, implement PFS with a suitable DH group, and ensure hardware resources CPU, RAM are sufficient for the expected VPN load. Regularly monitor throughput and latency and tune MTU as needed to reduce fragmentation.
# How often should I rotate VPN keys or PSKs?
Rotate keys or PSKs on a schedule appropriate for your risk tolerance and exposure. If you suspect a key compromise, rotate immediately. If you’re using certificates, manage certificate lifetimes proactively.
# Can I test VPN performance without affecting my main network?
Yes. Set up a test VLAN or a separate instance of EdgeRouter for VPN testing. Use a lab network behind the router to simulate remote clients and measure throughput and latency without disturbing production traffic.
# What’s the best practice for backing up VPN configs after changes?
Always export the VPN-related commands and save the full config. Document changes in a change log and verify you can restore from backup by reapplying the config on a test device before touching production.
End of the post.