DHCP configuration
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 DHCP 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:
- 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
- Disable DHCP on your network interface /etc/sysconfig/network-scripts/ifcfg-eth0
- Set bootproto=static
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0
- 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
- Log back in to the system and confirm your network settings:
ip route | grep default
(i.e. default via <address> dev ens32 proto static metric 100 )
- Confirm all Glasswall pods are operational
kubectl get pods -w