Page 1 of 1
Redirect traffic to local proxy
Posted: Wed Nov 27, 2013 12:15 am
by hdavy2002
Hi all,
I have successfully set up SE on Ubuntu 13 server. Runs great. I am interested in diverting my VPN traffic to Ziproxy which is running on 127.0.0.1:8080
Please could someone guide me. Thanks in advance folks.
Cheers
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 5:47 am
by inten
Which interface you want to redirect traffic from?
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 7:08 am
by hdavy2002
Thanks for the reply. I am using a local bridge called tap_soft and I want to redirect/forward to localhost port 8080.
I followed an article from here
http://linc01n.github.io/blog/2013/05/1 ... al-bridge/
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 9:27 am
by inten
Does ziproxy support transparent proxy mode?
Anyway try this but change proxy port number:
iptables -t nat -A PREROUTING -i tap_soft -p tcp --dport 80 -j REDIRECT --to-port PROXY_PORT
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 11:59 am
by hdavy2002
Works perfect my friend. Many thanks.
I have one request.
Right now ziproxy is listing to my external IP. I want to redirect from tap_soft to my localhost 8080. Ziproxy is running on transparent mode.
Thanks in advance.
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 12:13 pm
by inten
Do not understand what you want. Sorry. More detailed please.
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 12:21 pm
by hdavy2002
inten wrote:
> Do not understand what you want. Sorry. More detailed please.
Ok. I have two interface. Eth0 and tap_soft
Right now ziproxy is listening on the eth0, this is also the external ip
i can configure ziproxy to listen on 127.0.0.1:8080
So I want to divert traffic from tap_soft to my localhost:8080
If someone scans my external ip, they will see port 8080 is open and accepting connection.
iptables -t nat -A PREROUTING -i tap_soft -p tcp --dport 80 -j REDIRECT --to-port 8080 works perfect as ziproxy is listening on external IP.
I am looking for something like iptables -t nat -A PREROUTING -i tap_soft -p tcp --dport 80 -j REDIRECT --to-port 127.0.0.1:8080
cheers
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 12:37 pm
by inten
Did you try to configure proxy on tap interface?
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 12:54 pm
by inten
I have just tried, everything is as I described ;)
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 2:10 pm
by hdavy2002
Cool I will give it a short
Re: Redirect traffic to local proxy
Posted: Thu Nov 28, 2013 3:41 pm
by hdavy2002
Thanks for taking time to help me out. It works perfect. Looking forward to your management solution.
Cheers