Connect 3 VMs to internet through another VM (CentOS)
Posted: 18. Oct 2016, 16:19
Hi!
I actually have a few issues, not just one, so I'll start with the beginning.
Using Windows 8.1 as host, CentOS 6.5 netinstall i386 as guests.
So, what I want to do is have a VM, let's call it VM1, with 4 Adapters - one that gives it Internet Access, and 3 other Internal Adapters, that other 3 VMs (VM2, VM3, VM4) will use for connecting to the Internet, through VM1.
So for VM1, the first adapter I set it Bridged Adapter. All was good, it had connection. This was while using another CentOS as host. When I tried to copy the VM structures to my Windows Laptop, Bridged Adapter does not work, in the sense that the VM doesn't connect to the network. It sees my Intel(R) Ethernet Connection I218-V and I can select it, but it just doesn't give my VM an IP. Whatever, I switched to NAT and it works, but I'm not sure if this impacts what I need to do.
The other three adapters have the name intnet1, intnet2, intnet3.
To simplify the problem, let's just assume I only want ONE VM (VM2) to connect through VM1 (because if I sort this out, the other 2 will be easier to do).
on VM2 I also set the adapter to be Internal Network, and the name is intnet1.
Now, in /etc/sysconfig/network-scripts, I didn't modify ifcfg-eth0 (as it's working), but maybe I should.
I've attached some screenshots with how ifcfg-eth1 looks in VM1 (), how ifcfg-eth1 looks in VM2 () (I named it that way and in /etc/udev/rules.d70-persistent-net.rules eth1 has the right MAC address).
SS with ifconfig from VM1: Oh, also checked all the MACs, they are fine, the same as seen in the VirtualBox Settings for each VM.
The thing is, the two VMs don't find each other when I try to ping them using the ip I added as static.
What am I doing wrong, any idea? I appreciate any kind of feedback or suggestion. Or maybe there is a tutorial out there, somewhere, I just couldn't find it.
I need to use this configuration (with internal adapters between them).
I actually have a few issues, not just one, so I'll start with the beginning.
Using Windows 8.1 as host, CentOS 6.5 netinstall i386 as guests.
So, what I want to do is have a VM, let's call it VM1, with 4 Adapters - one that gives it Internet Access, and 3 other Internal Adapters, that other 3 VMs (VM2, VM3, VM4) will use for connecting to the Internet, through VM1.
So for VM1, the first adapter I set it Bridged Adapter. All was good, it had connection. This was while using another CentOS as host. When I tried to copy the VM structures to my Windows Laptop, Bridged Adapter does not work, in the sense that the VM doesn't connect to the network. It sees my Intel(R) Ethernet Connection I218-V and I can select it, but it just doesn't give my VM an IP. Whatever, I switched to NAT and it works, but I'm not sure if this impacts what I need to do.
The other three adapters have the name intnet1, intnet2, intnet3.
To simplify the problem, let's just assume I only want ONE VM (VM2) to connect through VM1 (because if I sort this out, the other 2 will be easier to do).
on VM2 I also set the adapter to be Internal Network, and the name is intnet1.
Now, in /etc/sysconfig/network-scripts, I didn't modify ifcfg-eth0 (as it's working), but maybe I should.
I've attached some screenshots with how ifcfg-eth1 looks in VM1 (), how ifcfg-eth1 looks in VM2 () (I named it that way and in /etc/udev/rules.d70-persistent-net.rules eth1 has the right MAC address).
SS with ifconfig from VM1: Oh, also checked all the MACs, they are fine, the same as seen in the VirtualBox Settings for each VM.
The thing is, the two VMs don't find each other when I try to ping them using the ip I added as static.
What am I doing wrong, any idea? I appreciate any kind of feedback or suggestion. Or maybe there is a tutorial out there, somewhere, I just couldn't find it.
I need to use this configuration (with internal adapters between them).