Force internet access through 1 of 2 connections

Hi. I am using both wired and wireless network connections and both of them have access to the internet. My idea is that the wired connection accesses my NAS library, while wireless should be used for IPTV. However, I can see that my IPTV is using wired internet access and not wireless as I would like it to do.

My question is - how do I specify from which adapter Vero should be accessing the internet? I would like to keep both connections, so disabling one of the adapters is not an option.


You could probably statically assign the ip addresses but remove the gateway from the connection you want to use for the NAS, I think this will likely do what you want, maybe remove the DNS server for this connection too

I found a discussion from 2018 about this that seems to imply you have to have two addresses on different subnets, but I’ve never tried it before. Take a look here:

It’s kind of the opposite from what you’re trying to do (they were trying to do Ethernet for internet and Wifi for internal only), but it might get you further along at least.

Might be a overkill, but if you are going with two NICs with internet, wouldn’t Linux Network Namespaces be a more flexibel and dynamic solution, instead of segmenting the network, or hard coded routes in the routing table.

Right now it’s just the NAS vs IPTV, next it’s the VPN for traffic generated by app1 vs media streams from communal media-server via “zeropoint”-network

I mean there are often multi solutions for this kind of problem, but I do believe that learning NS-networking is good knowledge.

Thanks for the suggestion.
At some point, I tried to use one (ubnt) router with Open VPN and route different IPs to say whether they should be using the VPN or not. I also tried implementing the kill switch on Open VPN. After spending 2 weeks on ubnt forums trying to make it work, I gave up. Some people like and know this well, while for me, I do not like networking CLI and it is not something I would be doing on a daily or even yearly basis. As a result, I am looking for the easiest solution.

I will try removing Gateway and DNS addresses from the wired connection manual/staticIP settings.

May I ask why you want to do this? I’m just wondering if there might be a better way to achieve your desired end goal.

There are 2 networks

Network A - is basic WiFi, to which pretty much all of the home devices are connected to.
Network B - VPN access to which (Media) NAS is connected to and I want that NAS to only be able to access the Internet via VPN.

While Vero is connected to both, it “prefers” Network B when accessing the Internet. I actually would not mind that but the IPTV provider blocks the streaming if VPN is used.

As a workaround for now, I need to disable/enable the Network B from Vero, depending on whether I want to watch IPTV (disable Network B) or stream something from NAS (enable Network B).

And you can’t either run a VPN application on the NAS itself or configure the router (or whatever is handling VPN access) to allow the OSMC device to bypass the VPN for internet access?

Sadly, NAS does not have a VPN option.
Configuring the router should be possible, but that is what I haven’t managed to achieve.

I remember trying to do that 6 years ago and following Layman’s firewall explanation guide, I got lost. Maybe I should try it again and see if I have more luck this time.