少校
- 注册时间
- 2010-1-24
- 金币
- 1572 个
- 威望
- 0 个
- 荣誉
- 0 个
尚未签到
|
编译安装openswan
首先请确定你编译了openswan模块。
(2)openswan配置
只有两个配置文件需要修改,即/etc/ipsec.conf , 和/etc/ipsec.secrets 。前者是配置文件,后者是秘钥文件。非常遗憾,LuCI目前没有openswan的配置模块,你必须用串口或Telnet登录后用 vi 命令编辑。
(3)vi /etc/ipsec.conf
01.Add connections here
02.# sample VPN connection
03.
04.
05.# for more examples, see
06./etc/ipsec.d/examples/
07.
08.
09.conn net-to-net
10.
11.
12. authby=secret
13.
14.# # Left security gateway, subnet
15.behind it, nexthop toward right.
16.
17.
18. left=%defaultroute
19.
20.
21. leftsubnet=192.168.10.0/24
22.
23.
24.# # Right security gateway, subnet
25.behind it, nexthop toward left.
26.
27. right=e3callsz.dyndns.org
28.
29.
30.rightsubnet=192.168.20.0/24
31.
32.# # To authorize this connection,
33.but not actually start it,
34.
35.# # at startup, uncomment
36.this.
37.
38. auto=add
复制代码(4)vi /etc/ipsec.secrets
01.: PSK "your password"
复制代码
(5)然后用 ipsec setup restart 命令重启IPSec,就大功告成了! |
|