侧边栏壁纸
博主头像
勤奋的冬枣博主等级

只有把抱怨环境的情绪,化为上进的力量,才是成功的保证!

  • 累计撰写 273 篇文章
  • 累计创建 448 个标签
  • 累计收到 116 条评论
标签搜索

目 录CONTENT

文章目录

山石防火墙使用命令配置路由模式

勤奋的冬枣
2022-06-12 / 0 评论 / 0 点赞 / 1,201 阅读 / 491 字

还是山石SG6000,使用命令配置,看着更简单。

拓扑图还是之前的:

image-1654916697003

进来需要先修改密码

image-1654995722918

端口配置

G0/1 作为外网端口,untrust,自动获取地址。
G0/2 作为内外端口,trust,配置地址:192.168.50.1.

配置外网口

SG-6000#
SG-6000# conf
SG-6000(config)# interface e0/1
SG-6000(config-if-eth0/1)# zone untrust
SG-6000(config-if-eth0/1)# ip add dhcp
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

如图:

image-1654996202002

内网口


SG-6000(config-if-eth0/1)#
SG-6000(config-if-eth0/1)# int e0/2
SG-6000(config-if-eth0/2)#
SG-6000(config-if-eth0/2)# zone trust
SG-6000(config-if-eth0/2)#
SG-6000(config-if-eth0/2)# ip add 192.168.50.1 255.255.255.0
SG-6000(config-if-eth0/2)#
SG-6000(config-if-eth0/2)# manage ping
SG-6000(config-if-eth0/2)# manage ssh
SG-6000(config-if-eth0/2)# manage https

如图:

image-1654996468934

配置默认路由

SG-6000#
SG-6000# conf
SG-6000(config)# ip vroute trust-vr
SG-6000(config-vrouter)# ip route 0.0.0.0/0 192.168.30.1
因为外网口是DHCP,网关是192.168.30.1。
SG-6000(config-vrouter)#

image-1655032209699

配置DHCP

SG-6000(config)# dhcp-server pool 50
SG-6000(config-dhcp-server)# address 192.168.50.10 192.168.50.200
SG-6000(config-dhcp-server)# gateway 192.168.50.1
SG-6000(config-dhcp-server)# netmask 255.255.255.0
SG-6000(config-dhcp-server)# lease 3600
SG-6000(config-dhcp-server)# dns 114.114.114.114 8.8.8.8
SG-6000(config-dhcp-server)# domain dongzao.com
SG-6000(config-dhcp-server)# auto-config interface e0/1

应用到接口
SG-6000(config)# interface ethernet0/2
SG-6000(config-if-eth0/2)# dhcp-server enable pool 50

源NAT配置

使用命令还是非常简单的!

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

如图:

image-1654997001591

配置安全策略

SG-6000(config)# rule from any to any service any permit

image-1654997191704

检查一下

查看接口

SG-6000(config)# show interface

image-1654997291358

查看路由

SG-6000(config)# show ip route

image-1654997354262

查看dhcp

image-1655033500037

查看源nat

SG-6000(config)# show snat

image-1654997455262

查看策略

SG-6000(config)# show policy

image-1654997518620

0

评论区