ipsec簡介
創(chuàng)新互聯(lián)建站專業(yè)為企業(yè)提供陽明網(wǎng)站建設(shè)、陽明做網(wǎng)站、陽明網(wǎng)站設(shè)計、陽明網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、陽明企業(yè)網(wǎng)站模板建站服務(wù),十載陽明做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。IPSec(InternetProtocolSecurity)是安全聯(lián)網(wǎng)的長期方向。它通過端對端的安全性來提供主動的保護以防止專用網(wǎng)絡(luò)與 Internet 的***。在通信中,只有發(fā)送方和接收方才是唯一必須了解 IPSec 保護的計算機。在 Windows 2000、Windows XP 和 Windows Server 2003 家族中,IPSec 提供了一種能力,以保護工作組、局域網(wǎng)計算機、域客戶端和服務(wù)器、分支機構(gòu)(物理上為遠程機構(gòu))、Extranet 以及漫游客戶端之間的通信。
下面我們就用一臺三層交換機和三臺防火墻來模擬一下ipsec
拓撲圖
設(shè)置三層交換機
<Quidway>sys
[Quidway]sys isp
[isp]vlan 10
[isp-vlan10]port e0/1
[isp-vlan10]vlan 20
[isp-vlan20]port e0/9
[isp-vlan20]vlan 30
[isp-vlan30]port e0/17
[isp-vlan30]int vlan10
[isp-Vlan-interface10]ip add 67.130.130.1 255.255.255.252
[isp-Vlan-interface10]int vlan 20
[isp-Vlan-interface20]ip add 67.130.130.5 255.255.255.252
[isp-Vlan-interface20]int vlan 30
[isp-Vlan-interface30]ip add 67.130.130.9 255.255.255.252
設(shè)置fw1
<H3C>sys
[H3C]sys fw1
[fw1]int eth0/0
[fw1-Ethernet0/0]ip add 192.168.3.1 24
[fw1-Ethernet0/0]loopback
[fw1-Ethernet0/0]int eth0/4
[fw1-Ethernet0/4]ip add 67.130.130.2 30
取消端口隔離
[fw1]undo insulate
添加eth0/4到untrust
[fw1]firewall zone untrust
[fw1-zone-untrust]add int eth0/4
添加eth0/0到trust
[fw1]firewall zone trust
[fw1-zone-trust]add int eth0/0
用訪問控制列表篩選
[fw1]acl number 3000 match-order auto
[fw1-acl-adv-3000]rule 10 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.4.0 0.0.0.255
[fw1-acl-adv-3000]rule 20 deny ip source any destination any
創(chuàng)建安全提議tran1
[fw1]ipsec proposal tran1
選擇管道方式
[fw1-ipsec-proposal-tran1]encapsulation-mode tunnel
選擇安全協(xié)議sep
[fw1-ipsec-proposal-tran1]transform esp
完整性校驗選md5
[fw1-ipsec-proposal-tran1]esp authentication-algorithm md5
加密算法選des
[fw1-ipsec-proposal-tran1]esp encryption-algorithm des
設(shè)置ike peer
[fw1]ike peer fw2
設(shè)置來源ip
[fw1-ike-peer-fw2]local-address 67.130.130.2
設(shè)置目標ip
[fw1-ike-peer-fw2]remote-address 67.130.130.6
設(shè)置密鑰
[fw1-ike-peer-fw2]pre-shared-key 123456
注意,這個密鑰一定要記住,下面還要用到
isa和篩選流相結(jié)合
選擇動態(tài)isa
[fw1]ipsec policy policy1 10 isakmp
篩選符合3000表的流
[fw1-ipsec-policy-isakmp-policy1-10]security acl 3000
選擇符合提議tran1的
[fw1-ipsec-policy-isakmp-policy1-10]proposal tran1
選擇ike 對等體為fw2
[fw1-ipsec-policy-isakmp-policy1-10]ike-peer fw2
進入端口eth0/4應(yīng)用策略
[fw1]int eth0/4
[fw1-Ethernet0/4]ipsec policy policy1
第一條隧道已經(jīng)設(shè)置好了,接著該去設(shè)置這條隧道的另一端,進入防火墻fw2
下面是第二條隧道的設(shè)置
[fw1]acl number 3001 match-order auto
[fw1-acl-adv-3001]rule permit ip source 192.168.3.0 0.0.0.255 destination 192.168.5.0 0.0.0.255
[fw1-acl-adv-3001]rule deny ip source any destination any
[fw1]ipsec proposal tran2
[fw1-ipsec-proposal-tran2]encapsulation-mode tunnel
[fw1-ipsec-proposal-tran2]transform esp
[fw1-ipsec-proposal-tran2]esp authentication-algorithm md5
[fw1-ipsec-proposal-tran2]esp encryption-algorithm des
[fw1]ike peer fw3
[fw1-ike-peer-fw3]local-address 67.130.130.2
[fw1-ike-peer-fw3]remote-address 67.130.130.10
[fw1-ike-peer-fw3]pre-shared-key 654321
[fw1]acl number 3001 match-order auto
[fw1-acl-adv-3000]undo rule 20
設(shè)置fw2
<H3C>sys
[H3C]sys fw2
[fw2]int eth0/0
[fw2-Ethernet0/0]ip add 192.168.4.1 24
[fw2-Ethernet0/0]loopback
[fw2-Ethernet0/0]int eth0/4
[fw2-Ethernet0/4]ip add 67.130.130.6 30
[fw2]undo insulate
[fw2]firewall packet-filter default permit
[fw2]firewall zone trust
[fw2-zone-trust]add interface eth0/0
[fw2]firewall zone untrust
[fw2-zone-untrust]add int eth0/4
[fw2]ip route-static 0.0.0.0 0 67.130.130.5
[fw2]acl number 3000 match-order auto
[fw2-acl-adv-3000]rule 10 permit ip source 192.168.4.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
[fw2-acl-adv-3000]rule 20 deny ip source any destination any
[fw2]ipsec proposal tran1
[fw2-ipsec-proposal-tran1]encapsulation-mode tunnel
[fw2-ipsec-proposal-tran1]esp authentication-algorithm md5
[fw2-ipsec-proposal-tran1]esp encryption-algorithm des
[fw2]ike peer fw1
[fw2-ike-peer-fw1]local-address 67.130.130.6
[fw2-ike-peer-fw1]remote-address 67.130.130.2
[fw2-ike-peer-fw1]pre-shared-key 123456
這個密鑰要和另外一端的一樣
[fw2]ipsec policy policy1 10 isakmp
[fw2-ipsec-policy-isakmp-policy1-10]security acl 3000
[fw2-ipsec-policy-isakmp-policy1-10]proposal tran1
[fw2-ipsec-policy-isakmp-policy1-10]ike-peer fw1
[fw2]int eth0/4
[fw2-Ethernet0/4]ipsec policy policy1
配置fw3
<H3C>sys
[H3C]sys fw3
[fw3]int eth0/0
[fw3-Ethernet0/0]ip add 192.168.5.1 24
[fw3-Ethernet0/0]loopback
[fw3-Ethernet0/0]int eth0/4
[fw3-Ethernet0/4]ip add 67.130.130.10 30
[fw3]undo insulate
[fw3]firewall zone untrust
[fw3-zone-untrust]add int eth0/4
[fw3]firewall zone trust
[fw3-zone-trust]add int eth0/0
[fw3]ip route-static 0.0.0.0 0 67.130.130.9
[fw3]acl number 3001 match-order auto
[fw3-acl-adv-3001]rule 10 permit ip source 192.168.5.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
[fw3-acl-adv-3001]rule 20 deny ip source any destination any
[fw3]ipsec proposal tran2
[fw3-ipsec-proposal-tran2]encapsulation-mode tunnel
[fw3-ipsec-proposal-tran2]transform esp
[fw3-ipsec-proposal-tran2]esp authentication-algorithm md5
[fw3-ipsec-proposal-tran2]esp encryption-algorithm des
[fw3]ike peer fw1
[fw3-ike-peer-fw1]local-address 67.130.130.10
[fw3-ike-peer-fw1]remote-address 67.130.130.2
[fw3-ike-peer-fw1]pre-shared-key 654321
[fw3]ipsec policy policy1 10 isakmp
[fw3-ipsec-policy-isakmp-policy1-10]security acl 3001
[fw3-ipsec-policy-isakmp-policy1-10]tracert tran2
[fw3-ipsec-policy-isakmp-policy1-10]ike-peer fw1
[fw3]int eth0/4
[fw3-Ethernet0/4]ipsec policy policy1
好了ipsec
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
本文標題:ipsec的搭建-創(chuàng)新互聯(lián)
網(wǎng)站地址:http://jinyejixie.com/article44/deojhe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、品牌網(wǎng)站建設(shè)、全網(wǎng)營銷推廣、網(wǎng)站策劃、做網(wǎng)站、Google
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)