Strongswan+freeradius+daloradius+ad認證實現ikev2接入服務六

Strongswan+freeradius+daloradius+ad認證實現ikev2接入服務


第五部分    安裝配置 xl2tp 集成 strongswan 支持 l2tp over ipsec


實驗時間:2018年8月15日-2018年8月15日



拓撲圖:


拓撲.PNG  


環境:

    防火牆1:FW1    USG2200

           

                IP地址外網:10.99.101.170    域名:strongswan.test.com

                IP地址內網:192.168.20.3    

    

    防火牆2:FW2    USG2200


     IP地址外網:10.99.101.129     域名:mystrongswan.test.com

    IP地址內網:192.168.20.2

   

    防火牆5:FW5    USG2200


     IP地址外網:10.99.101.167

    IP地址內網:131.107.0.1

 

    服務器:


     域控服務器:


        Windows Server2016

        IP地址:192.168.20.10         域名:dc.test.com

        

     strongswan服務器:


        Centos7

        IP地址:192.168.20.29

        Strongswan-5.6.3


     freeradius服務器:


        Centos7

        IP地址:192.168.20.27

        freeradius-4.0.0

        daloradius-0.9-9

        xl2tp



     客戶端:Windows7

        

        自帶客戶端 ikev2 epa-mschapv2模式 、 計算機證書模式 、l2tp over ipsec模式



第六部分    安裝配置 xl2tp 集成 strongswan 支持 l2tp over ipsec


實驗時間:2018年8月15日-2018年8月15日




1、strongswan服務器安裝ppp xl2tp


ssh 192.168.20.29


yum install -y ppp xl2tpd


vim /etc/strongswan/ipsec.conf


在本文章第一部分的ipsec.conf基礎上修改


l2tp連接後ip由xl2tpd 分配


故註釋或刪除


#       rightsourceip=192.168.20.0/24 


增加如下配置


left填strongswan的ip地址192.168.20.29


leftid填防火牆地址


conn l2tp_ipsec

        compress=yes

        dpdaction=clear

        dpddelay=40

        dpdtimeout=130

        forceencaps=yes

        ikelifetime=8h

        keyingtries=10

        keylife=10800

        margintime=15m

        auto=add

        keyexchange=ikev1

        keyingtries=2

        left=192.168.20.29

        leftauth=psk

        leftcert=YIMIDESERVER.cert.pem

        leftid=10.99.101.170

        leftprotoport=udp/%any

        mobike=no

        rekey=no

        right=%any

        rightauth=psk

        rightsendcert=never

        rightsubnet=0.0.0.0/0

        type=transport


vim /etc/strongswan/ipsec.secret




vim /etc/xl2tpd/xl2tpd.conf



[global]


listen-addr = 192.168.20.29


ipsec saref = yes


[lns default]


ip range = 192.168.20.128-192.168.20.254


local ip = 192.168.20.29


assign ip =yes


require authentication = yes


name = ***


ppp debug = yes


pppoptfile = /etc/ppp/options.xl2tpd


length bit = yes




vim /etc/xl2tpd/l2tp-secrets 



*    *    12345678



vim /etc/ppp/options.xl2tpd




ipcp-accept-local

ipcp-accept-remote

ms-dns 8.8.8.8 # 推送的DNS

ms-dns 8.8.4.4


noccp

auth

crtscts

idle 1800

#mtu 1410

#mru 1410

mtu 1200

mru 1200

nodefaultroute

debug

lock

proxyarp

connect-delay 5000

login

vim /etc/ppp/chap-secrets



xl2tpuser    *    xl2tpuser    *



systemctl enable xl2tpd

systemctl start xl2tpd

systemctl status xl2tpd

firewall-cmd --add-port=1701/udp --permanent

firewall-cmd --reload

systemctl restart strongswan



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