- 2010-38日
按公司要求在外面mail必须要拨入VPN才能收取,同时要连到公司服务器也必须VPN。但收取mail的人,不一定有权限能连接到citrix服务器。所以就建立了3个组,一个只收取mail,一个只能登录citrix,一个可以2个同时登录。
同时为了便于帐号管理。不能使用具有预共享密钥的“组IKE ID”的方式来建立VPN。
1.这样建立帐号麻烦需要在cli下 用:exec ike preshare-gen vpn_gw lisa@juniper.net
2.这样建立过后别人可以比较容易导出配置文件后,就有了VPN权限。
3.比如user1离职后,user1@xxx.com的帐号没有办法删除,只能更改预共享种子密钥,这样显得比较麻烦,改了过后整个组都要改动。
4.无法查看现在已经存在的用户。
所以就使用共享IKE ID方式来建立VPN,可以比上面方法“预共享密钥的组IKE ID”多一步用户名密码验证。
一. 防火墙上配置
1. 建立组IKE ID用户,并按要求分组。
1.1 建立center_vpn_g IKE组,可以拨2个vpn。mail和citrix
User Name: center
Objects>>Users>>Local ,new:
Status: Enable
IKE User: ( 选择)
Number of Multiple Logins with same ID: 25 (我们的防火墙最大只支持25user,就算写成50也会自己变成25的)
Simple Identity: ( 选择)
IKE Identity: center@cent.sz
Objects >> User Groups >> Local >> New: 在 Group Name 字段中键入center_vpn_g,执行以下操作,然后单击 OK:
选择 center,并使用 << 按钮将其从 Available Members 栏移动到Group Members 栏中。
1.2 建立mailer_vpn_g IKE组,可以拨入mail服务器的VPN
Objects>Users>>Local ,new:
User Name: mailer
Status: Enable
IKE User: ( 选择)
Number of Multiple Logins with same ID: 25
Simple Identity: ( 选择)
IKE Identity: mailer@cent.sz (这个不一定也要同上一个组的@cent.sz这里只是方便记忆)
Objects >> User Groups >> Local >> New: 在 Group Name 字段中键入mailer_vpn_g,执行以下操作,然后单击 OK:
选择 mailer,并使用 << 按钮将其从 Available Members 栏移动到Group Members 栏中。
1.3 建立citrixer_vpn_g IKE组,可以拨入citrix服务器
Objects>Users>>Local ,new:
User Name: citrixer
Status: Enable
IKE User: ( 选择)
Number of Multiple Logins with same ID: 25
Simple Identity: ( 选择)
IKE Identity: citrixer@cent.sz
Objects >> User Groups >> Local >> New: 在 Group Name 字段中键入citrixer_vpn_g,执行以下操作,然后单击 OK:
选择 mailer,并使用 << 按钮将其从 Available Members 栏移动到Group Members 栏中。
User:列表
NameTypeGroupStatusIdentityConfigurecenterIKEcenter_vpn_gEnabledcenter@cent.szIn UsecitrixerIKEcitrixer_vpn_gEnabledcitrixer@cent.szIn UsemailerIKEmailer_vpn_gEnabledmailer@cent.szIn UseGroup:列表:
Group NameGroup typeMembersConfigurecenter_vpn_gikecenterEditcitrixer_vpn_gikecitrixerEditmailer_vpn_gikemailerEdit2. 建立拨号用户并分组,当然也可以最后再来建立这些用户
2.1建立可以拨2个vpn的用户
Objects>Users>>Local ,new:
User Name: evan
Status: Enable
XAuth User ( 选择),在后面输入密码 xxxxxx
建立IKE ID组
Objects >> User Groups >> Local >> New: 在 Group Name 字段中键入mail_citrix_gp,执行以下操作,然后单击 OK:
选择 evan,并使用 << 按钮将其从 Available Members 栏移动到Group Members 栏中。
要继续添加别的用户方法一样
2.2建立可以拨mail的vpn用户
Objects>Users>>Local ,new:
User Name: andy
Status: Enable
XAuth User ( 选择),在后面输入密码 xxxxxx
Objects >> User Groups >> Local >> New: 在 Group Name 字段中键入mail _gp,执行以下操作,然后单击 OK:
选择 andy,并使用 << 按钮将其从 Available Members 栏移动到Group Members 栏中。
2.3建立可以拨citrix的vpn用户
Objects>Users>>Local ,new:
User Name: jack
Status: Enable
XAuth User ( 选择),在后面输入密码 xxxxxx
Objects >> User Groups >> Local >> New: 在 Group Name 字段中键入citrix_gp,执行以下操作,然后单击 OK:
选择 jack,并使用 << 按钮将其从 Available Members 栏移动到Group Members 栏中。
User:列表
NameTypeGroupStatusIdentityConfigurecenterIKEcenter_vpn_gEnabledcenter@cent.szIn UsecitrixerIKEcitrixer_vpn_gEnabledcitrixer@cent.szIn UsejackXAuthcitrix_gpEnabled-In UsemailerIKEmailer_vpn_gEnabledmailer@cent.szIn UseAndyXAuthmail_gpEnabled-In UseevanXAuthmail_citrix_gpEnabled-In UseGroup:列表
Group NameGroup typeMembersConfigurecenter_vpn_gikecenterEditcitrix_gpxauthjackEditcitrixer_vpn_gikecitrixerEditmail_citrix_gpxauthevanEditmail_gpxauthandyEditmailer_vpn_gikemailerEdit3. 建立vpn的Gateway
注意: 一旦VPN完全建立好后,就不要轻易改变GW里的设置,不然很可能导致VPN不可用。我改了一个不重要的地方keepalive Frequency值,保存后,又改回去结果VPN还是不可以用。现象是remote vpn client弹出输入用户名密码的时候是乱码。开始以为是client软件出了问题,卸载后重新安装还是那样,而且别的电脑上也这样。最后把有关的策略、VPN(Autokey ike)、Gateway删除重建才好,奇怪!
后来在网上找到VPNs->AutoKey Advanced->>Xauth->>Allowed Authentication Type:改为Generic,但os5.0 5.4都没有该设置。在5GT5.4的XAuth(位置:返回基本 Gateway 配置页,点XAuth)里的确要选为Generic。在25B5.0里没有的选,而且默认还是chap打勾的。
平时查看配置后,也尽量别点return,而点cancel。
3.1建立能同时拨mail、citrix的VPN的GW
VPNs >> AutoKey Advanced >> Gateway >> New: 输入以下内容,然后单击 OK:
Gateway Name: center_gw
Security Level: Compatible ( 选择)
Remote Gateway Type: Dialup Group ( 选择), center_vpn_g
Preshared Key: abcd1234 (必须要8位及以上,因为netscreen remote client 要求必须8位以上。)
Outgoing Interface: ethernet3 (这个选择你网络的外网接口)
>> Advanced: 输入以下内容,然后单击 Return,返回基本 Gateway 配置页: Enable NAT-Traversal (选择)
UDP Checksum (选择)
Enable XAuth: ( 选择) /有的版本是 XAuth Server (5GT的位置不在这里,而是先返回基本 Gateway 配置页,点XAuth)
Local Authentication: ( 选择)
User Group: ( 选择) mail_citrix_gp
3.2建立拨mail的VPN的GW
VPNs >> AutoKey Advanced >> Gateway >> New: 输入以下内容,然后单击 OK:
Gateway Name: mailer_gw
Security Level: Compatible ( 选择)
Remote Gateway Type: Dialup Group ( 选择), mailer_vpn_g
Preshared Key: abcd1234 (这里可以设置和上面的一样,主要是方便自己维护,为了安全最好设置成不一样的)
Outgoing Interface: ethernet3 (这个选择你网络的外网接口)
>> Advanced: 输入以下内容,然后单击 Return,返回基本 Gateway 配置页:
Enable NAT-Traversal (选择)
UDP Checksum (选择)
Enable XAuth: ( 选择) /有的版本是 XAuth Server
Local Authentication: ( 选择)
User Group: ( 选择) mail_ gp
3.3建立拨citrix的VPN的GW
VPNs >> AutoKey Advanced >> Gateway >> New: 输入以下内容,然后单击 OK:
Gateway Name: citrixer_gw
Security Level: Compatible ( 选择)
Remote Gateway Type: Dialup Group ( 选择), citrixer_vpn_g
Preshared Key: abcd1234
Outgoing Interface: ethernet3 (这个选择你网络的外网接口)
>> Advanced: 输入以下内容,然后单击 Return,返回基本 Gateway 配置页:
Enable NAT-Traversal (选择)
UDP Checksum (选择)
Enable XAuth: ( 选择) /有的版本是 XAuth Server
Local Authentication: ( 选择)
User Group: ( 选择) citrix_ gp
Gateway 列表:
NameAddress/ID/User GroupLocal IDSecurity LevelConfigurecenter_gwDialupcenter_vpn_g-CompatibleEdit-citrix_gwDialupcitrixer_vpn_g-CompatibleEdit-mail_gwDialupmailer_vpn_g-CompatibleEdit-4. 建立VPN连接
4.1建立可以mail、citrix的VPN
VPNs >> AutoKey IKE >> New: 输入以下内容,然后单击 OK:
VPN Name: center_vpn
Security Level: Compatible
Remote Gateway: Predefined: ( 选择) center_gw
>> Advanced: 输入以下高级设置,然后单击 Return,返回基本 AutoKey IKE 配置页:
Bind to: Tunnel Zone, Untrust-Tun
4.2建立可以到mail的VPN
VPNs >> AutoKey IKE >> New: 输入以下内容,然后单击 OK:
VPN Name: mailer_vpn
Security Level: Compatible
Remote Gateway: Predefined: ( 选择) mail_gw
>> Advanced: 输入以下高级设置,然后单击 Return,返回基本 AutoKey IKE 配置页:
Bind to: Tunnel Zone, Untrust-Tun
4.3建立可以到citrix的VPN
VPNs >> AutoKey IKE >> New: 输入以下内容,然后单击 OK:
VPN Name: citrixer_vpn
Security Level: Compatible
Remote Gateway: Predefined: ( 选择) citrix_gw
>> Advanced: 输入以下高级设置,然后单击 Return,返回基本 AutoKey IKE 配置页:
Bind to: Tunnel Zone, Untrust-Tun
VPN列表:
NameSecurityMonitorConfigurecenter_vpncenter_gwCompatibleOffEdit-citrixer_vpncitrix_gwCompatibleOffEdit-mailer_vpnmail_gwCompatibleOffEdit5. 建立相关Policies
5.1建立center_vpn的policies (2条,一条到mail,一条到citrix。就算mail和citrix都在同一个zone也不能选择Multiple而加入2个地址)
5.1.1建立到mail的
Policies >> (From: Untrust, To: DMZ) New: 输入以下内容,然后单击 OK:
Source Address:
Address Book Entry: ( 选择), Dial-Up VPN
Destination Address:
Address Book Entry: ( 选择), 192.168.25.7/32
Service: Multiple (MAIL,POP3,PING)
Action: Tunnel
Tunnel VPN: center_vpn
Modify matching bidirectional VPN policy: ( 清除)
Position at Top: ( 选择)
5.1.2建立到citrix的
Policies >> (From: Untrust, To: Trust) New: 输入以下内容,然后单击 OK:
Source Address:
Address Book Entry: ( 选择), Dial-Up VPN
Destination Address:
Address Book Entry: ( 选择), 10.10.25.2/32
Service: Multiple (CITRIX,HTTP,PING)
Action: Tunnel
Tunnel VPN: center_vpn
Modify matching bidirectional VPN policy: ( 清除)
Position at Top: ( 选择)
5.2建立mailer_vpn的policy (只让到mail)
Policies >> (From: Untrust, To: DMZ) New: 输入以下内容,然后单击 OK:
Source Address:
Address Book Entry: ( 选择), Dial-Up VPN
Destination Address:
Address Book Entry: ( 选择), 192.168.25.7/32
Service: Multiple (MAIL,POP3,PING)
Action: Tunnel
Tunnel VPN: mailer_vpn
Modify matching bidirectional VPN policy: ( 清除)
Position at Top: ( 选择)
5.3建立citrixer_vpn的policy (只让到citrix)
Policies >> (From: Untrust, To: Trust) New: 输入以下内容,然后单击 OK:
Source Address:
Address Book Entry: ( 选择), Dial-Up VPN
Destination Address:
Address Book Entry: ( 选择), 10.10.25.2/32
Service: Multiple (CITRIX,HTTP,PING)
Action: Tunnel
Tunnel VPN: citrixer_vpn
Modify matching bidirectional VPN policy: ( 清除)
Position at Top: ( 选择)
至此防火墙上配置全部完成。
Vpn,gw ,ikeid等的对应关系
NameIKE ID groupIKE IDXAuth groupcenter_vpncenter_gwcenter_vpn_gcenter@cent.szmail_citrix_gpcitrixer_vpncitrix_gwcitrixer_vpn_gcitrixer@cent.szCitrix_gpmailer_vpnmail_gwmailer_vpn_gmailer@cent.szmail_gp二. NetScreen Remote VPN client 配置
1. 单击 Options >> Secure >> Specified Connections。
2. 单击 Add a new connection,在出现的新连接图标旁键入 to mailserver。
3. 配置连接选项:
Connection Security: Secure
Remote Party ID Type: IP Address
IP Address: 192.168.25.7
Connect using Secure Gateway Tunnel: ( 选择)
ID Type: IP Address; 218.xxx.xxx.xxx
可以看情况是否勾选 only connect manually,这个的主要作用是当回到公司如果忘了禁用本软件,它也不会改变路由表。但如果连接超时后,就必须手动在输入用户名密码重新连接。

