I have two OpenVPN servers (10.8.0.0 and 10.9.0.0) set up on my OpenSUSE server. Within one network, each computer is visible to any other one, but I'd like to make it so that computers are visible across networks. I'd like to route the packets like this: when a user (say 10.8.0.6) pings an address on the other VPN (10.9.0.6), the packets are routed to the 10.9.0.1 and then to the appropriate computer in this VPN. How do I achieve this using iptables
or a different tool? I tried the commands at the end of this section with no avail.
Openvpn – Route packets from one VPN to another
networkingopenvpnroutingtunvpn
Best Answer
The DD-WRT project has some OpenVPN examples on its wiki that has a sample configuration that should do exactly what you want in the Advanced Configuration: Multiple routed networks section.
The key parts that you'll want to keep in mind are in this excerpt:
What you'll most likely need to add to your existing configuration is the following:
OpenVPN config for Clients on 10.8.0.0
iptables config for Clients on 10.8.0.0
OpenVPN config for Clients on 10.9.0.0
iptables config for Clients on 10.9.0.0
OpenVPN config for Server
iptables config for Server
Note that these instructions are for setting up Ethernet Routing which is easier to set up and probably what you want for your case. You should, however, review the differences between bridging and routing, and the overview on how to set up Ethernet Bridging if you think you need the features that bridging gives you.