I am trying to implement the following:
- Network A (e.g. 192.168.1.0/24) with Router (192.168.1.254)
- Network B (e.g. 192.168.2.0/24) with Router (192.168.2.254)
- Online vServer for VPN (e.g. 184.108.40.206) with VPN network (10.8.0.0/24)
- Client A (e.g. on Public Wifi)
- Client B (e.g. on some other Private Network)
I want that All Networks and Clients to initialize a OpenVPN connection on My Server and all clients should be able to see the other clients/Networks over the vpn.
I also want all internet traffic of the clients (that are no routers) to be routed over the server (For Safe Browsing) and I want also that the clients are able to reach hosts inside the Private Networks "Network A" and "Network B" (and vice versa)
The Networks should only route the data that is addressed to vpn clients and hosts behind the other networks over the vpn as well
I would configure the routers of the networks to route:
- 192.168.X.0/24 (where X is the own local network) local
- 192.168.0.0/16 over the vpn.
- 10.8.0.0/24 over the vpn
- 0.0.0.0/0 over the internet (everythinge else...)
- Firewall: NATting to Public IP for Internet, no NATting for VPN
Are my Routes correct?
Now the real Question: How do I set up the OpenVPN server and the Firewall Roules. My Server is a Strato virtual private server with Ubuntu 14.04 64 Bit.
Should I set up NAT as internet gateway for all clients and just ignore the nat on my Routers (routing as described above)? How Do I let the clients communiate with each other? And the most difficult: How do I set up the forewaring of the Packets for hosts inside of the networks over the vpn
Client B <=> VPN <=> Router for Net A <=> Host in Net A Host in Net A <=> Router Net A <=> VPN <=> Router Net B <=> Host in Net B Server that hosts VPN ("internal IP") <=> VPN <=> Some Host behind a router Server that hosts VPN ("internal IP") <=> VPN <=> Client # Not that important, but would be cool: Client A <=> VPN <=> Client B
What else do I neet to set up that i might have forgotten above?