Setting up a private network

I'm new to networking and linux so I apologize if some of these questions have obvious answers. I'm trying to set up something that looks like this: ~~[http://code.mixpanel.com/wp-content/uploads/2010/09/network.png" target="_blank">](http://code.mixpanel.com/wp-content/upl … etwork.png">http://code.mixpanel.com/wp-content/uploads/2010/09/network.png](. I have my OpenVPN server running and I can ping what will be the server housing my API with the IP OpenVPN sets 10.8.0.5, for example. The API server is currently a client of the VPN server but also allows public traffic. I want to be able to SSH into my private servers which I'm doing through tun0 but aside from that I only want other servers within the network to be able to speak to each other. In other words, the API server should only be able to speak to the Web server (which will be external facing) and the DB server (which won't be external facing).

The image I linked to above is from this article ~~[http://code.mixpanel.com/2010/09/08/openvpn-in-the-rackspace-cloud/" target="_blank">](http://code.mixpanel.com/2010/09/08/ope … ace-cloud/">http://code.mixpanel.com/2010/09/08/openvpn-in-the-rackspace-cloud/]( which mentions using eth1. From what I can tell Linode doesn't provide eth1. Any guidance on the next steps I need to take? Is it just a question of adding some iptable rules on the API server?

4 Replies

Linode does give you a "private" network address and if you set it up following this guide: https://library.linode.com/networking/c … interfaces">https://library.linode.com/networking/configuring-static-ip-interfaces you will get an eth0:0 device (not eth1)

Regarding setting up a private network I am working on an automated way with linode api. I can obtain public and private ip from my linode using linodeiplist. But how can I get the "Default Gateways" (with the api) that I have in linode/Remote Access to complete the interfaces file as said in

~~[https://library.linode.com/networking/configuring-static-ip-interfaces#sphstatic-ip-configuration" target="blank">](https://library.linode.com/networking/c … figuration">https://library.linode.com/networking/configuring-static-ip-interfaces#sph_static-ip-configuration](.

I will appreciate any help to find a way to obtain the gateway using or not the API.

regards

It looks like the gateway is not returned using the API (sounds like an oversight that should be fixed). The Remote Access page of the Manager will tell you what the default gateway is for a given linode. Note that the default gateway only applies to the public IP, never to the private IP.

The default gateway is just your Linode's IP, but with "1" as the last octet. So if your IP is "123.123.123.123", your gateway is "123.123.123.1".

  • Les

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct