Can you set a static IP from the terminal on the device? Would be create to be able to do that. I have a complex network with servers on different networks, when the Internet goes down or my firewall is down I loose visability
Hello!
Yes, you can definitely set a static IP address from the terminal on both Linux and Windows. This is a common and highly effective way to ensure consistent network visibility for servers and other critical devices, even if your DHCP server or main firewall goes down. On Linux, methods vary by distribution (e.g., editing Netplan YAML files, using nmcli, or configuring systemd-networkd files), while on Windows, you'd use netsh commands Official Site in Command Prompt or PowerShell, always running with administrative privileges and ensuring persistence for reboot survival.
#manual IP
connmanctl config `connmanctl services |grep ethernet|awk -F' ' '{print $3}'|head -1` --ipv4 manual 192.168.113.211 255.255.255.0 192.168.113.1
#manual DNS
connmanctl config `connmanctl services |grep ethernet|awk -F' ' '{print $3}'|head -1` nameservers 192.168.113.244
#setup DHCP
connmanctl config `connmanctl services |grep ethernet|awk -F' ' '{print $3}'|head -1` --ipv4 dhcp
#setup DNS use DNS from DHCP
connmanctl config `connmanctl services |grep ethernet|awk -F' ' '{print $3}'|head -1` nameservers 192.168.113.244
#show current eth0 status
connmanctl services `connmanctl services |grep ethernet|awk -F' ' '{print $3}'|head -1`
