Hello, a lot will depend on how your OpenVPN server is configured. If the server specifies that all traffic from the device should go through the tunnel (VPN), then it will be so. And vice versa accordingly.
Here is my situation:
On the OpenVPN server, it is configured that all traffic from the client must go through the tunnel. Routing table on the router before setting up OpenVPN
root@Teltonika-RUT200:~# route -e
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default * 0.0.0.0 U 0 0 0 wwan0
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
10.87.48.97 * 255.255.255.255 UH 0 0 0 wwan0
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 0 0 0 br-lan
In the first line, we see that all traffic goes through WirelessWAN (wwan).
After adding the configuration file (settings) OpenVPN. In the routing table, the route through the tunnel appears first. As well as additional routes for accessing VPN clients and the server. If we delete the first route, we will get access to all VPN clients and the server, but Internet access will be, as before, directly through WWAN.
root@Teltonika-RUT200:~# route -e
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 192.168.225.1 128.0.0.0 UG 0 0 0 tun_c_new
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
128.0.0.0 192.168.225.1 128.0.0.0 UG 0 0 0 tun_c_new
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.2.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.225.0 * 255.255.255.0 U 0 0 0 tun_c_new
194.87.109.147 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
commands to display the routing table:
route -e is more readable, or ip route is slightly less convenient.
root@Teltonika-RUT200:~# ip route
0.0.0.0/1 via 192.168.225.1 dev tun_c_new
default via 192.168.1.1 dev wlan0 proto static src 192.168.1.150 metric 3
128.0.0.0/1 via 192.168.225.1 dev tun_c_new
192.168.1.0/24 dev wlan0 proto static scope link metric 3
192.168.2.0/24 dev br-lan proto kernel scope link src 192.168.2.1
192.168.225.0/24 dev tun_c_new proto kernel scope link src 192.168.225.37
194.87.109.147 via 192.168.1.1 dev wlan0
Remove unnecessary route ip route del 0.0.0.0/1 via 192.168.225.1 dev tun_c_new
Best regards, Anton