From: "William Bohannan" <william.bohannan@spidersat.net>
To: lartc@vger.kernel.org
Subject: RE: [LARTC] process id with firewall and tc
Date: Sat, 16 Sep 2006 18:08:27 +0000 [thread overview]
Message-ID: <004101c6d9bb$233d4ed0$fa010a0a@william> (raw)
In-Reply-To: <000e01c6d995$72bf4510$fa010a0a@william>
Thanks Simon. That helps out heaps. Going to use what you said and use
monit.
Kind Regards
William
-----Original Message-----
From: Simon Lodal [mailto:simonl@parknet.dk]
Sent: 16 September 2006 14:17
To: lartc@mailman.ds9a.nl
Cc: William Bohannan
Subject: Re: [LARTC] process id with firewall and tc
Routing, firewalling and shaping run in kernel and has no pid. Instead you
can
get/set /proc flags, and check for the presence of certain data structures.
/proc/sys/net/ipv4/ip_forward is the routing master switch. If 0, the
machine
forwards nothing. You can both set and get the value, should be relatively
easy from a web page. Beware that setting it to 1 may reset other /proc keys
to default values.
For iptables firewalling you probably need to check if your rules are loaded
or not, a script parsing 'iptables -nL' output could do it. Or you could use
a condition match "enabled" in the beginning of each table, and drop all
traffic if the condition is false. The /proc/net/ipt_condition/enabled value
can then be read and set as a master switch from the web page.
Shaping has no /proc files, and no way to create a master switch, so you
need
a script that parses 'tc qdisc show dev eth0' or 'tc class show dev eth0'
output.
Regards,
Simon
On Saturday 16 September 2006 15:38, William Bohannan wrote:
> Not sure this is the correct place to post this but I am looking to have
> status of the firewall and traffic control (active, disabled, stopped etc)
> on a webpage controlled via something like pid as the machine has many
> things running on it, like firewall, traffic control, data collection for
> graphing the traffic flows, as well as other services like squid etc. Any
> ideas would be most helpful.
>
>
>
> Kind Regards
>
>
>
> William
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
prev parent reply other threads:[~2006-09-16 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-16 13:38 [LARTC] process id with firewall and tc William Bohannan
2006-09-16 14:17 ` Simon Lodal
2006-09-16 18:08 ` William Bohannan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004101c6d9bb$233d4ed0$fa010a0a@william' \
--to=william.bohannan@spidersat.net \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox