02Network - amagerard/TemplateVM GitHub Wiki
1- Installation | 2- Network | 3- Firewall | 4- Selinux |
---|---|---|---|
5- Logs | 6- Certificates | 7- Mail | 8- PassphraseSSH |
9- Sudo | 10- GnomeShell | 11- CloneVM | 12- Volume |
13- Troubleshoot |
Modify or create the following files.
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
# delete the line '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6'
# comment on this line because we are in dhcp.
#<votre IP> srv1.local.domain srv1
vi /etc/hostname
srv1
vi /etc/sysconfig/network
# Created by anaconda
networking=yes
HOSTNAME=srv1.local.domain
grubby --args ipv6.disable=1 --update-kernel DEFAULT
grubby --update-kernel=ALL --args=net.ifnames=0
reboot
Example: device card ethernet is ens33.
nmcli con show
nmcli con delete "ens33"
nmcli dev connect eth0
nmcli con mod eth0 ipv6.method disabled
The result of configuration in DHCP mode is in:
more /etc/NetworkManager/system-connections/eth0.nmconnection
This file cannot be edited or deleted.
You have to go through nmcli commands.
ip a
Example:
IP: 192.168.40.50/24
Gateway: 192.168.40.254
Name Server: 192.168.90.41
Search domain: ol26modk.com
nmcli con mod eth0 ipv4.method "manual" ipv4.addresses 192.168.40.50/24
nmcli con mod eth0 ipv4.gateway 192.168.40.254
nmcli con mod eth0 ipv4.dns 192.168.90.41
nmcli con mod eth0 ipv4.dns-search ol26modk.com
Read the new network configuration.
more /etc/NetworkManager/system-connections/eth0.nmconnection
Apply the new network configuration.
ifconfig eth0 0.0.0.0
systemctl restart NetworkManager
ifconfig eth0
mncli con delete eth0
nmcli dev connect eth0
nmcli con mod eth0 ipv6.method disabled
Read the new network configuration.
more /etc/NetworkManager/system-connections/eth0.nmconnection
Apply the new network configuration.
ifconfig eth0 0.0.0.0
systemctl restart NetworkManager
ifconfig eth0