<?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>Linux Explore &#187; Linux Security</title>
	<atom:link href="https://blog.linuxexplore.com/tag/linux-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.linuxexplore.com</link>
	<description>Exploring Linux</description>
	<lastBuildDate>Mon, 07 Apr 2014 00:30:50 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>IPSec Communication  for VPN Setup in CentOS 6 / RHEL 6.3</title>
		<link>https://blog.linuxexplore.com/2013/04/07/ipsec-communication-for-vpn-setup-in-centos-6-rhel-6-3/</link>
		<comments>https://blog.linuxexplore.com/2013/04/07/ipsec-communication-for-vpn-setup-in-centos-6-rhel-6-3/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 19:21:09 +0000</pubDate>
		<dc:creator><![CDATA[linuxexplore]]></dc:creator>
				<category><![CDATA[Linux Explore How to]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[IPSec]]></category>
		<category><![CDATA[IPSec VPN]]></category>
		<category><![CDATA[ipsec-tools]]></category>
		<category><![CDATA[L2TP VPN]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[PSK]]></category>
		<category><![CDATA[racoon]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://linuxexplore.com/?p=724</guid>
		<description><![CDATA[The use of IPSEC transport mode for server to server communication is one of the best solutions to provide authentication, integrity, access control, and confidentiality. IPSEC is built into to the Linux kernel, in other words there is no daemon running in the background. IPSEC does not require port-forwarding; some people elect to use SSH,&#8230;]]></description>
				<content:encoded><![CDATA[<p>The use of <strong>IPSEC</strong> transport mode for server to server communication is one of the best solutions to provide authentication, integrity, access control, and confidentiality. IPSEC is built into to the Linux kernel, in other words there is no daemon running in the background. IPSEC does not require port-forwarding; some people elect to use SSH, stunnel, and other technologies that rely on port forwarding. With IPSEC, you simply have to run a program and its configuration file. After running it, encryption between hosts is mandatory. Connections will be denied if the other connection does not have the appropriate keys. Groups of computers can share the same key, and it can even be done on a per-port setting.</p>
<p><a href="http://linuxexplore.files.wordpress.com/2013/04/n-t-n-ipsec-diagram.png"><img class="aligncenter size-full wp-image-759" alt="IPSec image" src="http://linuxexplore.files.wordpress.com/2013/04/n-t-n-ipsec-diagram.png" width="600" height="186" /></a></p>
<p>To configure the IPSec between servers following are the requirements:</p>
<ul>
<li>IPSec-tools package</li>
<li>Static IP address for each system</li>
</ul>
<p>IPSec-tools can be downloaded from <a href="http://ipsec-tools.sourceforge.net/">http://ipsec-tools.sourceforge.net/</a>.</p>
<h2>Installation IPSec-tools package:</h2>
<p>To install give the following commands:</p>
<pre># <strong>tar jxf ipsec-tools-x.y.z.tar.bz2
</strong># <strong>cd ipsec-tools-x.y.z
</strong># <strong>./configure
</strong># <strong>make
</strong># <strong>make install</strong></pre>
<p>If you get error in compilation, please go through the comments. You will find the solution.</p>
<p>Replace <em>x.y.z</em> with the version of the downloaded sources.</p>
<p>Instead of compiling and installing IPSec-tools from source, it can be done using CentOS repository:</p>
<pre># <strong>yum install ipsec-tools
</strong></pre>
<p><!--[if gte mso 9]&gt;--></p>
<h2>IPSec communication between two Linux systems</h2>
<h3><span style="text-decoration:underline;">Using Pre-shared key authentication method:</span></h3>
<p>Linux to <strong>Linux IPSec communication</strong> can be used to secure the communication between Server (IP address: 192.168.1.1) to Server (IP address: 192.168.1.2). It can also be used to encrypt the <strong>client-sever communication. </strong>For example: L2TP VPN Server and client communication, VNC server and client communication can be secured using ipsec-tools. For both cases following steps need to be followed.</p>
<p>The first step is to write a configuration file <code>/etc/raccoon/setkey.conf </code>with following entries on 192.168.1.1.</p>
<pre>#!/usr/sbin/setkey -f
# Flush the SAD and SPD
flush;
spdflush;
spdadd 192.168.1.1 192.168.1.2 any -P out ipsec
        esp/transport//require;
spdadd 192.168.1.2 192.168.1.1 any -P in ipsec
        esp/transport//require;</pre>
<p>The same <code>/etc/setkey.conf</code> can be created on the 192.168.1.2 host, with inverted <code><i>-P in</i></code> and <code><i>-P out</i></code> options.</p>
<pre>#!/usr/sbin/setkey -f
# Flush the SAD and SPD
flush;
spdflush;
spdadd 192.168.1.1 192.168.1.2 any -P in ipsec
        esp/transport//require;
spdadd 192.168.1.2 192.168.1.1 any -P out ipsec
        esp/transport//require;</pre>
<p>With the security policies set up you can configure <strong>racoon</strong>. We will add paths for the preshared key file, and certification directory. This is an example of <code>/etc/racoon.conf</code> with the paths and a general phase two policy set up:</p>
<pre>path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
sainfo anonymous {
{
        pfs_group 2;
        lifetime time 1 hour;
        encryption_algorithm 3des, blowfish 448, rijndael;
        authentication_algorithm hmac_sha1, hmac_md5;
        compression_algorithm deflate;
}</pre>
<p>The <code><i>sainfo</i></code> identifier is used to make a block that specifies the settings for security associations. Instead of setting this for a specific host, the <code><i>anonymous</i></code> parameter is used to specify that these settings should be used for all hosts that do not have a specific configuration. The <code><i>pfs_group</i></code> specifies which group of Diffie-Hellman exponentiations should be used. The different groups provide different lengths of base prime numbers that are used for the authentication process. Group 2 provides a 1024 bit length if you would like to use a greater length, for increased security, you can use another group (like 14 for a 2048 bit length). The <code><i>encryption_algorithm</i></code> specifies which encryption algorithms this host is willing to use for ESP encryption. The <code><i>authentication_algorithm</i></code> specifies the algorithm to be used for ESP Authentication or AH. Finally, the <code><i>compression_algorithm</i></code> is used to specify which compression algorithm should be used when IPcomp is specified in an association.</p>
<p>The next step is to add a phase one configuration for the key exchange with the other host to the <code>racoon.conf</code> configuration file.</p>
<pre>remote 192.168.1.2
{
        exchange_mode aggressive, main;
        my_identifier address;
        proposal {
               encryption_algorithm 3des;
               hash_algorithm sha1;
               authentication_method pre_shared_key;
               dh_group 2;
        }
}</pre>
<p>The <code><i>remote</i></code> block specifies a phase one configuration. The <code><i>exchange_mode</i></code> is used to configure what exchange mode should be used for phase. You can specify more than one exchange mode, but the first method is used if this host is the initiator of the key exchange. The <code><i>my_identifier</i></code> option specifies what identifier should be sent to the remote host. If this option committed <code><i>address</i></code> is used, this sends the IP address as the identifier. The <code><i>proposal</i></code> block specifies parameter that will be proposed to the other host during phase one authentication. The <code><i>encryption_algorithm</i></code>, and <code><i>dh_group</i></code> are explained above. The <code><i>hash_algorithm</i></code> option is mandatory, and configures the hash algorithm that should be used. This can be <code><i>md5</i></code>, or <code><i>sha1</i></code>. The <code><i>authentication_method</i></code> is crucial for this configuration, as this parameter is used to specify that a preshared key should be used, with <code><i>pre_shared_key</i></code>.</p>
<p>With racoon set up there is one thing left to do, the preshared key has to be added to <code>/etc/racoon/psk.txt</code>. The syntax is very simple, each line contains a host IP address and a key. These parameters are separated with a tab. For example:</p>
<pre>192.168.1.2    somekey</pre>
<p>Now time to test the security policies &amp; raccoon configuration.</p>
<pre>$ <strong>setkey -f /etc/setkey.conf</strong>
$ <strong>racoon -F</strong></pre>
<p>For instance, you could ping the other host to start with. The first time you ping the other host, this will fail:</p>
<pre>$ <strong>ping 192.168.1.2</strong>
connect: Resource temporarily unavailable</pre>
<p>But after some time you will get reply. Now all the communication between IP addresses 192.168.1.1 and 192.168.1.2 is secured with IPSec. Instead of making complete secure communication, it can be changed port specific, which can be used for <strong>client-server secure communication</strong>. It just need to modify /etc/setkey.conf file for port specific configuration.</p>
<p>Check related posts: <a href="http://linuxexplore.com/how-tos/l2tp-vpn-using-rp-l2tpd/" target="_blank">how to configure L2TP VPN on CentOS using rp-l2tpd</a> and <a href="http://linuxexplore.com/how-tos/l2tp-vpn-using-xl2tpd/" target="_blank">how to configure L2TP VPN on CentOS using xl2tpd</a></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.linuxexplore.com/2013/04/07/ipsec-communication-for-vpn-setup-in-centos-6-rhel-6-3/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Chroot SFTP Users for Web Hosting Server.</title>
		<link>https://blog.linuxexplore.com/2013/02/20/chroot-sftp-users-for-web-hosting-server/</link>
		<comments>https://blog.linuxexplore.com/2013/02/20/chroot-sftp-users-for-web-hosting-server/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 20:37:25 +0000</pubDate>
		<dc:creator><![CDATA[linuxexplore]]></dc:creator>
				<category><![CDATA[Linux Explore How to]]></category>
		<category><![CDATA[centos 6]]></category>
		<category><![CDATA[chroot]]></category>
		<category><![CDATA[chroot jail]]></category>
		<category><![CDATA[chroot sftp]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[internal-sftp]]></category>
		<category><![CDATA[kernel version]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[openssh-server]]></category>
		<category><![CDATA[openssh-server-5.3]]></category>
		<category><![CDATA[public_html]]></category>
		<category><![CDATA[restorecon]]></category>
		<category><![CDATA[selinux chroot]]></category>
		<category><![CDATA[setsebool]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[SFTP CentOS]]></category>
		<category><![CDATA[sftp chroot]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ssh public key]]></category>
		<category><![CDATA[SSH server]]></category>
		<category><![CDATA[sshd_config]]></category>
		<category><![CDATA[ssh_chroot_rw_homedirs]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[unix operating systems]]></category>
		<category><![CDATA[web hosting]]></category>

		<guid isPermaLink="false">http://linuxexplore.com/?p=717</guid>
		<description><![CDATA[A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally not access) files outside the designated directory tree. The term &#8220;chroot&#8221; may refer to the chroot(2) system&#8230;]]></description>
				<content:encoded><![CDATA[<p>A <b>chroot</b> on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally not access) files outside the designated directory tree. The term &#8220;chroot&#8221; may refer to the <tt>chroot(2)</tt> system call or the <tt>chroot(8)</tt> wrapper program. The modified environment is called a &#8220;chroot jail&#8221;. From <a title="Chroot" href="http://en.wikipedia.org/wiki/Chroot" target="_blank">Wikipedia</a>.</p>
<p>Why it is required? If you want to set up your Linux box as a web hosting server for its users, you may need to give SFTP access. But they can get access to whole system Linux tree, just for reading but still very unsecure. So it is mandatory to lock them in their home directory.</p>
<p>There are many other applications, it&#8217;s just a common example, so lets start its configuration.</p>
<h2>Linux Box Detail:</h2>
<p>Its mine Linux Box, your Linux system may vary. Only thing to take care is the openssh-server version, because openssh-server-5.3p1 support SFTP chroot. Older version supports but its tricky, please let me k now if you want to know that too.</p>
<p lang="en-IN"><strong>Operating System:</strong> CentOS 6.3/x86_64</p>
<p lang="en-IN"><strong>Kernel Version:</strong> 2.6.32-279.19.1.el6/x86_64</p>
<p lang="en-IN"><strong>Openssh Server Version:</strong> openssh-server-5.3p1-81.el6_3/x86_64</p>
<pre><a href="http://linuxexplore.files.wordpress.com/2013/02/chroot-ori12.png"><img class="aligncenter size-large wp-image-728" alt="chroot-ori1" src="http://linuxexplore.files.wordpress.com/2013/02/chroot-ori12.png?w=610" width="610" height="328" /></a></pre>
<h2>sshd Server Configuration:</h2>
<p>Add the following tail output to your Linux box&#8217;s SSH</p>
<p>server configuration file /etc/ssh/sshd_config.</p>
<pre>[rahulpanwar@myhost ~]# tail -6 /etc/ssh/sshd_config
#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
Match Group www-hosting
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no</pre>
<p lang="en-IN">Then restart sshd service to enable this configuration.</p>
<pre>[rahulpanwar@myhost ~]# sudo /etc/init.d/sshd restart</pre>
<h2>Create Chroot Users:</h2>
<pre>[rahulpanwar@myhost ~]# sudo mkdir /etc/skel/public_html
[rahulpanwar@myhost ~]# sudo groupadd www-hosting
[rahulpanwar@myhost ~]# sudo useradd -s /sbin/nologin -g www-hosting linuxexplore.com</pre>
<h2>Setting Permissions:</h2>
<pre>[rahulpanwar@myhost ~]# sudo chown root:www-hosting /home/linuxexplore.com
[rahulpanwar@myhost ~]# sudo chmod 755 /home/linuxexplore.com</pre>
<p lang="en-IN">That’s all now create multiple users for web hosting, and offer the secure sftp access to your customers.</p>
<h2>Shell Script to Create Web Hosting Users:</h2>
<pre>#!/bin/bash
HOSTING_DIR="/etc/skel/public_html"
CHROOT_GRP="www-hosting"
USR_NAME="$1"

[ ! -d "$HOSTING_DIR" ] &amp;&amp; mkdir -p $HOSTING_DIR
grep ^"${CHROOT_GRP}:" /etc/group || /usr/sbin/groupadd www-hosting
grep ^"${USR_NAMEP}:" /etc/passwd || /usr/sbin/useradd -s /sbin/nologin -g $CHROO_GRP $USR_NAME
chown root:$CHROOT_GRP /home/$USR_NAME
chmod 755 /home/$USR_NAME</pre>
<h2>Selinux Configuration:</h2>
<p lang="en-IN"><a title="Selinux disable temporarily or permanently" href="http://linuxexplore.com/2012/08/04/selinux-disable-temporarily-or-permanently/" target="_blank">Disable the selinux permanently</a> or configure it for read write user&#8217;s home directory in SSH chroot.</p>
<pre>[rahulpanwar@myhost ~]# sudo setsebool -P ssh_chroot_rw_homedirs on
<span style="color:#333333;"><span style="font-family:Monaco, Consolas, Andale Mono, DejaVu Sans Mono, monospace;"><span style="font-size:small;">[rahulpanwar@myhost ~]# sudo restorecon -R /home/$USERNAME</span></span></span></pre>
<h2>Troubleshooting</h2>
<p lang="en-IN">From: <span style="color:#0000ff;"><span style="text-decoration:underline;"><a href="https://wiki.archlinux.org/index.php/SFTP-chroot">https://wiki.archlinux.org/index.php/SFTP-chroot</a></span></span></p>
<pre>sshd[3505]: fatal: bad ownership or modes for chroot directory "/home/linuxexplore.com"</pre>
<p>It&#8217;s ChrootDirectory ownership problem, sshd will reject sftp connections to accounts that are set to chroot into any directory that has ownership/permissions that sshd doesn&#8217;t consider secure. sshd&#8217;s apparently strict ownership/permissions requirements dictate that every directory in the chroot path must be owned by root and only writable for the owner. So, for example, if the chroot environment is in a user&#8217;s home directory both /home and /home/username must be owned by root and have permissions like 755 or 750 ( group ownership should allow user to access ).</p>
<p>If you are using sftp with public key check the following link:</p>
<p><a href="http://www.centos.org/modules/newbb/viewtopic.php?topic_id=37903&amp;forum=59">http://www.centos.org/modules/newbb/viewtopic.php?topic_id=37903&amp;forum=59</a></p>
<p>If chroot environment is in user&#8217;s home directory, make sure user have access to its home directory, or user would not be able to access its publickey, produce the error given in above <a title="CentOS 6" href="http://centos.org" target="_blank">CentOS</a> forum link.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.linuxexplore.com/2013/02/20/chroot-sftp-users-for-web-hosting-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Can Linux crashes in just one command?</title>
		<link>https://blog.linuxexplore.com/2012/07/29/can-linux-crashes-in-just-one-command/</link>
		<comments>https://blog.linuxexplore.com/2012/07/29/can-linux-crashes-in-just-one-command/#comments</comments>
		<pubDate>Sun, 29 Jul 2012 10:30:02 +0000</pubDate>
		<dc:creator><![CDATA[linuxexplore]]></dc:creator>
				<category><![CDATA[Linux Explore Tips & Tricks]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fork bomb]]></category>
		<category><![CDATA[intowire]]></category>
		<category><![CDATA[limits.conf]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux crash]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[ulimit]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://linuxexplore.wordpress.com/?p=503</guid>
		<description><![CDATA[After a very nice discussion over Linux vs Windows between the group members, all the Linux &#38; Windows supporter was trying to prove their OS better. One of the Windows supporter write a text string (can say a command) to execute in a Linux terminal, which can crash it in just one enter. WARNING!!!: DON&#8217;T&#8230;]]></description>
				<content:encoded><![CDATA[<p>After a very nice discussion over Linux vs Windows between the group members, all the Linux &amp; Windows supporter was trying to prove their OS better.</p>
<p>One of the Windows supporter write a text string (can say a command) to execute in a Linux terminal, which can crash it in just one enter.</p>
<p><span style="color:#ff0000;"><strong>WARNING!!!:</strong> DON&#8217;T USE THIS IN YOUR RUNNING SYSTEM, YOU CAN CRASH IT WITH JUST ONE ENTER. IF YOU DO THAT ONLY YOU WILL BE RESPONSIBLE FOR THE CONSEQUENCES.</span></p>
<pre style="padding-left:30px;"># :(){ :|:&amp; };:</pre>
<p>And truly this command was doing the same, CRASHING THE LINUX IN JUST ONE ENTER.</p>
<p>Solution must be there, off course it is.</p>
<p style="text-align:center;"><a href="http://linuxexplore.files.wordpress.com/2012/07/300px-fork_bomb-svg.png"><img class="aligncenter size-full wp-image-505" title="300px-Fork_bomb.svg" src="http://linuxexplore.files.wordpress.com/2012/07/300px-fork_bomb-svg.png" alt="Fork bomb" width="300" height="185" /></a></p>
<p><a href="http://www.intowire.com/iWiRE/blog/view/45603/can-linux-crashes-in-just-one-command#.UBUNCHWhWoE.wordpress">Read full story</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.linuxexplore.com/2012/07/29/can-linux-crashes-in-just-one-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure syslog to print the Security violation alarm on user terminal (via Linux Explore)</title>
		<link>https://blog.linuxexplore.com/2010/06/20/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal-via-linux-explore/</link>
		<comments>https://blog.linuxexplore.com/2010/06/20/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal-via-linux-explore/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 17:47:28 +0000</pubDate>
		<dc:creator><![CDATA[linuxexplore]]></dc:creator>
				<category><![CDATA[Linux Explore Tips & Tricks]]></category>
		<category><![CDATA[Message on Linux terminal]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Rsyslog]]></category>
		<category><![CDATA[rsyslog.conf]]></category>
		<category><![CDATA[Syslog]]></category>

		<guid isPermaLink="false">http://linuxexplore.wordpress.com/2010/06/20/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal-via-linux-explore/</guid>
		<description><![CDATA[Open the /etc/rsyslog.conf file for syslog configuration in fedora Linux (some linux like CentOS has /etc/syslog.conf). It will show the something similar as given below: # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.*                                                 /dev/console # Log anything (except mail) of level info or higher. # Don&#8217;t&#8230;]]></description>
				<content:encoded><![CDATA[<blockquote style="overflow:hidden;"><p>Open the /etc/rsyslog.conf file for syslog configuration in fedora Linux (some linux like CentOS has /etc/syslog.conf). It will show the something similar as given below: # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.*                                                 /dev/console # Log anything (except mail) of level info or higher. # Don&#8217;t log private authentication messages! *.info;mail.none;authpriv … <a title="Configure syslog to print the Security violation alarm on user terminal" href="http://linuxexplore.com/2009/09/15/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal/" target="_blank">Read More: Configure syslog to print the Security violation alarms </a></p></blockquote>
<p>via <a title="Linux Explore" href="http://linuxexplore.com" target="_blank">Linux Explore</a></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.linuxexplore.com/2010/06/20/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal-via-linux-explore/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configure syslog to print the Security violation alarm on user terminal</title>
		<link>https://blog.linuxexplore.com/2009/09/15/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal/</link>
		<comments>https://blog.linuxexplore.com/2009/09/15/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 18:26:12 +0000</pubDate>
		<dc:creator><![CDATA[linuxexplore]]></dc:creator>
				<category><![CDATA[Linux Explore Tips & Tricks]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Tips]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[password voilation]]></category>
		<category><![CDATA[Rsyslog]]></category>
		<category><![CDATA[rsyslog.conf]]></category>
		<category><![CDATA[Syslog]]></category>
		<category><![CDATA[syslog.conf]]></category>

		<guid isPermaLink="false">http://linuxexplore.wordpress.com/?p=161</guid>
		<description><![CDATA[Open the /etc/rsyslog.conf file for syslog configuration in fedora Linux (some linux like CentOS has /etc/syslog.conf). It will show the something similar as given below: # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.*                                                 /dev/console # Log anything (except mail) of level info or higher. # Don&#8217;t&#8230;]]></description>
				<content:encoded><![CDATA[<p>Open the <strong>/etc/rsyslog.conf</strong> file for syslog configuration in fedora Linux (some linux like CentOS has /etc/syslog.conf). It will show the something similar as given below:</p>
<table style="height:364px;" width="477" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"># Log all kernel messages to the console.</td>
</tr>
<tr>
<td valign="top" width="638"># Logging much else clutters up the screen.</td>
</tr>
<tr>
<td valign="top" width="638">#kern.*                                                 /dev/console</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># Log anything (except mail) of level info or higher.</td>
</tr>
<tr>
<td valign="top" width="638"># Don&#8217;t log private authentication messages!</td>
</tr>
<tr>
<td valign="top" width="638">*.info;mail.none;authpriv.none;cron.none                /var/log/messages</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># The authpriv file has restricted access.</td>
</tr>
<tr>
<td valign="top" width="638">authpriv.*                                              /var/log/secure</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># Log all the mail messages in one place.</td>
</tr>
<tr>
<td valign="top" width="638">mail.*                                                  -/var/log/maillog</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># Log cron stuff</td>
</tr>
<tr>
<td valign="top" width="638">cron.*                                                  /var/log/cron</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># Everybody gets emergency messages</td>
</tr>
<tr>
<td valign="top" width="638">*.emerg                                                 *</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># Save news errors of level crit and higher in a special file.</td>
</tr>
<tr>
<td valign="top" width="638">uucp,news.crit                                          /var/log/spooler</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
<tr>
<td valign="top" width="638"># Save boot messages also to boot.log</td>
</tr>
<tr>
<td valign="top" width="638">local7.*                                                /var/log/boot.log</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
</tbody>
</table>
<p>Add a new line in this file, as follows:</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"># root will gets login failure messages on its terminal</td>
</tr>
<tr>
<td valign="top" width="638">authpriv.warning                                        root</td>
</tr>
</tbody>
</table>
<p>You can also add multiple users with comma separated like</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"># root will gets login failure messages on its terminal</td>
</tr>
<tr>
<td valign="top" width="638">authpriv.warning                                        root,Rahul</td>
</tr>
</tbody>
</table>
<p>After doing the changes on syslog configuration file, restart the syslog service by following command.</p>
<table style="height:13px;" width="638" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"># service rsyslog start</td>
</tr>
<tr>
<td valign="top" width="638"></td>
</tr>
</tbody>
</table>
<p>Now you can get the live information directly on your terminal, if someone trying to do a password attack.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.linuxexplore.com/2009/09/15/configure-syslog-to-print-the-security-violation-alarm-on-user-terminal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
