网御防火墙常用命令-2011.01
- 格式:ppt
- 大小:1.99 MB
- 文档页数:29
1. 计算机命令:PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;同init 0 关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;删除IP地址# route add 0.0.0.0 gw <ip># route del 0.0.0.0 gw <ip># route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip># telnet <ip>2. 交换机支持的命令:交换机基本状态:switch: ;交换机的ROM状态rommon> ;路由器的ROM状态hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <hostname> ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain <name> ;设置发vtp域名switch(config)#vtp password <word> ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address <IP> <mask> ;设置IP地址switch(config)#ip default-gateway <IP> ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息3. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname <hostname> ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address <ip> <netmask> ;设置IP地址router(config-if)#ip address <ip> <netmask> second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip> <netmask> ;设置子接口IProuter(config-subif.1)#encapsulation dot1q <n> ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config ;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem:<sname> flash:<dname> ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
联想网御防火墙P o w e r VW e b界面操作手册_4网络配置(总31页)本页仅作为文档封面,使用时可以删除This document is for reference only-rar21year.March第4章网络配置本章主要介绍防火墙的网络配置,由以下部分组成:网络设备,域名服务器,静态路由,策略路由,UPnP服务器,DHCP服务器和HA(高可靠性)。
4.1 网络设备联想网御防火墙PowerV可配置的网络设备有:物理设备,VLAN设备,桥接设备,VPN设备,别名设备,冗余设备和拨号设备。
下面对各类设备的特点做一简要说明。
物理设备:防火墙中实际存在的网口设备,不能删除,也不能添加。
增减网络接口硬件模块会自动在网络配置中显示出来,不需要手动操作。
其中第一个物理设备是默认的管理设备,它的默认IP地址是10.1.5.254,这个地址允许管理,PING和TRACEROUTE。
物理设备是其他设备的基础,如果增减网络接口硬件模块,与这个设备相关的其它设备都会受到影响,这一点需要特别注意。
VLAN设备:是一种在物理设备基础上创建的设备。
与交换机的TRUNK口相联的防火墙物理设备上可以创建VLAN设备,以实现不同VLAN之间的互联。
它可以工作在路由模式下,也可以工作在透明模式下。
同一个物理设备上可以创建VLAN ID为0至4095的VLAN设备。
同一物理设备上创建的不同VLAN设备,VLAN ID必须不同,用于接收和发送带有相应VLAN ID的数据包。
不同物理设备上创建的VLAN设备的VLAN ID可以相同。
桥接设备:是将多个物理设备和VLAN设备置于透明模式,并且进行分组的设备。
启用此设备的防火墙相当于一个二层交换机,但它同时可以过滤三层的内容。
防火墙可以创建多个桥接设备,桥接设备绑定的物理设备或VLAN设备必须是启用并且工作在透明模式的设备。
这些桥接设备可以和工作在路由模式下的物理设备和VLAN设备共存。
(完整版)FortiGate防火墙常用配置命令FortiGate 常用配置命令一、命令结构config Configure object. 对策略,对象等进行配置get Get dynamic and system information. 查看相关关对象的参数信息show Show configuration. 查看配置文件diagnose Diagnose facility. 诊断命令execute Execute static commands. 常用的工具命令,如ping exit Exit the CLI. 退出二、常用命令1、配置接口地址:FortiGate # config system interfaceFortiGate (interface) # edit lanFortiGate (lan) # set ip 192.168.100.99/24FortiGate (lan) # end2、配置静态路由FortiGate (static) # edit 1FortiGate (1) # set device wan1FortiGate (1) # set dst 10.0.0.0 255.0.0.0FortiGate (1) # set gateway 192.168.57.1FortiGate (1) # end3、配置默认路由FortiGate (1) # set gateway 192.168.57.1FortiGate (1) # set device wan1FortiGate (1) # end4、添加地址FortiGate # config firewall addressFortiGate (address) # edit clientnetnew entry 'clientnet' addedFortiGate (clientnet) # set subnet 192.168.1.0 255.255.255.0 FortiGate (clientnet) # end5、添加ip池FortiGate (ippool) # edit nat-poolnew entry 'nat-pool' addedFortiGate (nat-pool) # set startip 100.100.100.1FortiGate (nat-pool) # set endip 100.100.100.100FortiGate (nat-pool) # end6、添加虚拟ipFortiGate # config firewall vipFortiGate (vip) # edit webservernew entry 'webserver' addedFortiGate (webserver) # set extip 202.0.0.167FortiGate (webserver) # set extintf wan1FortiGate (webserver) # set mappedip 192.168.0.168 FortiGate (webserver) # end7、配置上网策略FortiGate # config firewall policyFortiGate (policy) # edit 1FortiGate (1)#set srcintf internal //源接口FortiGate (1)#set dstintf wan1 //目的接口FortiGate (1)#set srcaddr all //源地址FortiGate (1)#set dstaddr all //目的地址FortiGate (1)#set action accept //动作FortiGate (1)#set schedule always //时间FortiGate (1)#set service ALL //服务FortiGate (1)#set logtraffic disable //日志开关FortiGate (1)#set nat enable //开启natend8、配置映射策略FortiGate # config firewall policyFortiGate (policy) #edit 2FortiGate (2)#set srcintf wan1 //源接口FortiGate (2)#set dstintf internal //目的接口FortiGate (2)#set srcaddr all //源地址FortiGate (2)#set dstaddr FortiGate1 //目的地址,虚拟ip映射,事先添加好的FortiGate (2)#set action accept //动作FortiGate (2)#set schedule always //时间FortiGate (2)#set service ALL //服务FortiGate (2)#set logtraffic all //日志开关end9、把internal交换接口修改为路由口确保关于internal口的路由、dhcp、防火墙策略都删除FortiGate # config system globalFortiGate (global) # set internal-switch-mode interfaceFortiGate (global) #end重启--------------------------------------1、查看主机名,管理端口FortiGate # show system global2、查看系统状态信息,当前资源信息FortiGate # get system performance status3、查看应用流量统计FortiGate # get system performance firewall statistics4、查看arp表FortiGate # get system arp5、查看arp丰富信息FortiGate # diagnose ip arp list6、清楚arp缓存FortiGate # execute clear system arp table7、查看当前会话表FortiGate # diagnose sys session stat 或FortiGate # diagnose sys session full-stat;8、查看会话列表FortiGate # diagnose sys session list9、查看物理接口状态FortiGate # get system interface physical10、查看默认路由配置FortiGate # show router static11、查看路由表中的静态路由FortiGate # get router info routing-table static12、查看ospf相关配置FortiGate # show router ospf13、查看全局路由表FortiGate # get router info routing-table all-----------------------------------------------1、查看HA状态FortiGate # get system ha status2、查看主备机是否同步FortiGate # diagnose sys ha showcsum---------------------------------------------------3.诊断命令:FortiGate # diagnose debug application ike -1---------------------------------------------------execute 命令:FortiGate #execute ping 8.8.8.8 //常规ping操作FortiGate #execute ping-options source 192.168.1.200 //指定ping数据包的源地址192.168.1.200FortiGate #execute ping 8.8.8.8 //继续输入ping 的目标地址,即可通过192.168.1.200的源地址执行ping操作FortiGate #execute traceroute 8.8.8.8FortiGate #execute telnet 2.2.2.2 //进行telnet访问FortiGate #execute ssh 2.2.2.2 //进行ssh 访问FortiGate #execute factoryreset //恢复出厂设置FortiGate #execute reboot //重启设备FortiGate #execute shutdown //关闭设备。
防⽕墙配置中必备的六个主要命令防⽕墙的基本功能,是通过六个命令来完成的。
⼀般情况下,除⾮有特殊的安全需求,这个六个命令基本上可以搞定防⽕墙的配置。
下⾯笔者就结合CISCO的防⽕墙,来谈谈防⽕墙的基本配置,希望能够给⼤家⼀点参考。
第⼀个命令:interfaceInterface是防⽕墙配置中最基本的命令之⼀,他主要的功能就是开启关闭接⼝、配置接⼝的速度、对接⼝进⾏命名等等。
在买来防⽕墙的时候,防⽕墙的各个端都都是关闭的,所以,防⽕墙买来后,若不进⾏任何的配置,防⽌在企业的⽹络上,则防⽕墙根本⽆法⼯作,⽽且,还会导致企业⽹络不同。
1、配置接⼝速度在防⽕墙中,配置接⼝速度的⽅法有两种,⼀种是⼿⼯配置,另外⼀种是⾃动配置。
⼿⼯配置就是需要⽤户⼿⼯的指定防⽕墙接⼝的通信速度;⽽⾃动配置的话,则是指防⽕墙接⼝会⾃动根据所连接的设备,来决定所需要的通信速度。
如:interface ethernet0 auto --为接⼝配置“⾃动设置连接速度”Interface ethernet2 100ful --为接⼝2⼿⼯指定连接速度,100MBIT/S。
这⾥,参数ethernet0或者etnernet2则表⽰防⽕墙的接⼝,⽽后⾯的参数表⽰具体的速度。
笔者建议在配置接⼝速度的时候,要注意两个问题。
⼀是若采⽤⼿⼯指定接⼝速度的话,则指定的速度必须跟他所连接的设备的速度相同,否则的话,会出现⼀些意外的错误。
如在防⽕墙上,若连接了⼀个交换机的话,则交换机的端⼝速度必须跟防⽕墙这⾥设置的速度相匹配。
⼆是虽然防⽕墙提供了⾃动设置接⼝速度的功能,不过,在实际⼯作中,作者还是不建议⼤家采⽤这个功能。
因为这个⾃动配置接⼝速度,会影响防⽕墙的性能。
⽽且,其有时候也会判断失误,给⽹络造成通信故障。
所以,在⼀般情况下,⽆论是笔者,还是思科的官⽅资料,都建议⼤家采⽤⼿⼯配置接⼝速度。
2、关闭与开启接⼝防⽕墙上有多个接⼝,为了安全起见,打开的接⼝不⽤的话,则需要及时的进⾏关闭。
网络防火墙是保障网络安全的重要工具,通过限制网络流量和实施访问控制,防火墙可以有效地阻止恶意攻击和未经授权的访问。
为了正确地管理和配置网络防火墙,掌握一些常用的管理命令和技巧是非常有必要的。
一、命令行界面管理网络防火墙通常提供命令行界面,使管理员能够通过输入命令来配置和管理防火墙。
对于Linux系统来说,常用的命令行工具是iptables。
通过iptables,管理员可以设置各种规则和策略,以控制网络流量的进出。
1. 查看当前的规则和策略:使用命令"iptables -L"可以列出当前的防火墙规则和策略。
这对于了解当前防火墙配置的状态非常有用。
管理员可以查看已经定义的规则、策略以及它们的顺序。
2. 添加新的规则:命令"iptables -A"用于添加一个新的规则到防火墙中。
管理员需要指定规则的类型(输入、输出或转发),以及规则所适用的源IP地址、目标IP地址和端口号等信息。
例如,"iptables -A INPUT -s/24 -p tcp --dport 22 -j ACCEPT"将允许从/24网络的主机访问防火墙上的SSH服务。
3. 删除已有的规则:使用命令"iptables -D"可以删除已经存在的规则。
管理员需要指定规则的类型和规则的编号。
例如,"iptables -D INPUT 2"将删除INPUT链上的第二条规则。
4. 保存和加载规则集:在对防火墙进行配置和修改后,管理员需要保存规则集,以便在系统重启后能够重新加载。
通过命令"iptables-save"可以将当前的规则集保存到文件中。
而通过命令"iptables-restore"可以从文件中加载规则集。
二、图形界面管理除了命令行界面,一些网络防火墙还提供了图形界面用于管理和配置。
这种类型的管理界面通常提供了可视化的操作,使得管理者可以更直观地配置和监视防火墙。
防火墙配置常用命令firewall zone name userzone 创建一个安全区域,进一个已建立的安全区域视图时不需要用关键字。
set priority 60 设置优先级add interface GigabitEthernet0/0/1 把接口添加进区域dis zone [userzone]显示区域配置信息[FW]policy interzone trust untrust outbound[FW-policy-interzone-trust-untrust-outbound]policy 1firewall defend ip-sweep enablefirewall defend ip-sweep max-rate 1000firewall blacklist enable[SRG]firewall defend ip-sweep blacklist-timeout 20firewall mac-binding enable MAC地址绑定配置firewall mac-binding 202.169.168.2 00e0-fc00-0100[FW2]firewall zone untrust[FW2-zone-untrust]add interface g0/0/0[FW2]firewall packet-filter default permit interzone trust untrust[FW2]firewall packet-filter default permit interzone local untrustIPSec相关配置:先配置ACL:acl number 3000rule 5 permit ip source 10.0.100.0 0.0.0.255 destination 10.0.200.0 0.0.0.2551、配置安全提议,封闭使用隧道模式,ESP协议,ESP使用DES 加密算法,完整性验证使用SHA1算法。