Routing webtraffic from subnet to subnet via vpn
I have a 2 networks which are linked via vpn using openvpn.
We have 2 types of isp accounts, national traffic and international traffic.
The national traffic account will only allow us to access local domains.
One of the network is using a national traffic account and the second network is using international traffic account.
I am trying to route requests made for internaional sites to be routed to the gateway which has the internatioanl ISP account, thus allowing users to access international sites from the national only subnet.
Here is the network topology
GW :192.168.1.1 (linksys router)
VPN BOX :192.168.1.110 (centos)
VPN TUN :10.8.0.1
GW :192.168.5.1 (linksys router)
VPN BOX :192.168.5.111 (centos)
VPN TUN :10.8.0.6
I know about the redirect-gateway feature in openvpn, however I want to solve this problem without using that code.
The VPN BOXES firewalls are turn off and IPFORWORDING is set to 1.
Every client in both subnets can ping either gateway of each subnet.
The goal is to add routing codes to get Networks B web traffic to go through Networks A gateway.
I now need help routing the web traffic to networks A gateway. I am a newbie to Linux and routing.
I already added the static routes of each subnet into the routers to allow access.
here is my routing table for networks A router
Destination IP Address Subnet Mask Default Gateway Hop Count Interface
188.8.131.52 255.255.255.255 * 40 ppp0
184.108.40.206 255.255.255.255 * 41 ipsec0
168.X.X.X 255.255.255.255 220.127.116.11 40 ppp0
196.14.X.X 255.255.255.255 18.104.22.168 40 ppp0
196.209.X.X 255.255.255.255 * 40 ppp0
196.209.X.X 255.255.255.255 * 41 ipsec0
192.168.5.0 255.255.255.0 192.168.1.110 15 ixp0
10.8.0.0 255.255.255.0 192.168.1.110 15 ixp0
192.168.1.0 255.255.255.0 * 50 ixp0
default 0.0.0.0 22.214.171.124 40 ppp0
any help please