Both sides previous revisionPrevious revisionNext revision | Previous revision |
vpn_notes [2015/03/17 13:40] – juckins | vpn_notes [2025/03/20 19:24] (current) – juckins |
---|
| ==== VPN Notes ==== |
| |
__Using CentOS VPNC, OpenVPN and Network Manager to get VPN services__ | __Using CentOS VPNC, OpenVPN and Network Manager to get VPN services__ |
| |
Notes from Scalio: | Notes from Scalio: |
| |
| * Install the vpnc rpm and any dependencies, if not already installed. |
- Install the vpnc rpm and any dependencies, if not already installed. | * As root, use visudo to add the following entries to the sudoers file without the surrounding "<>": |
- As root, use visudo to add the following entries to the sudoers file without the surrounding "<>": | |
| |
<your user name> ALL=(root) NOPASSWD: /usr/sbin/vpnc | <your user name> ALL=(root) NOPASSWD: /usr/sbin/vpnc |
<your user name> ALL=(root) NOPASSWD: /usr/sbin/vpnc-disconnect | <your user name> ALL=(root) NOPASSWD: /usr/sbin/vpnc-disconnect |
| |
- As root, create a vpn configuration file (I called mine myvpn.conf) in /etc/vpnc containing the following: | * As root, create a vpn configuration file (I called mine myvpn.conf) in /etc/vpnc containing the following: |
| |
IPSec gateway XXX.XXX.XXX.XXX | IPSec gateway XXX.XXX.XXX.XXX |
Xauth password <your password> | Xauth password <your password> |
| |
- Change file permissions on your vpnc configuration file to 600. | * Change file permissions on your vpnc configuration file to 600. |
- Copy the two attached files to some place in your path. I put them in ~/bin. Make sure you they both have execute permission. | * Copy the two attached files to some place in your path. I put them in ~/bin. Make sure you they both have execute permission. |
- Use the scripts to start/stop VPN sessions. I use this from inside a VirtualBox Linux guest. Occasionally, your vpn sessions will terminate without any notification. If you aren't getting a response from an established session, you can just do "start_vpnc" again and you shouldn't even get kicked out of any remote terminal sessions you have running. | * Use the scripts to start/stop VPN sessions. I use this from inside a VirtualBox Linux guest. Occasionally, your vpn sessions will terminate without any notification. If you aren't getting a response from an established session, you can just do "start_vpnc" again and you shouldn't even get kicked out of any remote terminal sessions you have running. |
| |
| <code> |
| #!/bin/bash |
| # start_vpnc.bash |
| sudo /usr/sbin/vpnc --natt-mode cisco-udp myvpn |
| |
| |
| #!/bin/bash |
| # stop_vpnc.bash |
| sudo /usr/sbin/vpnc-disconnect |
| </code> |
| |
---- | ---- |