<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Sat, 20 Sep 2014 09:19:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.15</generator>
	<item>
		<title>How To Use ClamAV &#038; Cron Jobs To Run Daily And Hourly Virus Scans</title>
		<link>https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/</link>
					<comments>https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 20 Sep 2014 08:20:07 +0000</pubDate>
				<category><![CDATA[Anti Virus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[clamav crontab]]></category>
		<category><![CDATA[clamav daily scan]]></category>
		<category><![CDATA[clamav hourly scan]]></category>
		<category><![CDATA[contab]]></category>
		<category><![CDATA[cronjob]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1935</guid>

					<description><![CDATA[<p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. In the previous article, I shown you &#8220;How To Install/Compile ClamAV In CentOS 6&#8220;. In this article, I will continue to show you How to use ClamAV &#038; Cronjobs to run daily &#038; [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/">How To Use ClamAV &#038; Cron Jobs To Run Daily And Hourly Virus Scans</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. In the previous article, I shown you &#8220;<a href="http://www.lifelinux.com/how-to-installcompile-clamav-in-centos-6/">How To Install/Compile ClamAV In CentOS 6</a>&#8220;. In this article, I will continue to show you How to use ClamAV &#038; Cronjobs to run daily &#038; hourly virus scans.<span id="more-1935"></span></p>
<p>The first, I will create a new directory to store script &#038; log files of ClamAV</p>
<pre>
# mkdir -p /usr/local/clamav/script
# mkdir -p /usr/local/clamav/log
</pre>
<h2>Setting up hourly scans</h2>
<p>Creating a file called name <strong>clamscan_hourly</strong></p>
<pre>
# vi /usr/local/clamav/script/clamscan_hourly
</pre>
<p>And add the following code</p>
<pre>
#!/bin/bash
SUBJECT="`hostname` PASSED HOURLY SCAN"
EMAIL="admin@domain.com"
LOG=/usr/local/clamav/log/clamav.log
TMP_LOG=/tmp/clam.hourly
 
av_report() {
 
    if [ `cat ${TMP_LOG}  | grep Infected | grep -v 0 | wc -l` != 0 ]
    then
		SUBJECT="[WARNING] `hostname` PASSED HOURLY SCAN"
    fi
	
	EMAILMESSAGE=`mktemp /tmp/virus-alert.XXXXX`
    echo "To: ${EMAIL}" >>  ${EMAILMESSAGE}
    echo "From: alert@domain.com" >>  ${EMAILMESSAGE}
    echo "Subject: ${SUBJECT}" >>  ${EMAILMESSAGE}
    echo "Importance: High" >> ${EMAILMESSAGE}
    echo "X-Priority: 1" >> ${EMAILMESSAGE}
    echo "`tail -n 50 ${TMP_LOG}`" >> ${EMAILMESSAGE}
    sendmail -t < ${EMAILMESSAGE}
	
	cat ${TMP_LOG} >> ${LOG}
	rm -rf ${TMP_LOG}
}

av_scan() {
	touch ${TMP_LOG}
	find / -not -wholename '/sys/*' -and -not -wholename '/proc/*' -mmin -61 -type f -print0 | xargs -0 -r clamscan --exclude-dir=/proc/ --exclude-dir=/sys/ --quiet --infected --log=${TMP_LOG}
}

av_scan
av_report
freshclam
</pre>
<p>Save the file. Make sure it’s executable, type</p>
<pre>
# chmod +x /usr/local/clamav/script/clamscan_hourly
</pre>
<h2>Setting up daily scans</h2>
<p>Creating a file called name <strong>clamscan_daily</strong></p>
<pre>
# vi /usr/local/clamav/script/clamscan_daily
</pre>
<p>And add the following code</p>
<pre>
#!/bin/bash
SUBJECT="`hostname` PASSED DAILY SCAN"
EMAIL="admin@domain.com"
LOG=/usr/local/clamav/log/clamav.log
TMP_LOG=/tmp/clam.daily
 
av_report() {
 
    if [ `cat ${TMP_LOG}  | grep Infected | grep -v 0 | wc -l` != 0 ]
    then
	SUBJECT="[WARNING] `hostname` PASSED DAILY SCAN"
    fi
	
	EMAILMESSAGE=`mktemp /tmp/virus-alert.XXXXX`
    echo "To: ${EMAIL}" >>  ${EMAILMESSAGE}
    echo "From: alert@domain.com" >>  ${EMAILMESSAGE}
    echo "Subject: ${SUBJECT}" >>  ${EMAILMESSAGE}
    echo "Importance: High" >> ${EMAILMESSAGE}
    echo "X-Priority: 1" >> ${EMAILMESSAGE}
    echo "`tail -n 50 ${TMP_LOG}`" >> ${EMAILMESSAGE}
    sendmail -t < ${EMAILMESSAGE}
	
	cat ${TMP_LOG} >> ${LOG}
	rm -rf ${TMP_LOG}
}

av_scan() {
	touch ${TMP_LOG}
	clamscan -r / --exclude-dir=/sys/ --quiet --infected --log=${TMP_LOG}
}
 
av_scan
av_report
</pre>
<p>Save the file. Make sure it’s executable, type</p>
<pre>
# chmod +x /usr/local/clamav/script/clamscan_daily
</pre>
<h2>Setting Up Crontab to run ClamAV hourly &#038; daily scans </h2>
<p>Type the following command</p>
<pre>
# crontab -e
</pre>
<p>Add the following code</p>
<pre>
# ClamAV scan
01 * * * * /usr/local/clamav/script/clamscan_hourly
01 00 * * * /usr/local/clamav/script/clamscan_daily
</pre>
<h2>Setting up log rotation for ClamAV</h2>
<p>Creating a file called name <strong>clamav</strong>, type</p>
<pre>
# vi /etc/logrotate.d/clamav
</pre>
<p>Add the following code</p>
<pre>
/usr/local/clamav/log/*.log {
    daily
    dateext
    dateformat -%d%m%Y
    missingok
    rotate 90
    compress
    delaycompress
    notifempty
    create 600 root root
}
</pre>
<g:plusone href="https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/">How To Use ClamAV &#038; Cron Jobs To Run Daily And Hourly Virus Scans</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-use-clamav-cron-jobs-to-run-daily-and-hourly-virus-scans/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install/Compile ClamAV In CentOS 6</title>
		<link>https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/</link>
					<comments>https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 08 Sep 2014 01:26:33 +0000</pubDate>
				<category><![CDATA[Anti Virus]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[compile clamav]]></category>
		<category><![CDATA[install clamav]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1930</guid>

					<description><![CDATA[<p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. It&#8217;s easy to use and best for Linux based Web &#038; Mail server. In this article, I will show you through the step by step installation of ClamAV on CentOS 6.x from source. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/">How To Install/Compile ClamAV In CentOS 6</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. It&#8217;s easy to use and best for Linux based Web &#038; Mail server. In this article, I will show you through the step by step installation of ClamAV on CentOS 6.x from source.<br />
<span id="more-1930"></span><br />
The first, You need to download ClamAV latest version at http://www.clamav.net. Login as root and type the following command</p>
<pre>
# wget http://downloads.sourceforge.net/project/clamav/clamav/0.98.4/clamav-0.98.4.tar.gz?r=http%3A%2F%2Fwww.clamav.net%2Fdownload.html&ts=1410062157&use_mirror=softlayer-sng -O clamav-0.98.4.tar.gz
</pre>
<p>The second, extracting clamav-0.98.4.tar.gz package</p>
<pre>
# tar zxvf clamav-0.98.4.tar.gz
# cd clamav-0.98.4
</pre>
<h2>Installing ClamAV</h2>
<p>Type the following command to Compile ClamAV from source</p>
<pre>
# ./configure --prefix=/usr/local --sysconfdir=/etc --with-xml=/usr/local --with-zlib=/usr
# make
# make install
</pre>
<h2>Configuring ClamAV</h2>
<p>Creating user for clamav, enter</p>
<pre>
useradd -s /sbin/nologin -d /dev/null clamav
</pre>
<p>Creating database folder of clamav, enter</p>
<pre>
# mkdir /usr/local/share/clamav
# chown clamav /usr/local/share/clamav
# chmod 700 /usr/local/share/clamav
</pre>
<p>Type these following commands to create ClamAV configuration files</p>
<pre>
mv /etc/freshclam.conf.sample /etc/freshclam.conf
mv /etc/clamd.conf.sample /etc/clamd.conf
</pre>
<p>Open and remove contains</p>
<pre>
# Comment or remove the line below.
Example
</pre>
<h2>Updating ClamAV</h2>
<pre>
# freshclam
</pre>
<h2>Configuring daily scan</h2>
<p>In this example, I will configure a cronjob to scan the /home/ directory every day. Creating a file called name scanav at /opt/, enter</p>
<pre>
# vi /opt/scanav
</pre>
<p>Add the following to the file above</p>
<pre>
#!/bin/bash

SCAN_DIR="/home"
SCAN_LOG="/var/log/clamav.log"

# Update CLAMAV
freshclam

# Scan AV
clamscan -i -r $SCAN_DIR >> $SCAN_LOG
</pre>
<p>Give our cron script executable permissions, enter</p>
<pre>
# chmod +x /opt/scanav
</pre>
<p>Configuring daily scan with crontab, type the following command</p>
<pre>
# crontab -e
</pre>
<p>Add the following</p>
<pre>
01 01 * * * /opt/scanav
</pre>
<g:plusone href="https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/">How To Install/Compile ClamAV In CentOS 6</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-installcompile-clamav-in-centos-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Recover Password Juniper SSG 550 Using Serial Number</title>
		<link>https://lifelinux.com/how-to-recover-password-juniper-ssg-550-using-serial-number/</link>
					<comments>https://lifelinux.com/how-to-recover-password-juniper-ssg-550-using-serial-number/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sun, 28 Jul 2013 03:28:19 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[reset password ssg 550]]></category>
		<category><![CDATA[ssg reset default settings]]></category>
		<category><![CDATA[ssg system Recovery]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1842</guid>

					<description><![CDATA[<p>SSG550M is a purpose-built, modular security platform that delivers 1+ Gbps of firewall traffic and 600 Mbps of IPSec VPN for large branch, regional offices and enterprises. If you ever forget your password and lose access to your SSG firewall then in this article, I will show you How to recover password Juniper SSG 550 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-recover-password-juniper-ssg-550-using-serial-number/">How To Recover Password Juniper SSG 550 Using Serial Number</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>SSG550M is a purpose-built, modular security platform that delivers 1+ Gbps of firewall traffic and 600 Mbps of IPSec VPN for large branch, regional offices and enterprises. If you ever forget your password and lose access to your SSG firewall then in this article, I will show you How to recover password Juniper SSG 550 using serial number step by step.<span id="more-1842"></span><br />
<span style="color: #ff0000;"><strong>NOTE: You will be notified that you will lose your configuration and all your settings.</strong></span></p>
<p><strong>Step 1.</strong> Connect to the device with a console connection.<br />
<strong>Step 2.</strong> Log into the firewall using the device&#8217;s serial number as both the username and password. The following shows a typical serial number login and the resulting messages.</p>
<pre>login: 00442421012308289
password:</pre>
<p><strong>Step 3.</strong> A warning message will display, requesting confirmation to continue with the process. Enter &#8220;y&#8221;</p>
<pre>!!! Lost Password Reset !!! You have initiated a command to reset the device to
factory defaults, clearing all current configuration and settings. Would you like
to continue? y/[n] y</pre>
<p><strong>Step 4.</strong> A reconfirmation message displays. Again, enter &#8221; y &#8220;. The firewall will reboot.</p>
<pre>!! Reconfirm Lost Password Reset !! If you continue, the entire
configuration of the device will be erased. In addition, a permanent
counter will be incremented to signify that this device has been reset.
This is your last chance to cancel this command. If you proceed, the
device will return to factory default configuration, which is: System IP:
192.168.1.1; username: netscreen, password: netscreen. Would you like to
continue? y/[n] y</pre>
<p><strong>Step 5.</strong> Upon reboot, the configuration is set back to factory default. The login for both the username and password is reset to &#8220;netscreen&#8221;.</p>
<g:plusone href="https://lifelinux.com/how-to-recover-password-juniper-ssg-550-using-serial-number/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-recover-password-juniper-ssg-550-using-serial-number/">How To Recover Password Juniper SSG 550 Using Serial Number</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-recover-password-juniper-ssg-550-using-serial-number/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Setup Iptables Firewall For A Web Server On CentOS</title>
		<link>https://lifelinux.com/how-to-setup-iptables-firewall-for-a-web-server-on-centos/</link>
					<comments>https://lifelinux.com/how-to-setup-iptables-firewall-for-a-web-server-on-centos/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Thu, 07 Mar 2013 05:49:02 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1649</guid>

					<description><![CDATA[<p>I have setup an web server using Apache on CentOS. How do I configure firewall using iptables to allow or block access to the web server under CentOS ? In Tutorial I will show you How do I do it. What is iptables ? iptables is a user space application program that allows a system [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-setup-iptables-firewall-for-a-web-server-on-centos/">How To Setup Iptables Firewall For A Web Server On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>I have setup an web server using Apache on CentOS. How do I configure firewall using iptables to allow or block access to the web server under CentOS ? In Tutorial I will show you How do I do it.<br />
<span id="more-1649"></span></p>
<h2>What is iptables ?</h2>
<p>iptables is a user space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores. Different kernel modules and programs are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables for Ethernet frames.</p>
<h2>Setting up iptables</h2>
<p>In most Linux distros including Redhat / CentOS Linux installs iptables by default. You can use the following procedure to verify that iptables has been installed. Open terminal and type the following command:</p>
<pre>
# iptables -V
</pre>
<p>Sample outputs:</p>
<pre>
iptables v1.4.7
</pre>
<p>You can use the following command to view the status of iptables command, enter:</p>
<pre>
# yum info iptables
</pre>
<p>Sample outputs:</p>
<pre>
Installed Packages
Name        : iptables
Arch        : x86_64
Version     : 1.4.7
Release     : 5.1.el6_2
Size        : 833 k
Repo        : installed
From repo   : anaconda-CentOS-201207061011.x86_64
Summary     : Tools for managing Linux kernel packet filtering capabilities
URL         : http://www.netfilter.org/
License     : GPLv2
Description : The iptables utility controls the network packet filtering code in
            : the Linux kernel. If you need to set up firewalls and/or IP
            : masquerading, you should install this package.
...
</pre>
<p>If the above message does not appear, then type the following command to install iptables</p>
<pre>
# yum install iptables -y
</pre>
<h2>Configuration iptables for a web server</h2>
<p>The default iptables configuration on CentOS does not allow access to the HTTP (TCP PORT # 80) and HTTPS (TCP PORT # 443) ports used by the Apache web server. You can do step by step to configure<br />
<strong>Step 1: Flush or remove all iptables rules</strong></p>
<pre>
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
</pre>
<p><strong>Step 2: Set default rules</strong></p>
<pre>
# iptables -P INPUT DROP
# iptables -P FORWARD ACCEPT
# iptables -P OUTPUT ACCEPT
</pre>
<p><strong>Step 3: Allow access to HTTP (80) and HTTPS (443)</strong></p>
<pre>
# iptables -A INPUT -i lo -j ACCEPT 
# iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT 
# iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
# iptables -A INPUT -p icmp -j ACCEPT
# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
</pre>
<h2>Turn on and save iptables</h2>
<p>Type the following two commands to turn on firewall:</p>
<pre>
# chkconfig iptables on
# service iptables save
</pre>
<h2>Anti synflood with iptables</h2>
<p>Edit /etc/sysctl.conf to defend against certain types of attacks and append / update as follows:</p>
<pre>
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.netfilter.ip_conntrack_max = 1048576
</pre>
<p>And type the following command</p>
<pre>
# iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 --syn -m recent --set --name CHECK --rsource 
# iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 --syn -m recent --update --seconds 5 --hitcount 15 --rttl --name CHECK --rsource -j DROP 
</pre>
<g:plusone href="https://lifelinux.com/how-to-setup-iptables-firewall-for-a-web-server-on-centos/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-setup-iptables-firewall-for-a-web-server-on-centos/">How To Setup Iptables Firewall For A Web Server On CentOS</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-setup-iptables-firewall-for-a-web-server-on-centos/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Repel port flood by CSF and IPT_Recent</title>
		<link>https://lifelinux.com/repel-port-flood-by-csf-and-ipt_recent/</link>
					<comments>https://lifelinux.com/repel-port-flood-by-csf-and-ipt_recent/#comments</comments>
		
		<dc:creator><![CDATA[Linux Killer]]></dc:creator>
		<pubDate>Thu, 31 Jan 2013 00:58:53 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[Flood]]></category>
		<category><![CDATA[flood attack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[servers]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1480</guid>

					<description><![CDATA[<p>Protect the server from Flood attacks , Using the property Port Flood Protection In firewall CSF . After doing the necessary settings will be able to determine the number of allowed connections Same time for each IP tries to connect to the server. So How to Make a flood attack ? Logically flood attacks are two ways : first through a specific [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/repel-port-flood-by-csf-and-ipt_recent/">Repel port flood by CSF and IPT_Recent</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Protect the server from Flood attacks , Using the property Port Flood Protection In firewall CSF . After doing the necessary settings will be able to determine the number of allowed connections Same time for each IP tries to connect to the server.</p>
<p><span id="more-1480"></span><br />
<strong>So How to Make a flood attack ?</strong><br />
Logically flood attacks are two ways :<br />
first through a specific communication<br />
the second through multiple connections each connection of these connections connect with the provider<br />
<strong>Requirements</strong></p>
<ol>
<li>Installing firewall CSF last version</li>
<li>Enabled IPT and works well</li>
<li>Model IPT_Recent special for IPT</li>
</ol>
<p><strong>Application</strong></p>
<p>Through edited the configuration file special for CSF it is located in the following path:</p>
<pre>root@server:$ nano /etc/csf/csf.conf</pre>
<p>We pressing CTRL + W and look for PORTFLOOD we will find the line as follows default :</p>
<pre>PORTFLOOD = " "</pre>
<p>put inside ” ” Settings that we want ,as in the following example:</p>
<pre>PORTFLOOD = "80;tcp;20;10"</pre>
<p>80 is the port , TCP is the protocol , 20 is the number of connections allowed at the same time , 10 is time of pause temporarily after the 10 seconds is allowed IP make new contacts</p>
<p><strong>Important note: </strong>ipt_recent can count 20 Packets for each Title , So you can change the number of connections from 1 to 20 only</p>
<p>Is there a possibility of adding more than one port ?yes be as follows (Just an example) :</p>
<pre>PORTFLOOD = "22;tcp;10;200,21;tcp;15;100,80;tcp;20;5"</pre>
<p><strong><span style="color: #000000;">Note</span> </strong>that when we add a new port we put a comma (,)</p>
<p>In the previous example you choose more than one port are 22, 21 and 80 And you can add more and you can change the number of connections and also change the protocol type, for example, from TCP to UDP after the completion of the edited we save the file : CTRL + X, Y, and then Enter button.</p>
<p>Finally, do not forget to restart CSF with the following command:</p>
<pre>root@server:$ csf -r</pre>
<p>Thank You ,,</p>
<g:plusone href="https://lifelinux.com/repel-port-flood-by-csf-and-ipt_recent/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/repel-port-flood-by-csf-and-ipt_recent/">Repel port flood by CSF and IPT_Recent</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/repel-port-flood-by-csf-and-ipt_recent/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>What is the role of this variables in php.ini file (expose_php &#8211; allow_url_fopen &#8211; register_globals) ?</title>
		<link>https://lifelinux.com/what-is-the-role-of-this-variables-in-php-ini-file-expose_php-allow_url_fopen-register_globals/</link>
					<comments>https://lifelinux.com/what-is-the-role-of-this-variables-in-php-ini-file-expose_php-allow_url_fopen-register_globals/#comments</comments>
		
		<dc:creator><![CDATA[Linux Killer]]></dc:creator>
		<pubDate>Tue, 29 Jan 2013 19:52:34 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux server]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[rsync command]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[variables]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1446</guid>

					<description><![CDATA[<p>There are a lot of people do not know what these variables and how they can be used , this Variables exist in php.ini file , the php.ini file is contains settings PHP on server , and for each variable in the php.ini file have a special role and can be disabled and activated with ON and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/what-is-the-role-of-this-variables-in-php-ini-file-expose_php-allow_url_fopen-register_globals/">What is the role of this variables in php.ini file (expose_php &#8211; allow_url_fopen &#8211; register_globals) ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>There are a lot of people do not know what these variables and how they can be used , this Variables exist in php.ini file , the php.ini file is contains settings PHP on server , and for each variable in the php.ini file have a special role and can be disabled and activated with ON and Off</p>
<p><span id="more-1446"></span></p>
<p>Disable = Off</p>
<p>Activate = On</p>
<p>So now I will explain to you the benefit of each function and put you a choice in the activation and disable</p>
<pre>expose_php</pre>
<p>Is a a property from which to see PHP version on the server so disabling means not making available to the hacker to know the version of PHP</p>
<pre>allow_url_fopen</pre>
<p>When you disable this function no one will be able to contain another link in a specific page , but some scripts like AM4SS &#8211; Vbulletin need this function for the arrival of notifications within the Admin Control Panel</p>
<pre>register_globals</pre>
<p>When you Desable this function become possible to control the content of php files difficult and does not allow the Edited only by the owner<br />
<strong>So now we come to the disabled and activation of these properties</strong></p>
<p>Enter in the shell and modify the php.ini file with the following command</p>
<pre>nano /usr/local/lib/php.ini</pre>
<p>By pressing Ctrl + W will open new box writes what you want to search for inside file</p>
<p>Looking for the variable you want edited for example</p>
<pre>allow_url_fopen</pre>
<p>You&#8217;ll find as follows :</p>
<pre>allow_url_fopen = On</pre>
<p>Mark value after the mark (=) On for activate Off  for disabled , Apply it with the rest of the properties , After completion of the amendment to click on the keys CTRL + X + Y then Enter button</p>
<p>You will see a new command line in the main interface in shell<br />
Observation : you must restart Apache after any amendment to this file for edited is defined in the php and Apache<br />
To restart apache :</p>
<pre>service httpd restart</pre>
<p>Or you can restart apache using server Control Panel WHM In a private box to restart services From there you can restart any service you want to.</p>
<g:plusone href="https://lifelinux.com/what-is-the-role-of-this-variables-in-php-ini-file-expose_php-allow_url_fopen-register_globals/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/what-is-the-role-of-this-variables-in-php-ini-file-expose_php-allow_url_fopen-register_globals/">What is the role of this variables in php.ini file (expose_php &#8211; allow_url_fopen &#8211; register_globals) ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/what-is-the-role-of-this-variables-in-php-ini-file-expose_php-allow_url_fopen-register_globals/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How Do I Block An IP Address On Linux Server ?</title>
		<link>https://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/</link>
					<comments>https://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 11:06:46 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[block ip iptables]]></category>
		<category><![CDATA[block ip linux]]></category>
		<category><![CDATA[block ip unix]]></category>
		<category><![CDATA[block ip via iptables]]></category>
		<category><![CDATA[block ip with iptables]]></category>
		<category><![CDATA[destination port]]></category>
		<category><![CDATA[firewall script]]></category>
		<category><![CDATA[interface name]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[ip subnet]]></category>
		<category><![CDATA[ip table blocking]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[iptables firewall]]></category>
		<category><![CDATA[iptables-restore command]]></category>
		<category><![CDATA[iptables-save]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux block ip]]></category>
		<category><![CDATA[linux block ip address]]></category>
		<category><![CDATA[linux command to block ip]]></category>
		<category><![CDATA[linux drop ip address]]></category>
		<category><![CDATA[linux server]]></category>
		<category><![CDATA[linux server how to block ip/user]]></category>
		<category><![CDATA[log target]]></category>
		<category><![CDATA[public interface]]></category>
		<category><![CDATA[sbin]]></category>
		<category><![CDATA[server port]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[session block]]></category>
		<category><![CDATA[spoof]]></category>
		<category><![CDATA[syntax]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1326</guid>

					<description><![CDATA[<p>I run CentOS on my server, and I often find that my server is being attacked by other computers. Brute force SSH attacks, port scanning, viruses scanning for the ability to spread, things like that. In this article, I&#8217;ll show you how to block an IP address on Linux server using IPTables. The First, I&#8217;ll [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/">How Do I Block An IP Address On Linux Server ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>I run CentOS on my server, and I often find that my server is being attacked by other computers. Brute force SSH attacks, port scanning, viruses scanning for the ability to spread, things like that. In this article, I&#8217;ll show you how to block an IP address on Linux server using IPTables.<br />
<span id="more-1326"></span><br />
The First, I&#8217;ll assume you are already using iptables. If you need help setting that up, read <a href="http://www.lifelinux.com/how-to-install-iptables-on-redhat-centos-linux/">this article</a>.</p>
<h2>How do I block an IP address ?</h2>
<p>Example I want to block incoming request from IP <span style="color: #ff0000;">1.2.3.4</span>, login as root and type the following command</p>
<pre># iptables -I INPUT -s <span style="color: #ff0000;">1.2.3.4</span> -j DROP</pre>
<p><strong>Where,</strong><br />
&#8211; I: Inserts the chain at the top of the rules.<br />
&#8211; s: Match source IP address.<br />
&#8211; j: Jump to the specified target chain when the packet matches the current rule.</p>
<p>To drop packets coming in on interface eth0 from <span style="color: #ff0000;">1.2.3.4</span>, type the following command</p>
<pre># iptables -I INPUT -i eth0 -s <span style="color: #ff0000;">1.2.3.4</span> -j DROP</pre>
<h2>How do I block a subnet ?</h2>
<p>Use the following syntax to block <span style="color: #ff0000;">10.0.0.0/8</span></p>
<pre># iptables -I INPUT -s <span style="color: #ff0000;">10.0.0.0/8</span> -j DROP</pre>
<h2>How do I save blocked IP address ?</h2>
<p>To save blocked IP address to iptables config file, type the following command</p>
<pre># service iptables save</pre>
<p>Or</p>
<pre># /etc/init.d/iptables save</pre>
<h2>How Do I Unblock An IP Address?</h2>
<p>First, you need to display blocked IP address along with line number and other information, type the following command</p>
<pre># iptables -L INPUT -n --line-numbers
# iptables -L INPUT -n --line-numbers | grep 1.2.3.4</pre>
<p>Sample outputs:</p>
<pre>Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    DROP       all  --  1.2.3.4              0.0.0.0/0
2    LOCALINPUT  all  --  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     udp  --  203.162.4.1          0.0.0.0/0           udp spts:1024:65535 dpt:53</pre>
<p>To unblock 1.2.3.4 you must delete line number 1, enter:</p>
<pre># iptables -D INPUT 1</pre>
<g:plusone href="https://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/">How Do I Block An IP Address On Linux Server ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How Do I Disable The Ping Response On Linux?</title>
		<link>https://lifelinux.com/how-do-i-disable-the-ping-response-on-linux/</link>
					<comments>https://lifelinux.com/how-do-i-disable-the-ping-response-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 14:43:24 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[Disable Ping Replies]]></category>
		<category><![CDATA[Disable Ping Response]]></category>
		<category><![CDATA[icmp_echo_ignore_all]]></category>
		<category><![CDATA[sysctl -p]]></category>
		<category><![CDATA[sysctl.conf]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1302</guid>

					<description><![CDATA[<p>Sometimes you may want to disable ping response for many reasons, may be for a security reason&#8230; This article explains how do I disable the ping response on Linux ? Disable ping response Temporarily To disable the PING response, login as root and type the following command # echo 1 &#62;/proc/sys/net/ipv4/icmp_echo_ignore_all To reenable the PING [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-disable-the-ping-response-on-linux/">How Do I Disable The Ping Response On Linux?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Sometimes you may want to disable ping response for many reasons, may be for a security reason&#8230; This article explains how do I disable the ping response on Linux ?<br />
<span id="more-1302"></span></p>
<h2>Disable ping response Temporarily</h2>
<p>To disable the PING response, login as root and type the following command</p>
<pre># echo 1 &gt;/proc/sys/net/ipv4/icmp_echo_ignore_all</pre>
<p>To reenable the PING response do this:</p>
<pre># echo 0 &gt;/proc/sys/net/ipv4/icmp_echo_ignore_all</pre>
<h2>Disable ping response Permanently</h2>
<p>Edit the /etc/sysctl.conf file and add the following line</p>
<pre>net.ipv4.conf.icmp_echo_ignore_all = 1</pre>
<p>Execute sysctl -p to enforce this setting immediately</p>
<pre># sysctl -p</pre>
<g:plusone href="https://lifelinux.com/how-do-i-disable-the-ping-response-on-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-disable-the-ping-response-on-linux/">How Do I Disable The Ping Response On Linux?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-do-i-disable-the-ping-response-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Password Protect Files</title>
		<link>https://lifelinux.com/linux-password-protect-files/</link>
					<comments>https://lifelinux.com/linux-password-protect-files/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 27 May 2011 01:22:04 +0000</pubDate>
				<category><![CDATA[File System]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[access control list]]></category>
		<category><![CDATA[command line tool]]></category>
		<category><![CDATA[cryptographic software]]></category>
		<category><![CDATA[cryptography toolkit]]></category>
		<category><![CDATA[decrypt files]]></category>
		<category><![CDATA[digital signatures]]></category>
		<category><![CDATA[encrypt]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[file permissions]]></category>
		<category><![CDATA[gnu privacy guard]]></category>
		<category><![CDATA[gnupg]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[gpg command]]></category>
		<category><![CDATA[input file]]></category>
		<category><![CDATA[key management]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mcrypt command]]></category>
		<category><![CDATA[network protocols]]></category>
		<category><![CDATA[passphrase]]></category>
		<category><![CDATA[password protect files]]></category>
		<category><![CDATA[secure communication]]></category>
		<category><![CDATA[secure sockets layer]]></category>
		<category><![CDATA[transport layer security]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[unix computer security]]></category>
		<category><![CDATA[unix crypt]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=811</guid>

					<description><![CDATA[<p>If you store private information on your Linux system and you want to prevent other people who use the system from viewing your private files, you need to password protect these files. Solution is to use following commands to encrypt or decrypt files with a password. gpg command GnuPG is the GNU project&#8217;s complete and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/linux-password-protect-files/">Linux Password Protect Files</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>If you store private information on your Linux system and you want to prevent other people who use the system from viewing your private files, you need to password protect these files. Solution is to use following commands to encrypt or decrypt files with a password.<span id="more-811"></span></p>
<h3>gpg command</h3>
<p><strong>GnuPG</strong> is the GNU project&#8217;s complete and free implementation of the OpenPGP standard as defined by RFC4880. GnuPG allows to encrypt and sign your data and communication, features a versatile key management system as well as access modules for all kinds of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications.</p>
<p>To encrypt a file, use command gpg as follows:</p>
<pre>$ gpg -c filename</pre>
<p>Example, to encrypt private.txt file, type the command</p>
<pre>$ gpg -c private.txt</pre>
<p>Output</p>
<pre>Enter passphrase:
Repeat passphrase:</pre>
<p><strong>Where,</strong><br />
-c : Encrypt with symmetric cipher.</p>
<p>To decrypt file use gpg command</p>
<pre>$ gpg private.txt.gpg</pre>
<p>Output:</p>
<pre>gpg private.txt.gpg
gpg: CAST5 encrypted data
Enter passphrase:</pre>
<h3>mcrypt command</h3>
<p><strong>Mcrypt</strong> is a simple crypting program, a replacement for the old unix crypt. When encrypting or decrypting a file, a new file is created with the extension .nc and mode 0600. The new file keeps the modification date of the original. The original file may be deleted by specifying the -u parameter.</p>
<p>Examples, to encrypt data.txt file, type the following command</p>
<pre>$ mcrypt data.txt</pre>
<p>Output:</p>
<pre>Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase:
Enter passphrase:</pre>
<p><strong>Note</strong> that a new file is created with the extension .nc.</p>
<p>To decrypt the data.txt.nc file, enter</p>
<pre>$ mcrypt -d data.txt.nc</pre>
<p>Output:</p>
<pre>Enter passphrase:
File data.txt.nc was decrypted.</pre>
<g:plusone href="https://lifelinux.com/linux-password-protect-files/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/linux-password-protect-files/">Linux Password Protect Files</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/linux-password-protect-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Display Failed Login Attempt ?</title>
		<link>https://lifelinux.com/how-to-display-failed-login-attempt/</link>
					<comments>https://lifelinux.com/how-to-display-failed-login-attempt/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 25 May 2011 02:12:19 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[binary format]]></category>
		<category><![CDATA[check the failed login attempts in log file]]></category>
		<category><![CDATA[faillog command]]></category>
		<category><![CDATA[how to get information about failure logs in linux]]></category>
		<category><![CDATA[linux login log]]></category>
		<category><![CDATA[login attempts]]></category>
		<category><![CDATA[login failure]]></category>
		<category><![CDATA[maximum number]]></category>
		<category><![CDATA[pam track failed logins]]></category>
		<category><![CDATA[ssh login]]></category>
		<category><![CDATA[suse login attempts logfile]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=773</guid>

					<description><![CDATA[<p>Under Linux operating system you can use the faillog command to display faillog records or to set login failure limits. faillog command displays the contents of the failure log from /var/log/faillog database file. It also can be used for maintains failure counters and limits. If you run faillog command without arguments, it will display only [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-display-failed-login-attempt/">How To Display Failed Login Attempt ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Under Linux operating system you can use the <strong>faillog</strong> command to display faillog records or to set login failure limits. faillog command displays the contents of the failure log from <strong>/var/log/faillog</strong> database file. It also can be used for maintains failure counters and limits. If you run faillog command without arguments, it will display only list of user faillog records who have ever had a login failure.<span id="more-773"></span></p>
<h3>Synopsis</h3>
<pre>faillog [options]</pre>
<h3>Options</h3>
<pre>The options which apply to the faillog command are:
-a, --all
Display faillog records for all users.
-h, --help
Display help message and exit.
-l, --lock-time SEC
Lock account to SEC seconds after failed login.
-m, --maximum MAX
Set maximum number of login failures after the account is disabled to MAX. Selecting MAX value of 0 has the effect of not placing a limit on the number of failed logins. The maximum failure count should always be 0 for root to prevent a denial of services attack against the system.
-r, --reset
Reset the counters of login failures or one record if used with the -u LOGIN option. Write access to /var/log/faillog is required for this option.
-t, --time DAYS
Display faillog records more recent than DAYS. The -t flag overrides the use of -u.
-u, --user LOGIN
Display faillog record or maintains failure counters and limits (if used with -l, -m or -r options) only for user with LOGIN.</pre>
<h3>Examples</h3>
<p>To display all failed login attempt with following command:</p>
<pre># faillog -a</pre>
<p>Sample outputs</p>
<pre>Login       Failures Maximum Latest                   On

root            0        0   01/01/70 07:00:00 +0700
bin             0        0   01/01/70 07:00:00 +0700
daemon          0        0   01/01/70 07:00:00 +0700
adm             0        0   01/01/70 07:00:00 +0700
lp              0        0   01/01/70 07:00:00 +0700
sync            0        0   01/01/70 07:00:00 +0700
shutdown        0        0   01/01/70 07:00:00 +0700
halt            0        0   01/01/70 07:00:00 +0700
mail            0        0   01/01/70 07:00:00 +0700
news            0        0   01/01/70 07:00:00 +0700
uucp            0        0   01/01/70 07:00:00 +0700
operator        0        0   01/01/70 07:00:00 +0700</pre>
<p>To display failed login attempt for user root with following command:</p>
<pre># faillog -u root</pre>
<p>Sample outputs</p>
<pre>Login       Failures Maximum Latest                   On

root            0        0   01/01/70 07:00:00 +0700</pre>
<g:plusone href="https://lifelinux.com/how-to-display-failed-login-attempt/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-display-failed-login-attempt/">How To Display Failed Login Attempt ?</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-display-failed-login-attempt/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
