tags:

views:

1056

answers:

1

Is there any convenient way to show loaded iptables module list? I can show installed modules by listing /lib/iptables/ (or /lib64/iptables/) directory but I need active module list.

+2  A: 

Loaded iptables modules can be found in /proc/net/ip_tables_matches proc filesystem entry.

cat /proc/net/ip_tables_matches

In PHP I can access the loaded iptables modules by loading and exploding file contents:

$content = file_get_contents('/proc/net/ip_tables_matches');
$modules = explode("\n", $content);

Of course it requires proc filesystem to be mounted (Most GNU Linux distros mount it by default)

eyazici