===== Linux General =====
{{tag>Linux}}
Exit Red Hat Graphical Boot (boot splash screen) in a vm:\\
CRTL + END
\\
Remove files after "k" number of days
find /PATH/TO/FILES/* -mtime +$k -exec rm -rf {} \;
\\
====RHEL / CentOS 7 System Control====
systemctl -a | grep -i servicename
systemctl status servicename
systemctl start servicename
\\
====IPTables====
The following will;
* List the rules
* Add a new rule at line 4
* List the rules
* Save the rules
* List the file saving the rules
sudo iptables -L -n --line-numbers
sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
sudo iptables -L -n --line-numbers
sudo service iptables save
sudo cat /etc/sysconfig/iptables
\\
====iSCSI====
Server 1 Target 1
[root@server1]# cat /etc/tgt/targets.conf
backing-store /dev/sdb
vendor_id COMPANY
scsi_id server1tgt1
scsi_sn 0101
Server 2 Target 1
[root@server2]# cat /etc/tgt/targets.conf
backing-store /dev/sdb
vendor_id COMPANY
scsi_id server2tgt1
scsi_sn 0201
==== Repositories ====
http://fedoraproject.org/wiki/EPEL
https://forensics.cert.org
http://rpms.famillecollet.com
==== OpenSSH ====
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@legacyhost
https://www.openssh.com/legacy.html