This short article will guide you on how to change the IP address in a Preseem appliance.
Preseem appliances ship with two management links, one is configured for DHCP and one is configured with a static IP address. For details of this configuration please see the appropriate appliance page:
If you wish to change that IP address, we recommend that you connect to Cockpit on port 9090 (example: http://192.168.2.1:9090). Cockpit is Fedora's web interface to NetworkManager. Log in with root credentials, and click on the Network tab. Once there, select the interface of interest and set the IP information on it. At least, you will need:
- IP address with subnet (e.g. 10.101.32.14/28)
- Gateway IP address
- DNS IP address
If you are more adept on the technical side, here is how to do it when connected via SSH or the serial console:
1. Run this command to determine the name of the connection related to the interface of interest, which we will edit. Let's say it is "System enp4s0".
bash# nmcli conn show
2. To edit the connection in nmcli, run: "nmcli conn edit System\ enp4s0" Note the "\" character to escape the space in the connection's name.
3. Once in there, run "print ipv4" to see all the IPv4-related fields.
4. Set the IP address, e.g. 10.101.32.14/28:
nmcli> set ipv4.addresses 10.101.32.14/28
This will prompt you whether you want to change the mode to manual. Just type Enter, or type yes and then Enter.
5. Set the gateway, e.g. 10.101.32.1:
nmcli> set ipv4.gateway 10.101.32.1
6. Set your DNS, e.g. 220.127.116.11:
nmcli> set ipv4.dns 18.104.22.168
7. Set the interface device and connection to auto connect again after a reboot:
nmcli> set connection.autoconnect yes
8. Save the configuration to make sure it is kept on reboot:
9. Activate the configuration to make sure that it works:
You may need to type Enter again to get back to a prompt.
10. You're done:
On Preseem 1000, enp1s0 is port 1, and enp2s0 is port 2.
On Preseem 5000, enp4s0 is port 1, and enp5s0 is port 2.
On Preseem 10000, enp8s0 is the main management port. Ports 1 and 2 are enp2s0f0 and enp2s0f1, respectively.
On Preseem 20000, enp1s0 is the main management port (port 6). Port 2 is enp105s0f0.