4. 单击位于 web1 图标左边的加号,展开连接策略。
5. 单击 Security Policy 图标,然后选择 Aggressive Mode 并清除 Enable Perfect Forward Secrecy (PFS)。
6. 单击 My Identity: select选择None,单击 Pre-shared Key >> Enter Key: 键入 abcd1234,然后单击 OK。
ID Type: ( 选择 E-mail Address),然后键入 center@cent.sz
7. 单击 Security Policy 图标左边的加号,然后单击 Authentication (Phase 1) 和Key Exchange (Phase 2) 左边的加号,进一步展开策略。
8. 单击 Authentication (Phase 1) >> Proposal 1: 选择下列“加密”和“数据完整性算法”:
Authentication Method: Pre-Shared Key; Extended Authentication
Encrypt Alg: Triple DES
Hash Alg: SHA-1
Key Group: Diffie-Hellman Group 2
9. 单击 Authentication (Phase 1) >> Create New Proposal: 选择以下 IPSec 协议:
Authentication Method: Pre-Shared Key; Extended Authentication
Encrypt Alg: Triple DES
Hash Alg: MD5
Key Group: Diffie-Hellman Group 2
10. 单击 Authentication (Phase 1) >> Create New Proposal: 选择以下 IPSec 协议:
Authentication Method: Pre-Shared Key; Extended Authentication
Encrypt Alg: DES
Hash Alg: SHA-1
Key Group: Diffie-Hellman Group 2
11. 单击 Authentication (Phase 1) >> Create New Proposal: 选择以下 IPSec 协议:
Authentication Method: Pre-Shared Key; Extended Authentication
Encrypt Alg: DES
Hash Alg: MD5
Key Group: Diffie-Hellman Group 2
12. 单击 Key Exchange (Phase 2) >> Proposal 1: 选择以下 IPSec 协议:
Encapsulation Protocol (ESP): ( 选择)
Encrypt Alg: Triple DES
Hash Alg: SHA-1
Encapsulation: Tunnel
13. 单击 Key Exchange (Phase 2) >> Create New Proposal: 选择以下 IPSec 协议:
Encapsulation Protocol (ESP): ( 选择)
Encrypt Alg: Triple DES
Hash Alg: MD5
Encapsulation: Tunnel
14. 单击 Key Exchange (Phase 2) >> Create New Proposal: 选择以下 IPSec 协议:
Encapsulation Protocol (ESP): ( 选择)
Encrypt Alg: DES
Hash Alg: SHA-1
Encapsulation: Tunnel
15. 单击 Key Exchange (Phase 2) >> Create New Proposal: 选择以下 IPSec 协议:
Encapsulation Protocol (ESP): ( 选择)
Encrypt Alg: DES
Hash Alg: MD5
Encapsulation: Tunnel
16. 单击 File >> Save Changes。
附:
要拨入citrix只需要COPY 上面的设置就可以了。把第3步里的 192.168.25.7改为10.10.25.2就可以了。
最后把该配置文件导出为 to all.spd
如果只是要拨入mail服务器的,只需要把第6步里的 center@cent.sz 改为 mailer@cent.sz 就可以了。(前面把Preshared Key都设置为abcd1234,所以就别的就不用改了),把该配置导出为 to mail.spd
如果只是要拨入citrix服务器的,需要把第3步里的192.168.25.7改为10.10.25.2,把第6步里的 center@cent.sz 改为 citrixer@cent.sz 就可以了,把该配置导出为 to citrix.spd
如果有用户的权限改变了,比如从mail组变成了citrix组,用户端只需把以前配置文件里的 mailer@cent.sz 改为 citrixer@cent.sz 就可以。
转载请注明:
本文转自:http://www.liusuping.com/juniper/juniper-ike-id-vpn-anli.html
1楼 viong
Post:2010-7-26 17:21:22