Constructor
docsis_firewall
docsis_firewall
()
Add a filter to the firewall
void
add_filter
([int $protocol = SOL_ALL], [int $control = DEFAULT_DROP], [ipaddress $source_ip_address = '0.0.0.0'], [ipaddress $source_mask = '0.0.0.0'], int $source_port_low, [int $source_port_high = 65535], [ipaddress $dest_ip_address = '0.0.0.0'], [ipaddress $dest_mask = '0.0.0.0'], int $dest_port_low, [int $dest_port_high = 65535], [int $interface_index = INTERFACE_DEFAULT], [int $direction = DIRECTION_BOTH], [int $broadcast_only = BROADCAST_FALSE])
-
int
$protocol: either SOL_ICMP, SOL_TCP, SOL_UDP or SOL_ALL
-
int
$control: either DEFAULT_ACCEPT or DEFAULT_DROP
-
ipaddress
$source_ip_address: Source IP Address
-
ipaddress
$source_mask: Source Mask
-
int
$source_port_low: port to start filtering
-
int
$source_port_high: port to stop filtering
-
ipaddress
$dest_ip_address: Dest IP Address
-
ipaddress
$dest_mask: Destination Mask
-
int
$dest_port_low: Destination port low
-
int
$dest_port_high: Destination port high
-
int
$interface_index: Interface index defaults to INTERFACE_DEFAULT
-
int
$direction: Direction to match against valid values DIRECTION_INBOUND, DIRECTION_OUTBOUND or DIRECTION_BOTH default Value DIRECTION_BOTH
-
int
$broadcast_only: Only match multicast or broadcast traffic Valid Values BROADCAST_TRUE or BROADCAST_FALSE default is BROADCAST_FALSE
Write filter to bootfile
void
write
(
docsis_config &$bootfile, [
int $default_action =
DEFAULT_ACCEPT])
-
docsis_config
$bootfile: to write to
-
int
$default_action: either DEFAULT_ACCEPT or DEFAULT_DROP