Results 1 to 8 of 8
  1. #1

    count network traffic with squid proxy

    Hi,
    I want to count the traffic for every IP passed through squid proxy server.
    Is it possible to record the traffic numbers for every IP in external .txt file

    It would be better if it can write outgoing and ingoing traffic.

  2. #2
    Try to use squint.

    Also, for realtime statistics - use sqstat

  3. #3
    I think this is the sort thing iptables would be perfect for.

    You might be interested in reading this: http://wiki.openvz.org/Traffic_accounting_with_iptables

    It is not OpenVZ specific btw.
    █ Wafer VPS
    US North Carolina Based
    Self-Managed OpenVZ VPS Hosting
    Check out our offers!

  4. #4
    squint is apparently a cpu hog, but im checking out sqstat, they are both useful programs.

  5. #5
    Quote Originally Posted by xorpt View Post
    I think this is the sort thing iptables would be perfect for.

    You might be interested in reading this: http://wiki.openvz.org/Traffic_accounting_with_iptables

    It is not OpenVZ specific btw.
    Yes, but in that script iptables takes a list with IPs from the OpenVZ. Can I configure iptables no mater what packet passes the squid, traffic must be recorded? How to do it?

  6. #6
    Quote Originally Posted by rcbandit View Post
    Yes, but in that script iptables takes a list with IPs from the OpenVZ. Can I configure iptables no mater what packet passes the squid, traffic must be recorded? How to do it?
    I thought you had a restricted number of IPs going through squid that you wanted to control. I misunderstood sorry.

    Still, you could add a cron job to harvest the IPs that send packets through squid and add a forward to handle them. Any future packets from those IPs would be accounted.
    █ Wafer VPS
    US North Carolina Based
    Self-Managed OpenVZ VPS Hosting
    Check out our offers!

  7. #7
    Well, in my case squid will ask LDAP database witch IPs can pass, for example - http://www.stress-free.co.nz/transpa..._to_edirectory
    So I need a way to force iptables to count every IP's traffic in LDAP's list.
    I need a way to iptables to ask LDAP server witch IP's traffic to count
    and to write the numbers in LDAP. It's very advanced for me. Can anybody tell how to write the iptables rules?

  8. #8
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    vnstat can account for each IP (via virtual adapter name). And a nice web graph.

    Just to dumpt to a text file, though, i also suggest the path of least resistance...
    iptables w --exact option.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

Similar Threads

  1. Replies: 5
    Last Post: 10-03-2007, 09:01 PM
  2. Proxy Network - aged - 300-500/month - great traffic !!
    By Richard3i in forum Other Web Hosting Related Offers
    Replies: 1
    Last Post: 08-07-2007, 02:27 PM
  3. Squid Proxy
    By Skeptical in forum Hosting Security and Technology
    Replies: 1
    Last Post: 07-29-2007, 12:28 AM
  4. High Traffic Proxy Network Profile for sale --- Don't miss this chance
    By TalkNames.com in forum Other Offers & Requests
    Replies: 2
    Last Post: 09-10-2006, 05:40 AM
  5. Squid Proxy Help
    By white_2kgt in forum Hosting Security and Technology
    Replies: 1
    Last Post: 05-09-2006, 06:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •