A new server needs a static IP, gateway and DNS on RHEL 9. How do you configure it persistently?
BeginnerScenarioNetworking, SSH and remote access
Answer
Situation read → NetworkManager via nmcli.
What I'd do →
nmcli con show
sudo nmcli con mod "System eth0" ipv4.method manual \
ipv4.addresses 10.0.1.25/24 ipv4.gateway 10.0.1.1 \
ipv4.dns "10.0.0.2 10.0.0.3" ipv4.dns-search example.internal
sudo nmcli con up "System eth0"
ip addr show eth0; ip route; resolvectl status 2>/dev/null || cat /etc/resolv.conf
Why → Edits through nmcli persist in the connection profile; editing /etc/resolv.conf directly gets overwritten.
Interview tip → On Ubuntu say Netplan (/etc/netplan/*.yaml + netplan try), which rolls back if you lose connectivity.
More on Networking, SSH and remote access
A key belonging to a departed engineer may be in `authorized_keys` on 300 servers. How do you rotate SSH keys across the fleet?IntermediateYou need to reach a database on a private subnet from your laptop through a bastion. How?BeginnerYour security team wants SSH hardened on all servers. What changes do you make?BeginnerYou're changing the network config of a remote server over SSH and could lose access. How do you protect yourself?IntermediateA web server should accept HTTP/HTTPS from anywhere but SSH only from the office. Configure the firewall.BeginnerYour app servers need to reach the internet for updates but must not be reachable from it. How do you set it up on a Linux gateway?Intermediate