您好,欢迎来到花图问答。
搜索
您的当前位置:首页ipsec VPN 使用nat命令

ipsec VPN 使用nat命令

来源:花图问答


Ipsec vpn 里面加入nat的命令

面试:Vpn的建立:1.创建VPN tunnel,交换key(建立对等体)。Ike sa 协商

2,ipsec sa(安全联盟)协商 的建立阶段 目的:对传输的数据进行加密。

步骤一:配置IP地址

步骤二:将接口划分到相应的区域

步骤三:配置路由(出口设备必须有到达加密点FW2以及通信点client2的路由)

步骤四:放行区域间流量

FW1:

policy interzone untrust trust inbound (

policy 1

action permit

policy interzone untrust local inbound(建立邻居的 ike-peer)

policy 1

action permit

policy interzone untrust trust outbound

policy 1

action permit

FW2:

policy interzone untrust trust inbound

policy 1

action permit

policy interzone untrust local inbound

policy 1

action permit

policy interzone untrust trust outbound

policy 1

action permit

步骤五:定义感兴趣流量

FW1

Acl 3000

rule permit ip source 192.168.0.0 0.0.0.255 destination 172.16.1.0 0.0.0.255

FW2

Acl 3000

rule permit ip source 172.16.1.0 0.0.0.255 destination 192.168.0.0 0.0.0.255

步骤六:创建IKE 安全提议(最重要的目的是:对等体的建立)

FW1

ike proposal 10 (该命令是必须打的下面的三条是可以省略的)

authentication-method pre-share #认证模式为共享秘钥

integrity-algorithm hmac-md5-96 #配置完整性算法为 hmac-md5-96

authentication-algorithm md5 #配置认证算法为md5

FW2

ike proposal 10(该命令是必须打的下面的三条是可以省略的))

authentication-method pre-share #认证模式为共享秘钥

integrity-algorithm hmac-md5-96 #配置完整性算法为 hmac-md5-96

authentication-algorithm md5 #配置认证算法为md5

步骤七:创建ipsec安全提议

FW1

ipsec proposal huawei#创建安全提议名字为huawei(该命令是必须打的下面的三条是可以省略的))

transform esp #封装模式为esp(默认)

encapsulation-mode tunnel#传输模式为隧道模式(默认)

esp authentication-algorithm md5 #esp的认证算法为md5

esp encryption-algorithm aes #esp的加密算法为aes

FW2

ipsec proposal huawei#创建安全提议名字为huawei(该命令是必须打的下面的三条是可以省略的))

transform esp #封装模式为esp(默认)

encapsulation-mode tunnel#传输模式为隧道模式(默认)

esp authentication-algorithm md5 #esp的认证算法为md5

esp encryption-algorithm aes #esp的加密算法为aes

步骤八:配置ike peer 对等体

FW1

ike peer huawei #命名ike peer 为huawei

ike-proposal 10 #关联ike安全提议

pre-shared-key huawei #设置共享秘钥

remote-address 64.1.1.1 #设置对等体的IP地址

FW2

ike peer huawei #命名ike peer 为huawei

ike-proposal 10 #关联ike安全提议

pre-shared-key huawei #设置共享秘钥

remote-address 202.1.1.1 #设置对等体的IP地址

步骤九:配置ipsec 策略

FW1

ipsec policy huawei 10 isakmp #创建名字为huawei的ipsec策略,模式为自动协商模式

security acl 3000 #关联感兴趣流量

ike-peer huawei #关联ike 对等体

proposal huawei #关联ipsec安全提议

FW2

ipsec policy huawei 10 isakmp #创建名字为huawei的ipsec策略,模式为自动协商模式

security acl 3000 #关联感兴趣流量

ike-peer huawei #关联ike 对等体

proposal huawei #关联ipsec安全提议

步骤十:应用ipsec 策略于网关出口

FW1

int g0/0/1

ipsec policy huawei #关联ipsec 策略

FW2

int g0/0/1

ipsec policy huawei #关联ipsec 策略

最后一步加入nat的策略

FW1:

[SRG-nat-policy-interzone-trust-untrust-outbound-1]

policy 1

action no-nat

policy source 192.168.0.0 mask 24

policy destination 172.16.1.0 mask 24

[SRG-nat-policy-interzone-trust-untrust-outbound-2]

policy 2

action source-nat

easy-ip GigabitEthernet0/0/1

FW2:

policy 1

action no-nat

policy source 172.16.1.0 mask 24

policy destination 192.168.0.0 mask 24

policy 2

action source-nat

easy-ip GigabitEthernet0/0/1

如图看ESP加密和ICMP不加密的。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuowenda.com 版权所有 湘ICP备2023022495号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务