VMmanager 5 KVM: Administrator guide
en En
es Es
Your feedback is an opportunity for improvement!
Take part in the survey and contribute to the development of the ISPsystem ecosystem.
Take the survey
Support

Configuring the network to allow virtual machines to access the Internet via the master node

This article describes how to configure the system to create virtual machines in a local network with access to the Internet.

Cluster configuration algorithm:

  1. To add the IP pool of the local network in Settings → IP pool or in IPmanager . Reserve the IP addresses from that subnet for the cluster nodes; 
  2. Configure the IP address from the local network on the cluster nodes:

    cat << EOF > /etc/sysconfig/network-scripts/ifcfg-vmbr0:0
    IPADDR=<IP-address>
    NETMASK=<network mask>
    EOF
    View details
  3. Restart the network on the cluster nodes:

    service network restart
  4. Check the connection between the cluster nodes:

    ping <cluster node IP address>
  5. To configure the NAT on the master node, edit the /etc/sysconfig/iptables file and add the following line into *nat:

    -A POSTROUTING -s <local network> ! -d <IP-address> -o vmbr0 -j MASQUERADE
    View details
  6. Restart iptables:

    service iptables restart

After you configure the system, you can create virtual machines with the IP addresses from the pool. The machines will have access to the Internet, but they won't be accessible from the outside.

The article was last updated on 04.29.2019. The article was prepared by technical writers of ISPsystem .