Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to reduce internet bandwidth consumption. I have installed squid as a transparent proxy server and it is currently getting all traffic from port 80. I am using the proxy_stats.gawk utility to generate reports. I am still only logging 1/4 of the traffic the ISP actually reports. Can i get all traffic on all other ports to go though the proxy as well. i.e. VOIP... How can i Achieve this?

share|improve this question

1 Answer 1

There are several things you can do. If you've set it up transparently, and you're really only looking for reporting, you can get iptables to log connections. That way you can meter bandwidth.

I reccomend setting up similar to this: http://www.cyberciti.biz/faq/linux-configuring-ip-traffic-accounting/

If you want to do more than report on bandwidth usage, that's a wholly different story. You'd need targeted application level proxies.

share|improve this answer
    
I already have some iptable entries for the transparent configuration of the proxy. Do you think these might cause a conflict with the IP accounting you mentioned? –  Yves Richard Mar 1 '12 at 23:56
    
My original solution to blocking these ports was to use Ubuntu's ufw util. As soon as I enable it though the proxy stops functioning properly. I am wondering if again the enabling somehow overwrites or conflicts with the original iptables entries. (the entries which actually do the transparent proxy) –  Yves Richard Mar 2 '12 at 0:00
    
I ended up using iptables directly instead of using ufw. Seems like ufw by default creates a catch-all which i didn't need in my case. sudo iptables -A INPUT -j DROP -p tcp --destination-port 5223 -i eth1 –  Yves Richard Mar 2 '12 at 5:21
    
I really like the IP accounting approach. What happens if i don't really know which ports i want to monitor. I am after a list of all protocol/port with bandwidth consumed. Any ideas? –  Yves Richard Mar 2 '12 at 5:22
    
I'd start off by blocking everything except what you know you need. Its a lot more secure to allow only ports you know you need, and add others as you discover. –  Steve Butler Mar 2 '12 at 7:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.