Back

Cli模式配置Cisco VPN

|

Cisco VPN是一个讨厌的又经常需要用到的玩意,但是有时候人在没有GUI的SSH里面,怎么办?
安装vpnc:
sudo apt-get install vpnc
配置vpnc,按以下内容新建/etc/vpnc.conf:

[cc]IPSec gateway vpnhost.com # VPN主机名
IPSec ID MYCOMPANY # VPN组名
IPSec secret \*\*\* # VPN组密码
Xauth username username #VPN用户名
Xauth password \*\*\* #VPN用户密码
NAT Traversal Mode cisco-udp[/cc]

连接:
sudo vpnc-connect

[cc]Connect Banner:
| Blablala..
| Blablala..Blablala..Blablala..
VPNC started in background (pid: 2642)...[/cc]

断开:
sudo vpnc-disconnect

[cc]Terminating vpnc daemon (pid: 2642)[/cc]

可能还需要添加下列规则到iptables防火墙里面:

[cc]-A OUTPUT -p tcp -m tcp --dport 500 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 500 -j ACCEPT
-A OUTPUT -p esp -j ACCEPT[/cc]

No comments yet

Leave a comment

About me

I live in Tasmania, an island a little far from the rest of the world and very close to the sea.
Father of two little girls, have two puppies.

Work

Work in IT industry, AI is my working partner.