I have setup squid as a transparent proxy by redirecting port 80 to the native squid port 3128. I know there are issues with getting secure ports like ssl and imaps to go though the proxy but can I redirect all other ports through the proxy as well. I am trying to get a better idea of bandwidth usage. I have setup iptables to log usage and i am getting most traffic going into the related/established rule. I am trying to determine the origins of this traffic by sending traffic to squid for more detailed logging.
Ubuntu – squid transparent proxy on all ports
iptablessquidUbuntu
Related Topic
- Iptables rules for a transparent squid2.7 proxy, and a single network interface
- Iptables – Local transparent proxy with squid and dansguardian
- Centos – Setting up Squid Transparent Proxy on a machine separate from the router
- Iptables – Local transparent proxy
- Iptables – Unable to redirect HTTP traffic to transparent proxy (Squid)
Best Answer
Redirecting traffic of all protocols to proxy server will not work especially for udp-based protocols.
If you want to implement traffic shapping to control bandwidth, you use 'tc'.
For logging, you can use iptables logging for simple things like initiating and terminating connection (matching specific rules). For more detailed logging, this requires speciallized software for packet inspection.