Hello,
If you are using the Wazuh OVA, which is based on CentOS, please follow the next steps:
1. Install net-tools
if it isn’t installed yet:
yum install net-tools
2. Check your interfaces with ifconfig
. In our case, we are going to modify the eth0 interface
3. Remove the IP:
ip addr del 192.168.7.43 dev eth0
4. Add the new IP:
ip addr add 192.168.7.40 dev eth0
Take in mind that if you power off or restart your virtual machine, the IP could change since it is using a bridge adapter that sets an IP from your network.
If you are using a different virtual machine with Wazuh installed in it, the steps would be the same, but you could make the IPs static following the next steps:
- If you are using CentOS:
1. Backup the original configuration file with the command:
sudo mv /etc/sysconfig/network-scripts/ifcfg-NAME /etc/sysconfig/network-scripts/ifcfg-NAME.bak
Where NAME is the name of your network interface.
2. Create a new configuration file with the following command:
sudo nano /etc/sysconfig/network-scripts/ifcfg-NAME
Where NAME is the name of your network interface.
3. In that file, you can paste the content of the backup file and change the desired fields or paste the following:
TYPE="Ethernet"
BOOTPROTO="none"
NAME="NAME"
IPADDR="IP_ADDRESS"
NETMASK="255.255.255.0"
GATEWAY=GATEWAY
DEVICE="NAME"
ONBOOT="yes"
PEERDNS=no
Where:
4. Save and close the file.
5. Restart the network manager with the command:
sudo systemctl restart NetworkManager
- If you are using Ubuntu, I recommend you use netplan
:
1. Backup the original configuration file with the command:
sudo mv /etc/netplan/CONF_FILE.yaml /etc/netplan/CONF_FILE.yaml.bak
Where CONF_FILE is the file that has the network configuration.
2. Create a new configuration file with the following command:
sudo nano /etc/netplan/CONF_FILE.yaml
Where CONF_FILE is the file that has the network configuration.
3. In that file, you can paste the content of the backup file and change the desired fields or paste the following:
---
network:
version: 2
renderer: networkd
ethernets:
NAME:
addresses:
- IP_ADDRESS/MASK
Where:
4. Apply the changes:
sudo netplan apply