rpm -qa | grep -i 'php\|http\|apache\|nginx'sudo netstat -nlptx | grep -i 'php\|http\|apache\|nginx\|80\|443'systemctl reload httpd
systemctl reload dhcpd
systemctl reload haproxyread -p "Enter root password or leave empty for random: " ROOT_PW
if [ -z "${ROOT_PW}" ] ; then
# генерируем пароль для root
ROOT_PW=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 15 | xargs`
fi
# шифруем пароль так
ROOT_PW_SALT=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16 | xargs`
ROOT_PWCRYPTED=`echo -e "${ROOT_PW}\n${ROOT_PW_SALT}" | python -c 'import crypt; print crypt.crypt(raw_input(), "\$6\$" + raw_input() + "\$")'`
....
KSFILE=`cat <<EOFINLINEFILE
text
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto dhcp --hostname ${HOST_NAME}
rootpw --iscrypted ${ROOT_PWCRYPTED}
authconfig --enableshadow --passalgo=sha512
firewall --service=ssh
selinux --permissive
timezone --utc Etc/UTC
....echo -e "${ROOT_PW}" | python -c 'import crypt; print(crypt.crypt(raw_input(), crypt.mksalt(crypt.METHOD_SHA512)))' cd ftp://user:password@serveraddress/folder/# netstat -nlp -A inet# iptables -nvL$ vncviewer 172.16.82.242:0Device is: Not in smartctl database [for details use: -P showall]# yum update smartmontools# update-smart-drivedb -v
Download from branches/RELEASE_5_43_DRIVEDB
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 136k 0 136k 0 0 23559 0 --:--:-- 0:00:05 --:--:-- 169k
/usr/share/smartmontools/drivedb.h updated from branches/RELEASE_5_43_DRIVEDB"The workload took 244041 minutes (169.473 days) to complete with 51% reads and 49% writes. A total of 12507.7GB of data was written to the device, which increased the media wear in the drive by 2.72949%. At this point in time, this workload is causing a wear rate of 2.72949% for every 244041 minutes, or 0.000671074%/hour"
setenforce 0getenforcelog-append /var/log/openvpn.log
verb 5cat /var/log/openvpn.logsemanage fcontext -l | grep openvpnsemanage port -l | grep openvpn_port_tsemanage fcontext -t openvpn_etc_t -a '/etc/openvpn(/.*)?'
semanage fcontext -t openvpn_etc_rw_t -a '/etc/openvpn/ipp.txt'
semanage fcontext -t openvpn_var_log_t -a '/var/log/openvpn.*'
restorecon -v /etc/openvpn/
restorecon -v /var/log/semanage port -a -t openvpn_port_t -p tcp ПОРТ
semanage port -a -t openvpn_port_t -p udp ПОРТ192.168.248.0/24
192.168.243.0/24
192.168.251.0/24ping -I eth1 192.168.250.102tcpdump -i tun0 host 192.168.250.102tcpdump -i tun0 host 192.168.250.102-A FORWARD -d 192.168.250.0/24 -i eth1 -o tun0 -j ACCEPT
-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth1 -o eth0 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -i tun0 -j ACCEPT
-A FORWARD -o tun0 -j ACCEPT# iptables -nvL-A FORWARD -j REJECT --reject-with icmp-host-prohibited-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth0 -j ACCEPT
-A FORWARD -o eth0 -j ACCEPT
-A FORWARD -i eth1 -j ACCEPT
-A FORWARD -o eth1 -j ACCEPT
-A FORWARD -i tun0 -j ACCEPT
-A FORWARD -o tun0 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited