This short article guide you on how to change the IP address in a Preseem appliances.
Across all Preseem Models, the first two ports (Port 1 and Port 2) are assigned for management purposes. The first step after receiving your Preseem appliance is to connect one of the management ports and enable remote access.
Port 1 is setup to obtain an IP address from a DHCP server/router. You can either use the default 192.168.2.1 IP address assigned to Port 2 (gateway: 192.168.2.254).
Once this is in place, 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). It is Fedora's web interface to Network Manager. 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 at the technical side, here is how to do it when connected via SSH:
1. Run "nmcli conn show" to determine the name of the connection related to the interface of interest, which we will edit. Let's say it is "System enp4s0".
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. 22.214.171.124:
nmcli> set ipv4.dns 126.96.36.199
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.