I suggest you learn about IPv4 subnetting and routing. That is the basis of what you are trying to do.
With two network interfaces which both have default gateways assigned, there will be two default routes (0.0.0.0/0
) which each have been assigned a metric. The metric is a value which determines a preference, or cost to using that route. In most cases, the WiFi interface will be assigned a higher metric (higher cost) than the wired interface, which means that the lower cost route -- the wired -- will be preferred.
(Once connected, the VPN virtual interface may also be assigned a metric.)
In the network interface settings you can manipulate the metric. By setting the WiFi with a lower metric than the wired, it will prefer to use that interface for the default gateway.
HOWEVER, you may find that this will break access to remote sites that must go over the wired interface, such as corporate Intranet sites. In this case, you will need to set manual routing table entries (using the route
command) for those addresses that must go over a particular interface.
WARNING: Your company IT policies may prohibit or restrict the use of external Internet connections. If this is the case, please do not attempt to bypass their network security in this manner. Depending on your company's industry, it could cost you or your company fines, sanctions, or a loss of trust, business, or employment. It could open your company network to attack through your computer.