From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Count no of hosts
Date: Fri, 07 Feb 2003 16:45:04 +0000 [thread overview]
Message-ID: <marc-lartc-104463634314735@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104460339709945@msgid-missing>
: Is there any way to dynamically measure the no of concurrent internal
: hosts (IP's) utilising the linux NAT Gateway/forwarding box.
If you have root level access to the box, you can use a bit of shell to
determine the number of concurrent "clients" in any given instant. This
assumes, of course, that you don't have an internally SNATed/masqueraded
network which {c,w}ould hide more clients.
ipchains?
# /sbin/ipchains -MnL | awk '/[0-9][0-9]:[0-9][0-9]/{print $3}' \
> | sort | uniq | wc -l
iptables?
# awk '/(ESTABLISHED|ASSURED)/{print $5}' /proc/net/ip_conntrack \
> | sort | uniq
Naturally with iptables, you'll need to know a bit more about your use of
the connection tracking to disambiguate any inbound or internal to DMZ
connections to accurately count your SNAT/MASQUERADEd connections.
The above shell is not designed with efficiency in mind (obviously), but
you get the idea.
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2003-02-07 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-07 7:47 [LARTC] Count no of hosts CLS Prasad
2003-02-07 7:50 ` Stef Coene
2003-02-07 16:45 ` Martin A. Brown [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=marc-lartc-104463634314735@msgid-missing \
--to=mabrown-lartc@securepipe.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.