One, firewalld
区域名称:trusted;home;internal;work;public;external;dmz;block;drop
1.firewall-cmd: CLI version of firewall management tool.
firewall-cmd --get-default-zone
firewall-cmd --get-zone-of-interface=eno160
firewall-cmd --permanent --zone=external --change-interface=eno160
firewall-cmd --set-default-zone=public
firewall-cmd --panic-on firewall-cmd --panic-off
firewall-cmd --zone=public --query-service=ssh
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
firewal-cmd --permanent --zone=public --remove-service=http
firewall-cmd --reload
firewall-cmd --zone=public --add-port=8080-8081/tcp
firewall-cmd --permanent --zone=public --add-forward-port=port=999:proto=tcp:toport=22:toaddr=192.168.1.10 The traffic to access port 999 is forwarded to port 22
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" service name="ssh" reject" 192.168.1.0/24 All users in the network segment access the ssh service
2.firewall-config: GUI version of firewall configuration management tool.
Remember to select permanent during configuration, and reload firewalld after configuration
Second, configure the network card
Method 1.vim /etc/sysconfig/network-scripts/ifcfg-eno160 Modify and save the configuration file of the network card
Method 2. nmtui command.
Method 3.nm-connetion-editor
Remember after the above 3 methods are configured: nmcli connection up ens160 nmcli connection reload ens160
Method 4. Same as windows configuration network card, remember to disable and enable the network card after configuration.
Three, configure Yum software warehouse
Step 1: Mount the CD image: mkdir -p /media/cdrom
vim /etc/fstab
/dev/cdrom /media/cdrom iso9660 defauls 0 0 save and exit
mount -a
Step 2: Configuration file: cd /etc/yum.repos.d/
vim xialong.repo
[AppStream]
name=AppStream
baseurl = file: /// media / cdrom / AppStream
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl = file: /// media / cdrom / BaseOS
gpgcheck=0
enabled=1 save and exit
yum install firewall-config
yum remove firewall-config