VPN Tunnel Manager Guide

VPN Tunnel Manager - User Guide

What This Script Does:

This script helps you manage your VPN tunnels without needing to remember complex OpenSwan commands.

Basic Usage:

Show Help and List Tunnels:

sudo sh ./vpn-manager.sh

Shows this help guide and lists all your VPN tunnels with their current status.

Check Status of All Tunnels:

sudo sh ./vpn-manager.sh status

Check Status of Specific Tunnel:

sudo sh ./vpn-manager.sh status [TUNNEL_NAME]

Example: sudo sh ./vpn-manager.sh status office-vpn

Restart All Tunnels:

sudo sh ./vpn-manager.sh reload

Use this if connections are down.

Restart Specific Tunnel(s):

sudo sh ./vpn-manager.sh reload [TUNNEL_NAME]

Example: sudo sh ./vpn-manager.sh reload office-vpn branch-office

Show Debug Information:

sudo sh ./vpn-manager.sh debug [TUNNEL_NAME]

Example: sudo sh ./vpn-manager.sh debug office-vpn
Use this to troubleshoot connection problems.

How to Find Your Tunnel Names:

Look at the "Available VPN Tunnels" section when you run the script without arguments.
The tunnel name is shown before the status (UP or DOWN).
Use these exact names when running commands.

 

How to Change a Tunnel's IP Address:

1. Edit the configuration file
Edit: /etc/ipsec.d/[TUNNEL_NAME].conf
Look for lines with "left=" or "right=" followed by an IP address.
Update the IP address(es) as needed.

Example: vi /etc/ipsec.d/office-vpn.conf

2. Edit the secrets file
Edit: /etc/ipsec.d/[TUNNEL_NAME].secrets
Update the IP address(es) in this file to match the configuration file.

Example: vi /etc/ipsec.d/office-vpn.secrets

3. Reload the tunnel
After making changes:

sudo sh ./vpn-manager.sh reload [TUNNEL_NAME]

 

Troubleshooting:

1. If a tunnel shows DOWN
Try reloading the tunnel:

sudo sh ./vpn-manager.sh reload [TUNNEL_NAME]

2. If reload doesn't work
Get debug information:

sudo sh ./vpn-manager.sh debug [TUNNEL_NAME]

3. If the tunnel is still not coming up
• Copy the full output from the debug command
• Submit a support ticket at: https://portal.dynamic.com/submitticket.php?step=2&deptid=1
• Paste the debug output into your ticket
• Our team will help resolve the issue!

4. Check configuration files
Review these files for errors:
• /etc/ipsec.conf
• /etc/ipsec.d/*.conf

 

Options:

--no-color
Disable colored output (useful for logs)

sudo sh ./vpn-manager.sh --no-color

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

OpenSwan VPN Operations & Troubleshooting

How to restart a VPN connection that is experiencing issues: 1. Find the VPN connection name...