2

i have a ubuntu server which i want to use as a transparent proxy, (i have no issue setting up squid, just the iptables. The server only has one network interface. The server sits on the same subnet as the router which is the current gateway to the internet for clients, i want to simply set the gateway on the clients pointing at the transparent proxy which in turn forwards the requests to the router and off to the internet. See me diagram, can anybody offer to help with the iptables configuration to achieve this scenario?

subnet mask /22

     Router(10.4.12.1)         Transparent Proxy (eth0, 10.4.12.2)
       |                   |
  +----+----+---------+----+----+
  |         |         |         |
Comp1(10.4.12.6)     Comp2(10.4.12.5)     Comp3(10.4.12.4)     Comp4(10.4.12.3)

Thanks

user146536
  • 31
  • 3

1 Answers1

0

This is not possible to set up unless the router supports redirecting of all port 80 traffic to the server and then routing the traffic from squid back to the original computer.

It is far simpler and easier to set it up by adding another network interface to the server, and making that the gateway for the network.

With this setup, it is a dawdle to set up transparent proxying and I have set this up more times than I can remember.

http://www.cyberciti.biz/tips/linux-setup-transparent-proxy-squid-howto.html provides a reasonable guide.

drone.ah
  • 482
  • 2
  • 6