sswk

 

山石网科Hillstone防火墙基础上网配置_CLI命令行(最新版)

1. 需求分析

  • 部分用户需要在命令行界面下进行防火墙基础上网配置,本文展示如何在命令行下配置防火墙的基础上网步骤。

2. 解决方案

2.1 软硬件信息

硬件平台 SG-6000-E1700
软件平台 StoneOS 5.5R7P5

2.2 组网拓扑

2.3 环境说明

  • 运营商线路连接防火墙外网出接口(E0/0)地址:200.0.0.135/24,内网接口(E0/1)地址:192.168.10.1/24连接PC,测试PC地址为192.168.10.10/32。

2.3 配置步骤

(1)外网接口配置

复制代码
SG-6000(config)# interface e0/0 
SG-6000(config-if-eth0/0)# zone untrust 
SG-6000(config-if-eth0/0)# ip address 200.0.0.135
SG-6000(config-if-eth0/0)# manage ping 
SG-6000(config-if-eth0/0)# manage ssh 
SG-6000(config-if-eth0/0)# manage https 
SG-6000(config-if-eth0/0)# exit
复制代码

(2)内网接口配置

复制代码
SG-6000(config)# interface e0/1
SG-6000(config-if-eth0/1)# zone trust
SG-6000(config-if-eth0/1)# ip address 192.168.10.1/24
SG-6000(config-if-eth0/1)# manage ping
SG-6000(config-if-eth0/1)# manage ssh
SG-6000(config-if-eth0/1)# manage https
SG-6000(config-if-eth0/1)# exit
复制代码

(3)默认路由配置

SG-6000(config)# ip vrouter trust-vr SG-6000(config-vrouter)# ip route 0.0.0.0/0 200.0.0.2 (运营商提供的网关) 

(4)源NAT配置

SG-6000(config-vrouter)# snatrule from any to any service any eif e0/0 trans-to eif-ip mode dynamicport SG-6000(config-vrouter)# exit 

(5)安全策略配置

SG-6000(config)# rule from any to any service any permit 注:本案例为全放行策略,具体业务环境请精细化策略。 

2.4 结果验证

  • 接口:
  • 路由:
  • SNAT:
  • 策略:
  • 连通性测试:

2.5  注意事项

  1. WebUI界面配置请参考《防火墙基础上网配置_WebUI》
  2. 具体配置命令可参考《StoneOS命令行手册》

 

☛ 更多防火墙安全网关配置和常见问题 ☚

posted on 2022-04-26 10:37  路与飞  阅读(548)  评论(0编辑  收藏  举报

导航