Siedemnaste_21

 0    21 Datenblatt    michalesq
Drucken spielen überprüfen
 
Frage - Antworten -
Delete the last line
Lernen beginnen
sed '$d' file. txt
Print only lines with three consecutive digits
Lernen beginnen
sed '/[0-9]\{3\}/p' file. txt
Unless boom is found replace aaa with bb
Lernen beginnen
sed '/boom/! s/aaa/bb/' file. txt
Delete all lines from line 17 to 'disk'
Lernen beginnen
sed '17,/disk/d' file. txt
How to install software for firewall and firewall-conf
Lernen beginnen
yum install firewall firewall-config
Display firewall zones
Lernen beginnen
firewall-cmd --get-zones
Display display default zone
Lernen beginnen
firewall-cmd --get-default-zone
List services in default zone (public)
Lernen beginnen
firewall-cmd --list-all
List services in home zone
Lernen beginnen
firewall-cmd --zone=home --list-all
Not persistently add source IP to zone home, all services will be allowed for this source (disappaear after a reload/restart)
Lernen beginnen
firewall-cmd --zone=home --add-source=192.168.1.0/24
How to reload firewalld
Lernen beginnen
firewall-cmd --reload
Persistently add source IP to zone home, all services will be allowed for this source (needs reload/restart to appear)
Lernen beginnen
firewall-cmd --zone=home -- permanent --add-source=192.168.1.0/24
Not persistently add port 80/tcp to zone public
Lernen beginnen
firewall-cmd --zone=public --add-port=80/tcp
Persistently add port 80/tcp to zone public
Lernen beginnen
firewall-cmd --zone=public --permanent --add-port=80/tcp
opens a GUI firewall config if you use graphical interface
Lernen beginnen
firewall-config
how to generate public and private key for authentication
Lernen beginnen
ssh-keygen -t rsa
display state of selinux
Lernen beginnen
getenforce
changing state to permissive
Lernen beginnen
setenforce 0
changing state to enforcing
Lernen beginnen
setenforce 1
disable selinux
Lernen beginnen
/etc/selinux/config SELINUX=disabled
Display full SElinux context (user, role and type)
Lernen beginnen
ls -Z

Sie müssen eingeloggt sein, um einen Kommentar zu schreiben.