防火墙配置及防火墙NAT配置

时间:2024-03-06 22:35:00

//设置管理接口应该设置在链路上
service-manage ping permit //若要ping端口需要在端口处开启
display security-policy rule all //查看安全策略
display zone //查看安全区域
firewall packet-filter default permitall //允许所有区域间通信
dis firewall session aging-time //查看各种协议超时时间
dis firewall server-map //查询server-map
firewall session aging-time service-set xx xx //设置协议老化时间
set priority xx //设置区域优先级(默认的不能改)
dis firewall Session table //建立了连接后会话表自动生成,会话状态监测机制
华为g0/0/0 的防火墙默认是有ip的

ENSP上的USG6000防火墙默认用户名密码为:admin  Admin@123

int g0/0/0
service-manage all permit                              //启用接口管理

user-interface console 0                                //进入console口
idle-timeout 0                                                 //设置防火墙超时时间

注意:现在因为有状态检测和会话机制,每个区域只用配一个安全策略

防火墙的服务都要开启

telnet server enable                                       //开启防火墙telenet服务

firewall zone trust                                           //进入安全区域

security-policy                                                //配置安全策略实现流量通过,以前是两端都配置,现在因为加入会话机制只用配一边

rule name yes_telnet                                      //配置安全策略名称,随便取名

source-zone trust                                           //定义来源区域,为客户机所在区域

destination-zone local                                    //定义目标区域local,即防火墙本身

source-address xxxxxx                                  //可以不写,代表所有地址

action permit                                                  //定义该规则的动作,不定义华为默认拒绝

在防火墙中接口IP设置为自动获取
ip address dhcp-alloc

通过命令查看获取到的DNS地址
dis dns server

启用DNS解析功能并访问百度:
dns resolve
ping baidu.com