LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2005, 10:13 PM   #1
Kendo1979
Member
 
Registered: Aug 2004
Location: Bandung, Indonesia
Distribution: Red Hat 9
Posts: 51

Rep: Reputation: 15
connected ips and bandwidth


hello

i'm using RH9 as a proxy server and gateway

i wanna know is there any file on linux that can show me number's of ip connected on my box, and total bandwidth they are using?

i want to be able to run scripts if bandwidth exceeds quota.

thanks
 
Old 04-30-2005, 01:37 AM   #2
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Give `tc` a try, it's a bandwidth shaping utility that could possibly prevent your overuse problems before they start.

Other than that iptables will give you the number of total bytes sent through various rules, so you can query that cleverly and determine how much band you're using.

This is a really generic example from my system (where all gatewayed IPs are agglutinated, but they don't have to be)
Code:
root@gateway:~# iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 34224 packets, 11M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 5298 packets, 274K bytes)
 pkts bytes target     prot opt in     out     source               destination
10167  542K MASQUERADE  all  --  any    eth0    anywhere             anywhere

Chain OUTPUT (policy ACCEPT 15386 packets, 810K bytes)
 pkts bytes target     prot opt in     out     source               destination
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftpd - how to limit download bandwidth but unlimited upload bandwidth? mpls mikeg Linux - Software 3 08-13-2005 01:52 PM
ipw2200 connected but not connected? snataw Linux - Wireless Networking 5 03-31-2005 08:12 AM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 10:06 AM
Limit connected items connected to my router andersh3 Linux - Newbie 1 03-16-2004 11:10 AM
eth0:9 incorrect IPs ,and eth0 not IPs WannaLearnLinux Linux - Networking 10 10-26-2003 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration