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

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

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

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

騰訊雲服務器端配置:

1、運行以下命令安裝strongSwan:

yum -y install strongswan

2、運行以下命查看安裝的軟件版本:

strongswan version

3、配置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 setup

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=tunnel

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

5、打開系統轉發配置:

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

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

chkconfig strongswan on

service strongswan start

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

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章