A few virtualmin boxes on datacenter to access each other with internal address

I have a virtualmin box on datacenter. Next week I’ll send another 3 virtualmin boxes to the datacenter. I asked the datacenter support what was the best way for the servers to access each other internally without the public IP, something like All my servers have dual Ethernet connections, so they told me that the best way is to send a switch to the datacenter, and link each second Ethernet to the switch.

Ok. Question is, how do I properly configure the second Ethernet card to be used internally only and it doesn’t interfere with the first one? I’ve tried to do that once, but the server could not access the internet anymore and all services became offline. So I removed the second Ethernet configuration to restore the services back online.

Thank you

  • Rogerio


If a default route is added that’s associated with the new interface, that could cause a problem.

But, if you just bring up your second interface with your internal IP in it, that should work for you.

You can do that in Webmin -> Networking -> Network Configuration -> Network Interfaces, click “Add a new interface”, and in there you can specify your interface name (often eth1) and it’s IP.


Hi Eric,

So i just have to fill the “Network Configuration->Network Interfaces” info, like the attached file?
And don’t do anything on “Network Configuration->Routing and Gateways”?


  • Rogerio

Hrm, I apparently don’t do this often enough, I don’t remember if setting up a second interface will automatically setup a route for it or not :slight_smile:

What I would suggest is to try it – you at the very least would need to add a new interface on the Network Interfaces screen like you showed… so once you add that, try pinging the internal IP of your server and see if it connects.

If not, you might need to add a route – but if you do add a route, don’t change the default route. All you’d be doing is setting up an additional route for internal traffic.


Enabling eth1 didn’t work. But it did work with eth0 only. I took a switch to the datacenter, and connected the datacenter lan cables on the switch, along with my servers, all configured with the external IP.
All the servers are now accessed externally, and they access each other using the external IP but through the switch.
All good!

Just for completeness: Setting up an interface will NOT create the appropriate route automatically. :slight_smile: If you use e.g. the network for your internal connections, you need to add an interface route (without gateway), destination, mask, via eth1. You can use Webmin’s “Routing and Gateways” module for that.

Using the external IP to have one server access the others via a switch works too, depending on how your hoster has set stuff up, but might complicate things a bit if you use firewall rules to allow only desired traffic through. You’ll have to create rules then to specifically allow traffic from certain source IPs, potentially opening up security holes based on source IP spoofing.

A routed setup, or the thing with separate switch and network interface like you intended, is more secure for intra-server-group communication.

Great Locutus, I’ll try it again when we need more servers, for now I’ll use eth0 only.

Thank you

  • Rogerio

Okidoki, you’re welcome!