建立Unifi USG到Barracuda Firewall的IPSec VPN
December 25th, 2017 Posted in Linux, networking首先就是Barracuda设置,这里我们选用IKE2,具体的设置可以参考官方配置:
这里,我们要修改的几处:
- Authentication
- Authentication Method: 选择Pre-shared key
- Shared Secred : 就是Unifi里面的Pre-Shared Key
- Phase 1
- Encryption: 选择 AES256
- Hash: 选择默认的MD5
- DH-Group: 选择Group 2(不知道为什么,Group 14总是不成功)
- Phase 2
- Encrypton: 选择AES256
- Hash: 选择MD5
- DH-Group: 选择Disable PFS
- Network Settings
- Advanced: 如果有多网段广播,必须勾选One VPN Tunnel per Subnet Pair
- Network Local
- Local ID: 留空
- Remote ID: 留空
接下来就是Unifi USG的设置了。
在正式开始之前,我必须吐槽一下Unifi Controller对IPSec VPN的支持:太弱了,实在是太弱了。VPN类型(VPN Type)居然是Beta,Beta也就算了,居然还只有三种:Auto IPsec VTI, Manual IPsec和OpenVPN。
然后,IPSec里面能选的参数实在是太少了,少得我真的都不知道怎么配置了。当然了,如果你会Unifi Commandline,里面可选的还是非常多的。
做为菜鸟,我们就选用Unifi Controller来做吧。
- 首先,点击Settings
- 点击“Networks”
- 点击”+ CREATE NEW NETWORK”
- Name: 使用任意字符串,建议使用有一定意义的
- Purpose: 选择 “Site-to-Site VPN”
- VPN Type: 选择 “Manual IPsec”
- Enable: 没特殊情况,请勾选
- Remote Subnets: 点击”+ ADD SUBNET”,然后输入远程IP地址段
- Peer IP: Barracuda的外网IP,(Local Gateway)
- Local WAN IP: 本地的外网IP(Remote Gateway)
- Pre-Shared Key: 就是Barracuda里面的Shared Secred
- IPSec Profile:请选择Customized
- 点开“+ ADVANCED OPTIONS”
- Key Exchange Version: 选择”IKEv2″
- Encryption: 选择”AES-256″
- Hash: 选择 “MD5”
- DH Group: 选择 “2”
- PFS: 请不要勾选
- Dynamic Routing: 请不要勾选
- 点击”SAVE”保存
大功造成!
You must be logged in to post a comment.