Dell Z9264F-ON EMC PowerSwitch BMC User Guide March 2021 - Page 17

Firewall

Page 17 highlights

Firewall To set a firewall, use the set firewall configuration command. Use parameters 0-3 to add the iptables rules and 4-7 to remove the iptables rules. ● NetFN-0x32 ● Command-0x76 ● Request data Byte 1-parameter selector ● Request data Byte 2-State selector ● Request data Byte 3:N-Configuration parameter data ● Response data Byte 1-Completion code ○ 80h-Parameter not supported ○ 81h-Invalid time (start/stop time) ○ 82h-Attempt to write read-only parameter ○ 83h-Attempt to access HTTP Port 80 To set the firewall configuration state, use the following: Table 2. Firewall set parameters Type specific param # To set the command to DROP 00 Parameter data Parameter to drop packets. Parameter 0-3 uses this state to add the rules to drop the packets based on the IP address/port number or ange of IP addresses/port numbers. Use parameter 4-7 to remove the rule. To set the command to ACCEPT 01 Parameter to accept packets. Parameter 0-3 uses this state to add the rules to accept the packets based on the IP address/port number or ange of IP addresses/port numbers. Use parameter 4-7 to remove the rule. To set the firewall parameters, use the following: Table 3. Firewall parameters Parameter # Add the IPv4 address rule 0 Add the range of IPv4 addresses rule 1 Add the IPv4 port number rule 2 Parameter data Data 1:4-IP address ● MS-byte first. This is an IPv4 address that is blocked or unblocked based on the state. Data 1:8-IP address range ● [1:4]-Starting IP address from which IPs are blocked or unblocked based on the state. ● [5:8]-Ending IP address until IPs are blocked or unblocked based on the state. For example, if the IP address is x1.x2.x3.x4, the format is: ● 1st byte = x1 ● 2nd byte = x2 ● 3rd byte = x3 ● 4th byte = x4 Data 1:-Protocol TCP/UDP Configuration methods 17

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45

Firewall
To set a firewall, use the
set firewall configuration
command. Use parameters 0–3 to add the iptables rules and 4–7
to remove the iptables rules.
NetFN—0x32
Command—0x76
Request data Byte 1—parameter selector
Request data Byte 2—State selector
Request data Byte 3:N—Configuration parameter data
Response data Byte 1—Completion code
80h—Parameter not supported
81h—Invalid time (start/stop time)
82h—Attempt to write read-only parameter
83h—Attempt to access HTTP Port 80
To set the firewall configuration state, use the following:
Table 2. Firewall set parameters
Type specific param
#
Parameter data
To set the command to DROP
00
Parameter to drop packets. Parameter
0–3 uses this state to add the rules
to drop the packets based on the IP
address/port number or ange of IP
addresses/port numbers.
Use parameter 4–7 to remove the rule.
To set the command to ACCEPT
01
Parameter to accept packets. Parameter
0–3 uses this state to add the rules
to accept the packets based on the
IP address/port number or ange of IP
addresses/port numbers.
Use parameter 4–7 to remove the rule.
To set the firewall parameters, use the following:
Table 3. Firewall parameters
Parameter
#
Parameter data
Add the IPv4 address rule
0
Data 1:4—IP address
MS-byte first. This is an IPv4 address
that is blocked or unblocked based
on the state.
Add the range of IPv4 addresses rule
1
Data 1:8—IP address range
[1:4]—Starting IP address from
which IPs are blocked or unblocked
based on the state.
[5:8]—Ending IP address until IPs are
blocked or unblocked based on the
state.
For example, if the IP address is
x1.x2.x3.x4, the format is:
1st byte = x1
2nd byte = x2
3rd byte = x3
4th byte = x4
Add the IPv4 port number rule
2
Data 1:—Protocol TCP/UDP
Configuration methods
17