mirror of
https://github.com/IntenseWebs/servercode.git
synced 2025-02-25 18:55:26 -06:00
55 lines
2.4 KiB
Plaintext
55 lines
2.4 KiB
Plaintext
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/configuring_and_managing_networking/index
|
|
# Terminal 'nmtui' is recommended method for network adapter using static IP address. Further below method is manual edit of config files.
|
|
|
|
sudo dnf install NetworkManager NetworkManager-tui
|
|
ip link show
|
|
nmcli connection show
|
|
NetworkManager --print-config | grep migrate-ifcfg-rh
|
|
nmcli -f name,uuid,filename connection
|
|
cat /etc/NetworkManager/system-connections/enp1s0.nmconnection
|
|
|
|
sudo hostnamectl set-hostname new.name
|
|
sudo hostnamectl set-hostname ipa2.corp.intensewebs.com
|
|
sudo nmcli con modify 'enp1s0' ifname enp1s0 ipv4.method manual ipv4.addresses 192.168.1.124/24 ipv4.gateway 192.168.1.131 ipv4.dns 192.168.1.140 ipv4.dns-search corp.intensewebs.com
|
|
#DO NOT DOWN THE NETWORK CONNECTION IF YOU ARE LOGGED IN REMOTE BY SSH OR YOU WILL LOSE THE CONNECTION. It might be better to Reboot?
|
|
sudo nmcli con down 'enp1s0'
|
|
sudo nmcli con up 'enp1s0'
|
|
resolvectl status
|
|
systemd-resolve --status enp1s0
|
|
sudo systemctl restart networking
|
|
sudo systemctl restart NetworkManager
|
|
ip address show enp1s0
|
|
ip route show default
|
|
cat /etc/resolv.conf
|
|
|
|
sudo vi /etc/resolv.conf
|
|
domain intensewebs.com
|
|
search intensewebs.com
|
|
nameserver 192.168.1.140
|
|
nameserver 192.168.1.141
|
|
|
|
sudo vi /etc/hosts
|
|
# ADD/CHANGE
|
|
192.168.1.103 ctp1.intensewebs.com ctp1
|
|
|
|
sudo vi /etc/hostname
|
|
# ADD/CHANGE
|
|
ctp1.intensewebs.com
|
|
|
|
ip link list
|
|
ip link show
|
|
sudo nmcli device status
|
|
sudo nmcli con modify 'Wired connection 1' ifname enp0s3 ipv4.method manual ipv4.addresses 192.168.1.149/24 gw4 192.168.1.1
|
|
sudo nmcli connection modify Example-Connection ipv4.addresses 192.168.1.124/24
|
|
sudo nmcli connection modify Example-Connection ipv6.addresses 2001:db8:1::1/64
|
|
sudo nmcli connection modify Example-Connection ipv4.method manual
|
|
sudo nmcli connection modify Example-Connection ipv6.method manual
|
|
sudo nmcli connection modify Example-Connection ipv4.gateway 192.168.1.131
|
|
sudo nmcli connection modify Example-Connection ipv6.gateway 2001:db8:1::fffe
|
|
sudo nmcli connection modify Example-Connection ipv4.dns "192.168.1.140"
|
|
sudo nmcli connection modify Example-Connection ipv6.dns "2001:db8:1::ffbb"
|
|
sudo nmcli connection modify Example-Connection ipv4.dns-search example.com
|
|
sudo nmcli connection modify Example-Connection ipv6.dns-search example.com
|
|
sudo nmcli connection up Example-Connection
|
|
sudo nmcli device status
|