By taytrho
I’ve got an interesting one. I have been unable to find a solution thus far. Either I’m going about this completely the wrong way, or the private networking DO offers has some restrictions.
ServerA has two ipsec/l2tp tunnels to external networks. It can access these networks fine, and when I access ServerA with OpenVPN, I can traverse these networks. ServerB in the same datacenter, shares a DO private network with ServerA, and they are both able to ping/ssh eachother.
What I’d like to do is be able to share ServerA’s tunneled networks with ServerB, instead of setting up additional VPN connections from ServerB to the external networks (which would mean more VPN connections as my VPS needs grow).
ServerA ppp0 routes to 10.10.0.0/16 ppp1 routes to 10.11.0.0/16
ServerB if I attempt to ping to 10.10.1.1 (for example), I’d like this to route/nat/what-have-you through ServerA.
I thought I could achieve this just by using the following route on ServerB
ip route add 10.10.0.0/16 via (ServerA's private network IP)
or
ip route add 10.0.0.0/8 via (ServerA's private network IP)
But I cannot get it to work. I’ve attempted a few things in iptables per what I could salvage through googled examples, but I don’t understand enough about iptables to know if I’m doing any of it right.
Any thoughts? Or do I give up and establish additional VPN tunnels for each VPS I need to spin up?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Just came across this question in late 2020. I could suggest using the new VPC networks instead:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.