1 |
> Is there a way to detect programmatically whether the local host has a |
2 |
> firewall enabled? |
3 |
|
4 |
as root: iptables -vnL |
5 |
|
6 |
as user you may look at some files. They are indicators... interpret |
7 |
them. I don't know how to get the rule set. |
8 |
|
9 |
$ test -d /proc/sys/net/ipv4/netfilter |
10 |
|
11 |
get info from /proc/sys/net/ipv4/netfilter/* and /proc/net/ip_* |
12 |
|
13 |
look for logs |
14 |
$ dmesg | grep 'IN=.*OUT=.*SRC=.*DST=.*' |
15 |
|
16 |
gentoo: specific |
17 |
$ /etc/init.d/iptables status |
18 |
$ test -s /var/lib/iptables/rules-save |
19 |
|
20 |
Sascha. |
21 |
|
22 |
-- |
23 |
gentoo-user@g.o mailing list |