En/2.2/Appendix B: Advanced network scenarios
Let's see how to deploy network scenarios somewhat more complex than just a virtual machine with Internet access.
Scenario 1: Virtualized Zentyal server with Internet connection and access from the host machine and internal client
This first scenario consists of a virtualized Zentyal server with three network interfaces. The first interface (typically eth0) will link the server to the Internet, using a Bridged Adaptor connection with DHCP resolution. The second one (eth1) is a Host-Only interface type connecting with the host (real) machine. This network will work on the vboxnet0 interface (Default). The third interface (eth2) will connect the server with a virtual client, using an Internal network type connection.
The first network will connect the server to the Internet and the address will be assigned by DHCP. The second network will use the vboxnet0 interface, using the 192.168.56.0/24 range. This network is considered internal and Zentyal will use it to connect with the Host. The third network will use the intnet internal interface in VirtualBox and it will be also considered internal for Zentyal, using the 192.168.200.0/24 range.
From Settings --> Network on the virtual machine on which you intend to install Zentyal, connect the interfaces to a Bridged Adapter. You need to choose also the (real) physical interface that will provide Internet connection to this virtual machine.
Set the second interface as a Host-Only Adapter attached to vboxnet0.
Set the third interface as Internal Network, named intnet. Name is important in VirtualBox, if two hosts have different names for their internal networks, they will not be connected internally by VirtualBox.
Now you can reboot your Zentyal server and configure its interfaces. You can use any operating system for the client machine, although we recommend Ubuntu Linux (try the lighter versions like Xubuntu or Lubuntu) for its ease of use and because it is free to download and install.
Scenario 2: Virtualized Zentyal server with access from the host and another client with Internet connection through two gateways
The following scenario has the last two interfaces configured in exactly the same way as the previous scenario, but now the first interface is connected to an external network through two gateways which manage Internet traffic.
In order to configure this, you need to use an internal network connection type. As it has to be a different network, you can name it as wan with an IP range 192.168.20.0/24. You need to shut down the machine before adding this new interface. To do this, go to Settings ‣ Network, in the tab for the first adaptor select Internal network and set the name to wan.
You should connect the two machines acting as gateways to the same internal network.
Scenario 3: Virtualized Zentyal server with Internet connection and access from the host and two clients
This scenario is similar to the first one, but you add another virtual network with the range 192.168.199.0/24.
This interface is internal and needs a different name, for example intnet2.
In order to build this scenario, you need to duplicate the first scenario and then interconnect them through an internal network connection, intnet3. Take into account the diagram; you need to create an internal networkintnet2 with IP range 192.168.199.0/24, as you can not use intnet1 to connect that client. Moreover, for the second connection of the host you will need to assign another IP address.
Set the fourth interface of each server so it belongs to that network.
Scenario 5: Virtualized Zentyal server with Internet access, access from the host machine, clients in Internal and External networks
This scenario is similar to the first one, but you will add a fourth network interface. In VirtualBox, you will configure it as an 'Internal Network', named 'wan'. In Zentyal, you will configure this new interface as 'External network' and then, you will configure it manually with IP and netmask 10.0.5.1/24.
You will add a new virtualized client as well, this client will have a single interface, that you have to configure manually with IP and netmask 10.0.5.2/24. This way, both Zentyal and the client should be in the same external network.
Note: Zentyal's firewall blocks ping requests (ICMP service) from external networks by default.