DHCP Configuration

Prev Next

By default, the DHCP client is set to active within the Single Node Virtual Appliance, and it will allocate an IP address when deployed to a network with an active DHCP Server.

However, we understand there are certain scenarios where disabling DCHP and configuring your system with a static IP address is required.

Configure DHCP

To configure DHCP within the Glasswall Single Node Virtual Appliance, follow the steps outlined below:

  1. Create an additional configuration file in the following area path: /etc/cloud/cloud.cfg.d/ and append the following to it: network: {config: disabled}
  • Create new file to disable cloud-init from overwriting configuration:
sudo touch /etc/cloud/cloud.cfg.d/99_disable_net_config.cfg
  • Append settings to your new cloud-init config file:
sudo echo "network: {config: disabled}" >> /etc/cloud/cloud.cfg.d/99_disable_net_config.cfg
  • Or to manually edit the config file:
sudo vi /etc/cloud/cloud.cfg.d/99_disable_net_config.cfg

  1. Disable DHCP on your network interface /etc/sysconfig/network-scripts/ifcfg-eth0
  • Set BOOTPROTO=static
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

  1. Modify the network configuration and DHCP configurations using Network Manager Text User Interface (nmtui)
  • Open nmtui by typing the following command in your terminal:
sudo nmtui 
  • Use the arrow keys to navigate to Edit a connection and press Enter.
  • Select the network connection you want to modify, and press Enter.
  • Navigate to IPv4 CONFIGURATION or IPv6 CONFIGURATION depending on which is required for your configuration.
  • Press Enter and a menu will appear. Use the arrow keys to navigate to Manual and press Enter. This will disable DHCP and allow you to manually enter IP settings.
  • Fill in the Addresses, Gateway, and DNS server fields as needed.
  • Navigate to OK and press Enter to save your changes.
  • Navigate to Back and then Quit to exit nmtui.
  • Clean cloud-init:
sudo cloud-init clean
  • Reboot the system with:
sudo reboot now
  1. Log back in to the system and confirm your network settings:
ip route | grep default

(i.e. default via <ip address> dev ens32 proto static metric 100 )

  1. Confirm all Glasswall pods are operational
kubectl get pods -w