{"id":961,"date":"2012-08-03T11:29:52","date_gmt":"2012-08-03T03:29:52","guid":{"rendered":"http:\/\/rmohan.com\/?p=961"},"modified":"2012-08-03T11:29:52","modified_gmt":"2012-08-03T03:29:52","slug":"linux-hardening-script","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=961","title":{"rendered":"Linux Hardening Script"},"content":{"rendered":"<p>#Please check a script regarding Linux Hardening, it may help you to configure your system<\/p>\n<p>#######################################################<br \/>\n#!\/bin\/bash<\/p>\n<p>#####LInux Hardening Script#####<\/p>\n<p>#######################################################<\/p>\n<p># #<\/p>\n<p># Files involved in this script are as follow: #<\/p>\n<p># \/etc\/ssh\/ssh_config #<\/p>\n<p># \/etc\/init.d\/functions #<\/p>\n<p># \/boot\/grub\/grub.conf #<\/p>\n<p># \/etc\/vsftpd\/ftpusers #<\/p>\n<p># \/etc\/securetty #<\/p>\n<p># \/etc\/issue #<\/p>\n<p># \/etc\/motd #<\/p>\n<p># \/etc\/passwd #<\/p>\n<p># \/etc\/ssh\/sshd_config #<\/p>\n<p>#######################################################<\/p>\n<p>HOSTNAME=`hostname`<\/p>\n<p>HARD_LOG=&#8221;\/var\/log\/`hostname`_hard_log&#8221;<\/p>\n<p>echo &#8220;HOSTNAME:&#8221;$HOSTNAME &gt;&gt;${HARD_LOG}<\/p>\n<p>date &#8216;+DATE: %m\/%d\/%y%nTIME:%H:%M:%S&#8217; &gt;&gt;${HARD_LOG}<\/p>\n<p>echo -n &#8220;Please Enter Your Name: &#8221;<\/p>\n<p>read NAME<\/p>\n<p>echo &#8220;Unix Administrator:&#8221; $NAME &gt;&gt;${HARD_LOG}<\/p>\n<p>echo &#8220;Please Enter Project Name: &#8221;<\/p>\n<p>read PROJECT<\/p>\n<p>echo &#8220;Project Name:&#8221; $PROJECT &gt;&gt;${HARD_LOG}<\/p>\n<p>echo &#8220;Please Enter the name of Owner\/SPOC for the server: &#8221;<\/p>\n<p>read OWNER<\/p>\n<p>echo &#8220;Owner\/SPOC:&#8221; $OWNER &gt;&gt;${HARD_LOG}<\/p>\n<p>echo &#8220;Please wait&#8230;..Hardening is in progess&#8221;<\/p>\n<p>echo &#8221; Creating Directory Called \/etc\/BackupSystemFiles for Backup of critical files and files copying are in progress&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>mkdir \/etc\/BackupSystemFiles<\/p>\n<p>cd \/<\/p>\n<p>tar -cvf \/etc\/BackupSystemFiles\/etc.tar etc &amp;&gt;\/dev\/null<\/p>\n<p>sleep 10<\/p>\n<p>echo &#8220;Files have been copied to \/etc\/BackupSystemFiles &#8221; &gt;&gt;${HARD_LOG}<\/p>\n<p>echo &#8220;\/etc\/passwd,\/etc\/securetty,\/etc\/vsftpd\/ftpusers,\/boot\/grub\/grub.conf,\/etc\/init.d\/functions,\/etc\/ssh\/ssh_config &amp; \/etc\/ssh\/sshd_config files will be modified during the script execution&#8221; &gt;&gt;${HARD_LOG}<\/p>\n<p>######Banner#####<\/p>\n<p>echo &#8220;Updating the banner in \/etc\/issue.net file&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;********************************************************************************&#8221; &gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* ATTENTION! PLEASE READ CAREFULLY. *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* This system is the property of xyz. It is for authorized use only. *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* Users (authorized and unauthorized) have no explicit or implicit expectation *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* of privacy. Any or all uses of this system and all files on the this system *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* will be intercepted, monitored, recorded, copied, audited, inspected, and *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* disclosed to xyz management, and law enforcement personnel as *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* well as other authorized agencies. By using this system, the user consents *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* to such interception,monitoring, recording, copying, auditing, inspection, *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* and disclosure at the discretion of xyz. Unauthorized or improper *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* use of this system may result in administrative disciplinary action and civil*&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* and criminal penalties. By continuing to use this system you indicate the *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* awareness of and consent to these terms and conditions of use. LOG OFF *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* IMMEDIATELY if you do not agree to the terms and conditions stated in this *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* warning. *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;* *&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt;\/etc\/issue.net<\/p>\n<p>#######motd#######<\/p>\n<p>echo &#8220;Updating the banner in \/etc\/motd file&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;********************************************************************************&#8221; &gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* ATTENTION! PLEASE READ CAREFULLY. *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* This system is the property of xyz. It is for authorized use only. *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* Users (authorized and unauthorized) have no explicit or implicit expectation *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* of privacy. Any or all uses of this system and all files on the this system *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* will be intercepted, monitored, recorded, copied, audited, inspected, and *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* disclosed to xyz, and law enforcement personnel as *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* well as other authorized agencies. By using this system, the user consents *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* to such interception,monitoring, recording, copying, auditing, inspection, *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* and disclosure at the discretion of xyz. Unauthorized or improper *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* use of this system may result in administrative disciplinary action and civil*&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* and criminal penalties. By continuing to use this system you indicate the *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* awareness of and consent to these terms and conditions of use. LOG OFF *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* IMMEDIATELY if you do not agree to the terms and conditions stated in this *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* warning. *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;* *&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt;\/etc\/motd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;Above Banner is updated in the System &#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>######Set Password Expiry Time for users#########<\/p>\n<p>echo &#8220;Setting Password Expiry Time for users &#8230;&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>cd \/etc\/<\/p>\n<p>cp login.defs \/etc\/BackupSystemFiles\/login.defs.prehard<\/p>\n<p>sed -e &#8216;s\/99999\/30\/g&#8217; login.defs &gt; login.defs1<\/p>\n<p>cp login.defs login.defs.before<\/p>\n<p>mv login.defs1 login.defs<\/p>\n<p>sed -e &#8216;s\/PASS_MIN_LEN 5\/PASS_MIN_LEN 8\/g&#8217; login.defs &gt; login.defs1<\/p>\n<p>cp login.defs login.defs.before<\/p>\n<p>mv login.defs1 login.defs<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>#####ssh configuration######<\/p>\n<p>echo &#8220;Configuring SSH service&#8221; &gt;&gt;${HARD_LOG}<\/p>\n<p>cd \/etc\/ssh<\/p>\n<p>cp -p ssh_config \/etc\/BackupSystemFiles\/ssh_config.prehard<\/p>\n<p>cp -p sshd_config \/etc\/BackupSystemFiles\/sshd_config.prehard<\/p>\n<p>sed -e &#8216;s\/#PermitRootLogin yes\/PermitRootLogin no\/g&#8217; sshd_config &gt;&gt;sshd_config1<\/p>\n<p>cp -p sshd_config sshd_config.before<\/p>\n<p>mv sshd_config1 sshd_config<\/p>\n<p>sed -e &#8216;s\/#HostbasedAuthentication no\/HostbasedAuthentication no\/g&#8217; sshd_config &gt;&gt;sshd_config1<\/p>\n<p>cp -p sshd_config sshd_config.before<\/p>\n<p>mv sshd_config1 sshd_config<\/p>\n<p>sed -e &#8216;s\/#RhostsRSAAuthentication no\/RhostsRSAAuthentication no\/g&#8217; sshd_config &gt;&gt;sshd_config1<\/p>\n<p>cp -p sshd_config sshd_config.before<\/p>\n<p>mv sshd_config1 sshd_config<\/p>\n<p>sed -e &#8216;s\/#IgnoreRhosts yes\/IgnoreRhosts yes\/g&#8217; sshd_config &gt;&gt;sshd_config1<\/p>\n<p>cp -p sshd_config sshd_config.before<\/p>\n<p>mv sshd_config1 sshd_config<\/p>\n<p>sed -e &#8216;s\/#PermitEmptyPasswords no\/PermitEmptyPasswords no\/g&#8217; sshd_config &gt;&gt;sshd_config1<\/p>\n<p>cp -p sshd_config sshd_config.before<\/p>\n<p>mv sshd_config1 sshd_config<\/p>\n<p>echo &#8220;Banner \/etc\/issue.net&#8221; &gt;&gt;sshd_config<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>######Set Daemon Umask######<\/p>\n<p>cd \/etc\/init.d<\/p>\n<p>cp -p functions \/etc\/BackupSystemFiles\/functions.prehard<\/p>\n<p># edit the line with umask<\/p>\n<p>sed -e &#8216;s\/umask 022\/umask 027\/g&#8217; functions &gt;&gt;functions1<\/p>\n<p>cp -p functions functions.before<\/p>\n<p>mv functions1 functions<\/p>\n<p>######Stop Uneccessary Services#######<\/p>\n<p>echo &#8220;Stoping Unneccessary Services&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>for FILE in apmd canna dhcdbd FreeWnn gpm hpoj innd irda isdn kdcrotate lvs mars-nwe oki4daemon privoxy rstatd rusersd rwalld rwhod spamassassin wine<\/p>\n<p>do<\/p>\n<p>service $FILE stop &amp;&gt;\/dev\/null<\/p>\n<p>chkconfig &#8211;list $FILE &amp;&gt;\/dev\/null 1&gt;&gt;\/etc\/BackupSystemFiles\/boot.service.prehard<\/p>\n<p>chkconfig $FILE off &amp;&gt;\/dev\/null<\/p>\n<p>done<\/p>\n<p>for FILE in nfs nfslock autofs ypbind ypserv yppasswdd \\<\/p>\n<p>portmap smb netfs lpd apache httpd tux snmpd \\<\/p>\n<p>named postgresql vsftpd mysqld webmin kudzu squid cups \\<\/p>\n<p>ip6tables iptables pcmcia bluetooth mDNSResponder<\/p>\n<p>do<\/p>\n<p>service $FILE stop &amp;&gt;\/dev\/null<\/p>\n<p>chkconfig &#8211;list $FILE &amp;&gt;\/dev\/null 1&gt;&gt;\/etc\/BackupSystemFiles\/boot.service.prehard<\/p>\n<p>chkconfig $FILE off &amp;&gt;\/dev\/null<\/p>\n<p>done<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>######Disable network services######<\/p>\n<p>echo &#8220;Disabling unnecessary Network Services now.&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>mkdir \/etc\/BackupSystemFiles\/xinetd.d &gt;&gt; ${HARD_LOG}<\/p>\n<p>cp -rf \/etc\/xinetd.d\/* \/etc\/BackupSystemFiles\/xinetd.d\/ &gt;&gt; ${HARD_LOG}<\/p>\n<p>cd \/etc\/xinetd.d &gt;&gt; ${HARD_LOG}<\/p>\n<p>for FILE in chargen chargen-udp cups-lpd cups daytime \\<\/p>\n<p>daytime-udp echo echo-udp eklogin finger imap \\<\/p>\n<p>imaps ipop2 ipop3 klogin kshell ktalk ntalk \\<\/p>\n<p>pop3s rexec rsync servers services sgi_fam \\<\/p>\n<p>talk tftp time time-udp<\/p>\n<p>do<\/p>\n<p>chkconfig &#8211;list ${FILE} &amp;&gt;\/dev\/null 1&gt;&gt; \/etc\/BackupSystemFiles\/standard.service.prehard<\/p>\n<p>chkconfig ${FILE} off &amp;&gt;\/dev\/null<\/p>\n<p>done<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>#######Lock the Unneccessary Accounts########<\/p>\n<p>echo &#8220;Locking the Uneccessary Accounts&#8221;&gt;&gt;${HARD_LOG}<\/p>\n<p>cp -p \/etc\/passwd \/etc\/BackupSystemFiles\/passwd.prehard<\/p>\n<p>for USERID in rpc rpcuser lp apache http httpd named dns \\<\/p>\n<p>mysql postgres squid news netdump<\/p>\n<p>do<\/p>\n<p>usermod -L -s \/sbin\/nologin $USERID &amp;&gt;\/dev\/null<\/p>\n<p>done<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>#######Confirm Permissions On System Log files######<\/p>\n<p>cd \/var\/log<\/p>\n<p>ls -l &gt; \/etc\/BackupSystemFiles\/system.logfiles<\/p>\n<p>chmod o-rwx boot.log* cron* dmesg ksyms* httpd\/* maillog* messages* news\/* pgsql rpmpkgs* samba\/* sa\/* scrollkeeper.log secure* spooler* squid\/* vbox\/* wtmp &amp;&gt;\/dev\/null<\/p>\n<p>chmod o-rx boot.log* cron* maillog* messages* pgsql secure* spooler* squid\/* sa\/* &amp;&gt;\/dev\/null<\/p>\n<p>chmod g-w boot.log* cron* dmesg httpd\/* ksyms* maillog* messages* pgsql rpmpkgs* samba\/* sa\/* scrollkeeper.log secure* spooler* &amp;&gt;\/dev\/null<\/p>\n<p>chmod g-rx boot.log* cron* maillog* messages* pgsql secure* spooler* &amp;&gt;\/dev\/null<\/p>\n<p>chmod o-w gdm\/ httpd\/ news\/ samba\/ squid\/ sa\/ vbox\/ &amp;&gt;\/dev\/null<\/p>\n<p>chmod o-rx httpd\/ samba\/ squid\/ sa\/ &amp;&gt;\/dev\/null<\/p>\n<p>chmod g-w gdm\/ httpd\/ news\/ samba\/ squid\/ sa\/ vbox\/ &amp;&gt;\/dev\/null<\/p>\n<p>chmod g-rx httpd\/ samba\/ sa\/ &amp;&gt;\/dev\/null<\/p>\n<p>chmod u-x kernel syslog loginlog &amp;&gt;\/dev\/null<\/p>\n<p>chown -R root:root . &amp;&gt;\/dev\/null<\/p>\n<p>chgrp utmp wtmp &amp;&gt;\/dev\/null<\/p>\n<p>[ -e news ] &amp;&amp; chown -R news:news news &amp;&gt;\/dev\/null<\/p>\n<p>[ -e pgsql ] &amp;&amp; chown postgres:postgres pgsql &amp;&gt;\/dev\/null<\/p>\n<p>chown -R squid:squid squid &amp;&gt;\/dev\/null<\/p>\n<p>######Verify passwd, shadow and group file permissions#######<\/p>\n<p>cd \/etc<\/p>\n<p>ls -l &gt; \/etc\/BackupSystemFiles\/etc.files<\/p>\n<p>chown root:root passwd shadow group<\/p>\n<p>chmod 644 passwd group<\/p>\n<p>chmod 400 shadow<\/p>\n<p>cp -p \/etc\/vsftpd\/ftpusers \/etc\/BackupSystemFiles\/ftpusers.prehard<\/p>\n<p>for NAME in `cut -d: -f1 \/etc\/passwd`; do<\/p>\n<p>if [ `id -u $NAME` -lt 500 ]; then<\/p>\n<p>echo $NAME &gt;&gt; \/etc\/ftpusers<\/p>\n<p>fi<\/p>\n<p>done<\/p>\n<p>chown root:root \/etc\/vsftpd\/ftpusers<\/p>\n<p>chmod 600 \/etc\/vsftpd\/ftpusers<\/p>\n<p>#########Banner For FTP###################<\/p>\n<p>cd \/etc\/vsftpd<\/p>\n<p>cp -p vsftpd.conf \/etc\/BackupSystemFiles\/vsftpd.conf.prehard<\/p>\n<p>echo &#8220;ftpd_banner=Authorized users only. All activity \\<\/p>\n<p>may be monitored and reported.&#8221; &gt;&gt; vsftpd.conf<\/p>\n<p>######Protect Grub With Password#######<\/p>\n<p>cp -p \/boot\/grub\/grub.conf \/etc\/BackupSystemFiles\/grub.conf.prehard<\/p>\n<p>sed -i &#8216;1ipassword password&#8217; \/boot\/grub\/grub.conf<\/p>\n<p>chown root:root \/etc\/grub.conf<\/p>\n<p>chmod 600 \/etc\/grub.conf<\/p>\n<p>#######Restrict Root Logins To System Console By adding the entry called console in the file \/etc\/securetty#######<\/p>\n<p>echo &#8220;Restricting root Logins to the System Console By adding the entry called console in the file \/etc\/securetty&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>cp -p \/etc\/securetty \/etc\/BackupSystemFiles\/securetty.prehard<\/p>\n<p>for i in `seq 1 6`; do<\/p>\n<p>echo tty$i &gt;&gt; \/etc\/securetty<\/p>\n<p>done<\/p>\n<p>for i in `seq 1 11`; do<\/p>\n<p>echo vc\/$i &gt;&gt; \/etc\/securetty<\/p>\n<p>done<\/p>\n<p>echo console &gt;&gt; \/etc\/securetty<\/p>\n<p>chown root:root \/etc\/securetty<\/p>\n<p>chmod 400 \/etc\/securetty<\/p>\n<p>#######Block System Accounts#######<\/p>\n<p>cp -p \/etc\/passwd \/etc\/BackupSystemFiles\/passwd.prehard<\/p>\n<p>for NAME in `cut -d: -f1 \/etc\/passwd`;<\/p>\n<p>do<\/p>\n<p>MyUID=`id -u $NAME`<\/p>\n<p>if [ $MyUID -lt 500 -a $NAME != &#8216;root&#8217; ]; then<\/p>\n<p>usermod -L -s \/sbin\/nologin $NAME<\/p>\n<p>fi<\/p>\n<p>done<\/p>\n<p>######Verify that no UID 0 Account exists Other than root######<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>awk -F: &#8216;($3 == 0) { print &#8220;UID 0 Accounts are Below. Please do block if its not neccessary\\n&#8221; $1 }&#8217; \/etc\/passwd&gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;********************************************************************************&#8221;&gt;&gt; ${HARD_LOG}<\/p>\n<p>######Setting Password expiry (must expire after 42 days and warn 7 days) for root account#######<\/p>\n<p>echo &#8220;Setting Password expiry (must expire after 30 days and warn 7 days) for root account&#8221; &gt;&gt; ${HARD_LOG}<\/p>\n<p>passwd -x 30 -w 7 root &gt;&gt; ${HARD_LOG}<\/p>\n<p>echo &#8220;All the activities are done by this script has been logged into $HARD_LOG&#8221;<\/p>\n<p>echo &#8220;Request you to save the log file in the SharePoint portal URL http:\/\/sinbngpp001\/TIM\/UNIXServerReports\/Forms\/AllItems.aspx for the Audit&#8221;<\/p>\n<p>echo &#8220;#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;#&#8221;<\/p>\n<p>echo<\/p>\n<p>echo &#8221; END OF THE SCRIPT &#8221;<\/p>\n<p>echo<\/p>\n<p>echo &#8220;#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;#&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#Please check a script regarding Linux Hardening, it may help you to configure your system<\/p>\n<p>####################################################### #!\/bin\/bash<\/p>\n<p>#####LInux Hardening Script#####<\/p>\n<p>#######################################################<\/p>\n<p># #<\/p>\n<p># Files involved in this script are as follow: #<\/p>\n<p># \/etc\/ssh\/ssh_config #<\/p>\n<p># \/etc\/init.d\/functions #<\/p>\n<p># \/boot\/grub\/grub.conf #<\/p>\n<p># \/etc\/vsftpd\/ftpusers #<\/p>\n<p># \/etc\/securetty #<\/p>\n<p># \/etc\/issue #<\/p>\n<p># \/etc\/motd #<\/p>\n<p># [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/961"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=961"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/961\/revisions"}],"predecessor-version":[{"id":963,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/961\/revisions\/963"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}