LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Transparent Proxy (https://www.linuxquestions.org/questions/linux-newbie-8/transparent-proxy-626781/)

gudboy 03-09-2008 10:24 AM

Transparent Proxy
 
Hi
I want to configure transparent proxy using squid and iptables on Redhat 9.0. Currently I am using Redhat 7.3 (squid and iphains).
I have configured router to route www requets to proxy server (ip policy route-map ). I edit file /etc/sysconfig/ipchains to configure it. My configuration for ipchains is:

# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
:input ACCEPT
:output ACCEPT
:forward ACCEPT
-A input -p tcp -s 0/0 -d 0/0 80 -j REDIRECT 8080
-A input -p tcp -s 0/0 -d x.x.x.x/y.y.y.y 80 -j ACCEPT

(x.x.x.x is the network in which our servers are i.e, proxy, ras, router etc and y.y.y.y is its subet).

Can anyone help me in configuring iptables in similar way for transparent proxy.

Thanks

bathory 03-09-2008 12:14 PM

The iptables rule is:
Code:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
You can read more here

Regards

gilead 03-09-2008 07:46 PM

I'd also suggest having a look at the Squid FAQ since you're upgrading. The setup for transparent (interception) proxying in Squid varies between versions 2.5 & 2.6/30.


All times are GMT -5. The time now is 11:55 AM.