[tproxy] transparent proxy in bridgemode
Ramana Yarlagadda
ramana at redshiftnetworks.com
Fri Jul 20 01:37:21 CEST 2007
Hi,
I am trying to use the cttpprxy module to setup a transparent proxy. I am running into some problems because of which I couldn't bring up the setup. Following is one of the issues I ran into.
I configured Linux bridge on my fedora core 6 box. I am running the foreign-tcp-listen with foreign ip 10.10.4.22 and the foreign port is 80.
Then I am also running the foreign_tcp_connect with the foreign IP 10.10.4.111 and foreign port 2000. And destination IP 10.10.4.22, and destination port 80.
The proxy server is listening on port # 10001.
1) started the foreign_tcp_listen application.
2) then I started foreign_tcp_connect application. Unexpectedly the TCP connection is established with the local application ie to foreign_tcp_listen application running on the same box ( instead of connecting to the server).
3) But if don't run the foreign_tcp_application, then the client request goes to the server ( as expected)
3) The setup is as shown below and following are the rules that I have been using
+---------------------------+
10.10.4.111 <==> | eth0 br0 eth1| | <====> 10.10.4.22:80
+---------------------------+
ebtables -t broute -A BROUTING -i eth0 -p IPv4 --ip-protocol 6 --ip-destination-port 80 -j redirect --redirect-target ACCEPT
iptables -t tproxy -A PREROUTING -j TPROXY -p tcp -m tcp -i br0 -d 10.10.4.22 --dport 80 --on-port 10001
is there anything that I am missing here? can somebody help me. .
-Thanks in advance
-ramana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/tproxy/attachments/20070719/04af69d3/attachment.htm
More information about the tproxy
mailing list