iptables is usually use for make all traffic from the client will redirect through the proxy server. for example we will redirect traffic port 3128 to port 80
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
but we can make a simple command for redirect multiple port to our proxy for example we want to redirect port 80 3128 444 3127 3129 8080 8081 81 so put this command below
for SQUID in 80 3128 444 3127 3129 8080 8081 81 do iptables -t nat -A PREROUTING -p tcp --dport $SQUID -j REDIRECT --to-ports 3128 done
that it’s and all port on the command list will be redirect to port 3128 or you use your own port on squid proxy server



