騰訊雲CentOS服務器安裝StrongSwan與Juniper防火牆搭建Ipsec***

StrongSwan
簡介
它也徹底支持新的IKEv2協議的Linux 2.6內核。結合IKEv1和IKEv2模式與大多數其餘基於IPSec的×××產品。重點項目是strongSwan強認證機制,使用X.509公 開密鑰證書和可選的安全儲存私鑰對智能卡經過一個標準化的PKCS # 11接口。一個特色是使用的X.509屬性證書實現了先進的訪問控制方案的基礎上組的成員html

配置目的:
實現線下IDC與騰訊雲內網打通,騰訊雲端未購買(×××網關、雲市場第三方×××產品等等)
site-to-sitevim

上菜:****
本文主要說明雲服務器端的配置,防火牆端你們都能擼,故省略。。。centos

騰訊雲服務器端配置:安全

一、運行如下命令安裝strongSwan:服務器

yum -y install strongswan

二、運行如下命查看安裝的軟件版本:ide

strongswan version

三、配置strongSwan:
運行如下命令打開ipsec.conf配置文件。
[root@VM_1_2_centos ~]# vim /etc/strongswan/ipsec.conf
[root@VM_1_2_centos ipsec.d]# vi wx.conf 測試

ipsec.conf - strongSwan IPsec configuration file

basic configuration

config setupcode

strictcrlpolicy=yes

# uniqueids = no

Add connections here.

Sample ××× connections

conn %default
authby=psk
conn TO-WX-OFFICE
keyexchange=ikev1
left=10.1.1.2
leftid=132.232.XX.XX
leftsubnet=10.1.1.0/24
right=103.20.XX.XX
rightid=103.20.XX.XX
rightsubnet=10.15.1.0/24
auto=route
ike=des-md5-modp1024
ikelifetime=86400s
esp=des-md5-modp1024
lifetime=86400s
type=tunnelhtm

include ipsec.d/*.conf #創建多條不一樣節點隧道,使用單獨的配置文件
注意:經測試能夠實現以上多條隧道及不一樣配置文件
更多場景配置樣例及參數詳解,參見官網(https://strongswan.org/documentation.html 或https://wiki.strongswan.org/projects/strongswan/wiki/ConnSection)
四、配置ipsec.secrets文件:
[root@VM_1_2_centos ~]# vim /etc/strongswan/ipsec.secrets
10.1.1.2 103.20.248.66 : PSK anchnet.comblog

五、打開系統轉發配置:

echo 1 > /proc/sys/net/ipv4/ip_forward

執行如下命令啓動strongSwan服務。

chkconfig strongswan on

service strongswan start

六、在騰訊雲vpc路由表設置去往IDC的路由表:
省略。。。。。。。。
七、查看***創建狀態:
騰訊雲CentOS服務器安裝StrongSwan與Juniper防火牆搭建Ipsec***

IDCJuniper網防火牆配置:省略。。。。。。

相關文章
相關標籤/搜索