By default, kernel debug output contains information about all processed connections.
You can configure filters for kernel debug to collect debug messages only for the applicable connections.
There are three types of debug filters:
To configure these kernel debug filters, assign the desired values to the applicable kernel parameters before you start the kernel debug. You assign the values to the applicable kernel parameters temporarily with the "fw ctl set
" command.
Notes:
To configure debug filter of the type "By connection tuple parameters":
The Security Gateway processes connections based on the 5-tuple:
This debug filter lets you filter by these tuple parameters:
Tuple Parameter |
Syntax for Kernel Parameters |
---|---|
Source IP address |
|
Source Ports |
|
Destination IP address |
|
Destination Ports |
|
Protocol Number |
|
Notes:
Example 1:
Configure one Source IP address (simple_debug_filter_saddr_1
), one Destination IP address (simple_debug_filter_daddr_1
), and one Protocol Number (simple_debug_filter_proto_1
).
Example 2:
Configure one Source IP address (simple_debug_filter_saddr_1
), two Destination IP addresses (simple_debug_filter_daddr_2
and simple_debug_filter_daddr_3
), and two Destination Ports (simple_debug_filter_dport_2
and simple_debug_filter_dport_3
).
In this case, the final filter matches only one direction of the processed connection.
Example 1:
|
Example 2:
|
This means that if you need the final filter to match both directions of the connection, you need to configure the applicable debug filters for both directions.
Example 1:
|
Example 2:
|
To configure debug filter of the type "By an IP address parameter":
This debug filter lets you filter by one IP address.
Syntax for Kernel Parameters:
fw ctl set str simple_debug_filter_addr_<N> "<IPv4 or IPv6 Address>" |
Notes:
Example 1:
Configure one Source IP address (simple_debug_filter_addr_1
).
Example 2:
Configure one Source IP address (simple_debug_filter_addr_1
) and one Destination IP address (simple_debug_filter_addr_2
).
To configure debug filter of the type "By a VPN peer parameter":
This debug filter lets you filter by one IP address.
Syntax for Kernel Parameters:
fw ctl set str simple_debug_filter_vpn_<N> "<IPv4 or IPv6 Address>" |
Notes:
Example 1:
Configure one VPN peer (simple_debug_filter_vpn_1
).
Example 2:
Configure two VPN peers (simple_debug_filter_vpn_1
and simple_debug_filter_vpn_2
).
To disable all debug filters:
You can disable all the configured debug filters of all types.
Syntax for Kernel Parameter:
fw ctl set int simple_debug_filter_off 1 |
Usage Example
You need the kernel debug to show the information about the connection from Source IP address 192.168.20.30 from any Source Port to Destination IP address 172.16.40.50 to Destination Port 80 (192.168.20.30:<Any> --> 172.16.40.50:80).
Run these commands before you start the kernel debug:
fw ctl set int simple_debug_filter_off 1
fw ctl set str simple_debug_filter_saddr_1 "192.168.20.30"
fw ctl set str simple_debug_filter_daddr_2 "172.16.40.50"
fw ctl set int simple_debug_filter_dport_1 80 |
Important - In the above example, the indexes <N> of the kernel parameters simple_debug_filter_saddr_<N>
and simple_debug_filter_daddr_<N>
are different, because we want the debug filter to match both directions of this connection.