I have 2 routers, the main router`s gateway (from my ISP) is 192.168.1.1, the second router (a netgear R7000 with VPN configured) has 192.168.2.1 as gateway.
My centos 7 machine is connected via ethernet through a switch to the main router but he is quite far from the VPN router (the second router), is there a way how to re-route the connection from the centos machine to the second router so that I can use the VPN connection?
As a noob, I tried to change the machine IP address in the settings form 192.168.1.100 to 192.168.2.100 and the gateway to 192.168.2.1 but it is obviously not that simple :) as I have got no connection after that.
EDIT : A bit more details : I have 2 routers, router 1 : gw 192.168.1.1 with subnet 255.255.255.0 located at the first floor as the DSL line from my ISP comes from the first floor.
This router has 2 eth cables connected to its eth ports, the first cable goes downstairs to the ground floor to a switch. The switch connects the centos machine and an IP webcam. The second cable goes upstairs to the second floor to another switch and the router 2 is connected to it (the netgear) from the switch to the WAN port. The netgear has the gw 192.168.2.1 and subnet 255.255.255.0.
Two other computers are connected via cable to this switch on the second floor included an AP to extend the wifi signal for mobile phones and tablets.
What I would like to happen is : I configured a VPN on the netgear and I want also the centos7 from the ground floor to be connected to the VPN router located at the second floor. I hope this is clear enough :)