Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

Connectrix B 系列 Brocade:如何阻止、禁用或拒绝对 Brocade 交换机的 HTTP/Webtools 访问

Summary: 要阻止、禁用或拒绝对 Brocade B 系列交换机的 HTTP/Webtools 访问,请使用 IPFilter 命令。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

出于安全原因,阻止、禁用或拒绝对 Brocade B 系列进行 HTTP/Webtools 访问、telnet 访问。  

以下是用于创建策略的步骤,该策略具有拒绝任何 IP 使用 HTTP 端口 80 进行访问的规则。

提醒:由于无法更改默认策略,因此您必须克隆要使用的任何过滤器集。在此示例中,我们使用“default_ipv4”集合:
  1. 使用 SSH 或串行电缆以登录到交换机。
  2. 通过复制现有 default_ipv4 策略来创建策略:
ipfilter --clone DenyWebtools -from default_ipv4
  1. 保存新策略:
ipfilter --save DenyWebtools
  1. 验证新策略是否正确。您应该会看到新策略:
ipfilter --show
  1. 将规则添加到新策略以拒绝 HTTP 访问:
ipfilter --addrule DenyWebtools -rule 3 -sip any -dp 80 -prot tcp -act deny

此命令(可分解成多个子命令)执行以下操作:
  • --addrule DenyWebtools:命令将规则添加到 DenyWebtools 规则集。
  • -rule 3:命令在指定的规则索引编号处添加规则。规则编号必须介于 1 和当前最大规则编号加 1 之间。此外,您还可以为一系列端口设置规则。
  • -sip any:命令指定源 IP 地址。在此示例中,任何连接到此交换机的 IP 都阻止了 HTTP。 
  • -dp:命令指定我们将此规则应用到的端口号。在此示例中,HTTP 的端口为 80。
  • -proto:命令指定协议类型。在此示例中,协议为 TCP。
  • -act deny:命令指定与此规则关联的允许或拒绝操作。
  1. 查找 HTTP (80) 的允许规则:
ipfilter --show DenyWentools

输出:
Name: DenyWebtools, Type: ipv4, State: defined (modified)
Rule    Source IP                               Protocol   Dest Port   Action
1     any                                            tcp       22     permit
2     any                                            tcp       23     permit
3     any                                            tcp       80     deny
   
4     any                                            tcp       80     permit   
5     any                                            tcp      443     permit
6     any                                            udp      161     permit
7     any                                            udp      123     permit
8     any                                            tcp      600 - 1023     permit
9     any                                            udp      600 - 1023     permit
  1. 删除 HTTP 的允许规则。这是为了清理,因为现在有两个 HTTP 规则,如上所示:
ipfilter --delrule DenyWebtools -rule 4
  1. 再次保存它:
ipfilter --save DenyWebtools
  1. 再次检查策略以验证其是否正确:
ipfilter --show DenyWebtools

输出:
Name: DenyWebtools, Type: ipv4, State: defined
Rule    Source IP                               Protocol   Dest Port   Action
1     any                                            tcp       22     permit
2     any                                            tcp       23     permit
3     any                                            tcp       80     deny
   <<< 新规则
4     any                                            tcp       80     permit
5     any                                            tcp      443     permit
6     any                                            udp      161     permit
7     any                                            udp      123     permit
8     any                                            tcp      600 - 1023     permit
9     any                                            udp      600 - 1023     permit
  1. 激活新策略:
ipfilter --activate DenyWebtools
  1. 再次检查策略以验证其是否正确,即策略“DenyWebtools”是否处于活动状态: 
ipfilter --show

输出:
Name: DenyWebtools, Type: ipv4, State: active <<<<<<<<<<<<<<<<<< 新策略处于“活动”状态
Rule    Source IP                               Protocol   Dest Port   Action
1     any                                            tcp       22     permit
2     any                                            tcp       23     permit
3     any                                            tcp       80       deny
4     any                                            tcp       80     permit
5     any                                            tcp      443     permit
6     any                                            udp      161     permit
7     any                                            udp      123     permit
8     any                                            tcp      600 - 1023     permit
9     any                                            udp      600 - 1023     permit
  1. 使用受支持的浏览器打开 Webtools,并尝试访问禁用了 HTTP 的交换机的 Webtools UI,这应该会遭到拒绝。
  2. 在交换机“errdump”输出中,您应该看到交换机已拒绝使用 HTTP 的访问。
errdump:
2021/10/06-11:19:28, [SEC-3039], 39764, FID 128, INFO, DS6510B_TT38, Event:Security Violation , Status: failed, Info: Unauthorized host with IP address xx.xx.xx.xx tries to establish connection using TCP port 80.


以下是上面按使用顺序排列的已使用的所有命令的列表:

ipfilter --clone DenyWebtools -from default_ipv4
ipfilter --save DenyWebtools
ipfilter --show
ipfilter --addrule DenyWebtools -rule 3 -sip any -dp 80 -prot tcp -act deny
ipfilter --delrule DenyWebtools -rule 4
ipfilter --save DenyWebtools
ipfilter --show DenyWebtools
ipfilter --activate DenyWebtools
ipfilter --show
errdump

Additional Information

请参阅 Brocade Fabric OS 命令参考手册,了解有关 ipfilter 命令及其用法的更多信息。

Affected Products

Brocade, Connectrix B-Series
Article Properties
Article Number: 000192275
Article Type: How To
Last Modified: 13 Dec 2022
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.