Redirect traffic to local proxy

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
hdavy2002
Posts: 85
Joined: Sun Jun 30, 2013 4:24 pm

Redirect traffic to local proxy

Post by hdavy2002 » Wed Nov 27, 2013 12:15 am

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

inten
Posts: 370
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: Redirect traffic to local proxy

Post by inten » Thu Nov 28, 2013 5:47 am

Which interface you want to redirect traffic from?
When you don't like the answer, change the question.
Cheers,
Team.

VPNHPanel.com
This account is not associated to SoftEther project.

hdavy2002
Posts: 85
Joined: Sun Jun 30, 2013 4:24 pm

Re: Redirect traffic to local proxy

Post by hdavy2002 » Thu Nov 28, 2013 7:08 am

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/

inten
Posts: 370
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: Redirect traffic to local proxy

Post by inten » Thu Nov 28, 2013 9:27 am

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
When you don't like the answer, change the question.
Cheers,
Team.

VPNHPanel.com
This account is not associated to SoftEther project.

hdavy2002
Posts: 85
Joined: Sun Jun 30, 2013 4:24 pm

Re: Redirect traffic to local proxy

Post by hdavy2002 » Thu Nov 28, 2013 11:59 am

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.

inten
Posts: 370
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: Redirect traffic to local proxy

Post by inten » Thu Nov 28, 2013 12:13 pm

Do not understand what you want. Sorry. More detailed please.

hdavy2002
Posts: 85
Joined: Sun Jun 30, 2013 4:24 pm

Re: Redirect traffic to local proxy

Post by hdavy2002 » Thu Nov 28, 2013 12:21 pm

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

inten
Posts: 370
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: Redirect traffic to local proxy

Post by inten » Thu Nov 28, 2013 12:37 pm

Did you try to configure proxy on tap interface?

inten
Posts: 370
Joined: Fri Oct 18, 2013 8:15 am
Location: All around the world
Contact:

Re: Redirect traffic to local proxy

Post by inten » Thu Nov 28, 2013 12:54 pm

I have just tried, everything is as I described ;)

hdavy2002
Posts: 85
Joined: Sun Jun 30, 2013 4:24 pm

Re: Redirect traffic to local proxy

Post by hdavy2002 » Thu Nov 28, 2013 2:10 pm

Cool I will give it a short

hdavy2002
Posts: 85
Joined: Sun Jun 30, 2013 4:24 pm

Re: Redirect traffic to local proxy

Post by hdavy2002 » Thu Nov 28, 2013 3:41 pm

Thanks for taking time to help me out. It works perfect. Looking forward to your management solution.

Cheers

Post Reply