当前位置:   article > 正文

ENSP实验四:搭建VPN(GRE,配置安全策略)_ensp gre nat

ensp gre nat

 首先分析一下数据的流向:

PC1->PC2

1、FW1:trust->dmz   【192.168.1.1->192.168.2.1  ICMP】

2、AR1->AR2:【202.1.1.1->202.1.3.1|GRE|192.168.1.1->192.168.2.1 icmp】

3、FW2:

①untrust->local         202.1.1.1->202.1.3.1 GRE

②dmz->trust  【192.168.1.1->192.168.2.1  ICMP】

PC2->PC1

4、FW2: trust->dmz 【192.168.1.1<-192.168.2.1  ICMP】

5、AR2->AR1: 【202.1.1.1<-202.1.3.1|GRE|192.168.1.1<-192.168.2.1 icmp】

6、FW1:

① untrust->local   202.1.1.1<-202.1.3.1|GRE

②dmz->trust  【192.168.1.1<-192.168.2.1  ICMP】

 一、基础配置+建立VPN通道+引流(参考ENSP实验三带内容)

**将Tunnel1逻辑接口配到dmz区域中

ping流量【192.168.1.1->192.168.2.1 icmp】从PC1流至FW1

二、FW1配置安全策略(单向:PC1->PC2):

  1. [FW1]security-policy
  2. [FW1-policy-security]rule name test1
  3. [FW1-policy-security-rule-test1]source-zone trust
  4. [FW1-policy-security-rule-test1]destination-zone dmz
  5. [FW1-policy-security-rule-test1]source-address 192.168.1.1 mask 255.255.255.255
  6. [FW1-policy-security-rule-test1]destination-address 192.168.2.1 mask 255.255.255
  7. .255
  8. [FW1-policy-security-rule-test1]service icmp
  9. [FW1-policy-security-rule-test1]action permit

将流量送至FW1后,根据外层头二次查表,送至下一个路由AR1【202.1.1.1->202.1.3.1|GRE|192.168.1.1->192.168.2.1 icmp】

AR1查表,将流量送至AR2

三、配置FW2收流量带安全策略(单向:PC1->PC2)

收到AR2传来的流量【202.1.1.1->202.1.3.1|GRE|192.168.1.1->192.168.2.1 icmp】

1、策略1:决定收不收流量

  1. [FW2]security-policy
  2. [FW2-policy-security]rule name test1
  3. [FW2-policy-security-rule-test1]source-zone untrust
  4. [FW2-policy-security-rule-test1]destination-zone local
  5. [FW2-policy-security-rule-test1]source-address 202.1.1.1 mask 255.255.255.255
  6. [FW2-policy-security-rule-test1]destination-address 202.1.3.1 mask 255.255.255.2
  7. 55
  8. [FW2-policy-security-rule-test1]service gre 或者service protocol 47
  9. [FW2-policy-security-rule-test1]action permit

2、策略2:将流量送至trust区

  1. [FW2]security-policy
  2. [FW2-policy-security]rule name test2
  3. [FW2-policy-security-rule-test2]display this
  4. #
  5. rule name test2
  6. source-zone dmz
  7. destination-zone trust
  8. source-address 192.168.1.1 32
  9. destination-address 192.168.2.1 32
  10. service icmp
  11. action permit
  12. #

*Icmp对应ping命令

四、反向配安全策略(PC2->PC1)

配置好后的策略:

*取消放行所有的安全策略:

  1. [FW1]security-policy
  2. [FW1-policy-security]default action deny
  1. [FW2-policy-security]display this
  2. #
  3. security-policy
  4. rule name test1
  5. source-zone untrust
  6. destination-zone local
  7. source-address 202.1.1.1 32
  8. destination-address 202.1.3.1 32
  9. service protocol 47
  10. action permit
  11. rule name test2
  12. source-zone trust
  13. source-zone dmz
  14. destination-zone trust
  15. destination-zone dmz
  16. source-address 192.168.1.1 32
  17. source-address 192.168.2.1 32
  18. destination-address 192.168.1.1 32
  19. destination-address 192.168.2.1 32
  20. service icmp
  21. action permit
  22. #
  23. [FW1-policy-security] display this
  24. #
  25. security-policy
  26. rule name test1
  27. source-zone trust
  28. source-zone dmz
  29. destination-zone trust
  30. destination-zone dmz
  31. source-address 192.168.1.1 32
  32. source-address 192.168.2.1 32
  33. destination-address 192.168.1.1 32
  34. destination-address 192.168.2.1 32
  35. service icmp
  36. action permit
  37. rule name test2
  38. source-zone untrust
  39. destination-zone local
  40. source-address 202.1.3.1 32
  41. destination-address 202.1.1.1 32
  42. service protocol 47
  43. action permit
  44. #

配置好后可实现PC1与PC2之间的ping

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/567632
推荐阅读
相关标签
  

闽ICP备14008679号