Erwin Van de Velde
2003-Nov-28 02:31 UTC
[Shorewall-users] Getting the status of the firewall from within C/C++ program
Hi, I''m writing a central logging system with several clients, which should be able to detect wether the firewall is running, has stopped, could not be started due to configuration errors, ... Preferably, I''d use a LSB compliant init script, but the shorewall init script does not comply. For example, ''service shorewall status should return 3 when executed on a moment shorewall has been stopped, now the script returns allways 0. Does anyone have such a script? Or if it does not exist, what are the other possibilities to check wether shorewall is running or not? Thanks in advance, Erwin Van de Velde Student of Antwerp University, Belgium PS: Could you please forward your replies to erwin.vandevelde(at)ua.ac.be too? I''m not subscribed on this list...
Tom Eastep
2003-Nov-28 07:39 UTC
[Shorewall-users] Getting the status of the firewall from within C/C++ program
On Fri, 2003-11-28 at 02:30, Erwin Van de Velde wrote:> Does anyone have such a script?Patches cheerfully accepted.> Or if it does not exist, what are the other possibilities to check wether > shorewall is running or not?If ''iptables -L shorewall -n'' returns a status of 0, then Shorewall is running; otherwise, it is in some other state. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net