Redirect traffic from OpenVPN-Server to foreign countries

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
versvendet
OpenVpn Newbie
Posts: 2
Joined: Wed May 09, 2018 7:39 am

Redirect traffic from OpenVPN-Server to foreign countries

Post by versvendet » Wed May 09, 2018 7:59 am

Hello Community,

I have a Server with a static public IP and a Domain. Let's call the IP 1.2.3.4 and the domain "test.de"
The clients connect via UDP and Port 1194 to the Server an receive an IP in 10.11.1.0/24.
For example my laptop gets the IP 10.11.1.2 and the server has the IP 10.11.1.1.
All traffic that comes from my laptop is tunneled to the OpenVPN-Server.

Now I want that the traffic that comes to the server will be forwarded to foreign countries.
Is it possible that my laptop routes the traffic to the server and the server routes it to foreign countries.

Laptop (10.11.1.2) -> OpenVPN-Server (1.2.3.4) -> foreign countries (another OpenVPN-Server (ex. 5.6.7.8))

In the end, my laptop should have the public ip 5.6.7.8

Is that possible, because my server has to keep its public ip 1.2.3.4?


I hope for your help
Thank you

Sven

bbuckm
OpenVPN User
Posts: 41
Joined: Thu Apr 26, 2018 2:45 pm

Re: Redirect traffic from OpenVPN-Server to foreign countries

Post by bbuckm » Wed May 09, 2018 12:35 pm

You can do double-OpenVPN by having one instance run on a host machine (to 1.2.3.4) and one instance on a virtual machine (to 5.6.7.8).

User avatar
Pippin
OpenVPN Expert
Posts: 351
Joined: Wed Jul 01, 2015 8:03 am

Re: Redirect traffic from OpenVPN-Server to foreign countries

Post by Pippin » Wed May 09, 2018 3:53 pm

Your server 1.2.3.4 can run a client to 5.6.7.8 simultaneous, yes.
Then route the traffic from server to client, so that is a routing matter.

Skaperen
OpenVPN Power User
Posts: 87
Joined: Fri Aug 05, 2011 3:02 pm
Contact:

Re: Redirect traffic from OpenVPN-Server to foreign countries

Post by Skaperen » Thu May 10, 2018 3:57 am

why not just run 2 processes of openvpn on different ports?

User avatar
Pippin
OpenVPN Expert
Posts: 351
Joined: Wed Jul 01, 2015 8:03 am

Re: Redirect traffic from OpenVPN-Server to foreign countries

Post by Pippin » Thu May 10, 2018 3:45 pm

Because she/he wants:
Laptop (10.11.1.2) -> OpenVPN-Server (1.2.3.4) -> foreign countries (another OpenVPN-Server (ex. 5.6.7.8))
client --> server-test.de also running a client to --> server-another-country --> internet ;)

versvendet
OpenVpn Newbie
Posts: 2
Joined: Wed May 09, 2018 7:39 am

Re: Redirect traffic from OpenVPN-Server to foreign countries

Post by versvendet » Tue May 15, 2018 2:07 pm

Thank you first for your answers.
I have already tried it, but the server was then no longer accessible under his public ip.
May I forgot something to observe?

Post Reply