Hello,
I am new to linux so excuse my ignorance
Here is my problem: I have a linux box it has a browser that dose not support proxy how ever I am behind a proxy mycache.myproxy.com that i want to connect to. Here is what I did so far
1- Installed squid and configure it for forward all requsts to parnet peer as follows:
squid port 3128
cache peer mycache.myproxy.com parent 8080 0 no-query default
acl all src 0.0.0.0/0.0.0.0
never_direct allow all
Http-access allow all

2- here where i get confused
iptable command what i needed to do is direct all traffic from port 8080 first to squid on port 3128 then squid contact the cache peer on port 8080
so i figure:

iptables -t nat -A PREROUTING -i $INTERFACE -p tcp --dport 80 -j REDIRECT --to-port 3128
gid=`id -g proxy`
iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner --gid-owner $gid -j ACCEPT
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:3128
That did not work also i tried

iptables -t nat -A PREROUTING -i $INTERFACE -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -A OUTPUT -j ACCEPT -m state \ --state NEW -i ppp0 -p tcp --dport 3128
iptables -A OUTPUT -j ACCEPT -m state \ --state ESTABLISHED,RELATED -o ppp0 -p tcp \ --dport 8080
That did not work
So please any help i've read a lot before I asked but the iptables is so complicated at least for me thanks in advance and once again accept my apology for been newbie
Best Regards
Marry