Link to home
Start Free TrialLog in
Avatar of pkgoyal
pkgoyalFlag for India

asked on

transparent proxy setup

I installed squid proxy on my local machine running at port # 3128.

To make is transparent proxy, I executed following command.

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128

But somehow it is not working. I executed following command and found that none of the packet is meeting this rule...

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128

root@test-desktop:/home/test# iptables -nv -t nat -L PREROUTING
Chain PREROUTING (policy ACCEPT 81 packets, 13075 bytes)
pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 3128
root@test-desktop:/home/test#


Any idea ?

SOLUTION
Avatar of Michael Worsham
Michael Worsham
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pkgoyal

ASKER

If You don't have two ips binded to Your box, or advanced routing, or UP machine, You simply cannot do it in transparent way.
>>>> Why I need to have 2 ips ???
>>>>> How to enable advance routing  or UP machine ?

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial