Jump to content

Hey. So I have setup OpenVPN on my server to use for a specific application (to allow people to play games with me without giving away my real IP) but the only problem is, is that all traffic on my PC is routed through the VPN. This VPN has a lot lower internet speed than my ISP internet speed, so I want to know whether or not I can tell Windows to send traffic through my regular Ethernet network and the VPN network at the same time.

 

In Control Panel, I have 2 adapters:

A7oB5bKsJp.png

(OpenVPN is disabled right now)

 

The way I want it to work is that the OpenVPN connection is set as "Public" and my Ethernet adapter is set as "Private". In my firewall I've set everything to private other than the application that will be ran through the VPN (which is on the public network).

 

How can I tell Windows to use both private and public at the same time, and only the application on public will use the VPN? Thanks.

CPU: Intel Core i7 8700  

GPU: Gigabyte GeForce GTX 1070

MOBO: ASUS Z370-F STRIX  

RAM: 16GB Corsair Vengeance DDR4 2133MHz

Link to post
Share on other sites

 

The only way I can come up with is by modifying your routing table. But this would be tricky as you need to know exactly what the source IP or subnet's are. See example below of my system. They network 10.0.3.0/24 is a virtual network for example which is bridged to wireless interface wlp3s0. In your situation this would go to your secondary NIC and it won't be bridged. Easiest way might be to setup your VPN within a VM so you have more control over the network traffic going from it. But I don't know if this might work for what you want to achieve.

 

Do you use Windows server? Then installing the router role on your server might be part of the solution. See picture in spoiler bar.

 

default via 192.168.1.1 dev wlp3s0 proto dhcp metric 600 
10.0.3.0/24 dev lxcbr0 proto kernel scope link src 10.0.3.1 linkdown 
192.168.1.0/24 dev wlp3s0 proto kernel scope link src 192.168.1.107 metric 600 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
Spoiler

image.png

 

 

Link to post
Share on other sites

2 minutes ago, Jarno. said:
 

The only way I can come up with is by modifying your routing table. But this would be tricky as you need to know exactly what the source IP or subnet's are. See example below of my system. They network 10.0.3.0/24 is a virtual network for example which is bridged to wireless interface wlp3s0. In your situation this would go to your secondary NIC and it won't be bridged.

 

Do you use Windows server? Then installing the router role on your server might be part of the solution. See picture in spoiler bar.

 


default via 192.168.1.1 dev wlp3s0 proto dhcp metric 600 
10.0.3.0/24 dev lxcbr0 proto kernel scope link src 10.0.3.1 linkdown 
192.168.1.0/24 dev wlp3s0 proto kernel scope link src 192.168.1.107 metric 600 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
  Reveal hidden contents

image.png

 

 

I use regular Windows 10 Pro.

CPU: Intel Core i7 8700  

GPU: Gigabyte GeForce GTX 1070

MOBO: ASUS Z370-F STRIX  

RAM: 16GB Corsair Vengeance DDR4 2133MHz

Link to post
Share on other sites

4 minutes ago, EvilCat70 said:

I use regular Windows 10 Pro.

Then you need to set the correct routes within the routing table manually. Command below might help you getting started.

route ADD destination_network MASK subnet_mask  gateway_ip metric_cost

 

Link to post
Share on other sites

2 minutes ago, Jarno. said:

Then you need set the correct routes within the routing table manually. Command below might help you getting started.


route ADD destination_network MASK subnet_mask  gateway_ip metric_cost

 

What values should I put into the placeholders (e.g destination, subnet etc)

 

Is the destination the OpenVPN adapter? How does this set it so that a specific application uses that adapter and the rest of the system uses my normal adapter?

CPU: Intel Core i7 8700  

GPU: Gigabyte GeForce GTX 1070

MOBO: ASUS Z370-F STRIX  

RAM: 16GB Corsair Vengeance DDR4 2133MHz

Link to post
Share on other sites

14 minutes ago, EvilCat70 said:

What values should I put into the placeholders (e.g destination, subnet etc)

 

Is the destination the OpenVPN adapter? How does this set it so that a specific application uses that adapter and the rest of the system uses my normal adapter?

Actually I don't really know you might want to read up on this. Got experience creating routes within Cisco routers but not within Windows. But normally you route a network trough a given interface or to the next hop address you won't do this with only one application which makes this more difficult.

 

That is why you want it to be in a VM so you can just route the virtual network trough a given interface making it way easier to get it working. All the traffic that is not within this static route should just route the normal way to the internet like it always did.

 

 

 

 

Link to post
Share on other sites

The thing with route tables (and split tunneling, which is what you want with OpenVPN) id you need to know in advance the address range to isolate. With peer2peer games this is a pretty difficult task!

Intel 11700K - Gigabyte 3080 Ti- Gigabyte Z590 Aorus Pro - Sabrent Rocket NVME - Corsair 16GB DDR4

Link to post
Share on other sites

On 9/28/2019 at 7:18 PM, jake9000 said:

The thing with route tables (and split tunneling, which is what you want with OpenVPN) id you need to know in advance the address range to isolate. With peer2peer games this is a pretty difficult task!

Very true that why you want it at  a different PC or in a VM.

Link to post
Share on other sites

OP: Yes, you can do that. When you set up VPN, you can set up routes, or what is sent via VPN. Check OpenVPN examples, and you'll see how to set it up. You can do it either on server, so it pushes routing config, or on client itself.

 

So, you can have traffic go for only one IP via VPN, or multiple subnets... and rest via regular public network.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×