static IP for OVA

489 views
Skip to first unread message

Jamy

unread,
May 18, 2022, 5:46:28 PM5/18/22
to Wazuh mailing list
Is there a way to set a static IP for the Wazuh OVA server? I edited the ifcfg-eth0 file, but the VM still boots up with a DHCP address. 

Thanks, 

Raul Del Pozo Moreno

unread,
May 18, 2022, 6:11:44 PM5/18/22
to Jamy, Wazuh mailing list
Hello Jamy

By default dhcp is used so you will have to disable it by following these steps:

1. Install nano or your favorite text editor

2. Make a backup of the network file, where NAME is the name of your network interface.

# sudo mv /etc/sysconfig/network-scripts/ifcfg-NAME /etc/sysconfig/network-scripts/ifcfg-NAME.bak

3. Create a new configuration file with the following command, where NAME is the name of your network interface.

# sudo nano /etc/sysconfig/network-scripts/ifcfg-NAME

4. Paste the content of the backup file and change the desired fields or paste the following, where NAME is the name of your network interface:

TYPE=Ethernet
IPADDR=YOUR_IP
NETMASK=YOUR_NETMASK
GATEWAY=YOUR_GATEWAY
NAME=NAME
DEVICE=NAME
ONBOOT=yes
BOOTPROTO=none
PEERSDNS=no

An example in my network would be:

TYPE=Ethernet
IPADDR=192.168.1.140
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
NAME=eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
PEERSDNS=no

5. Restart network service

# systemctl restart network

6. Check new IP

# ip route
# ip a

7. Restart the VM and check your IP

# ip a

Regards, Raúl

El mié, 18 may 2022 a las 23:46, Jamy (<jamy....@gmail.com>) escribió:
Is there a way to set a static IP for the Wazuh OVA server? I edited the ifcfg-eth0 file, but the VM still boots up with a DHCP address. 

Thanks, 

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/433b6aac-89ad-4673-8b0b-66913b294386n%40googlegroups.com.


--
WazuhRaúl Del Pozo Moreno
IT Security Engineer - CICD
Reply all
Reply to author
Forward
0 new messages