<?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>Digital Journal &#187; Network</title>
	<atom:link href="http://digitaljournal.sg/wp/?cat=6&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://digitaljournal.sg/wp</link>
	<description>My Digital Journal</description>
	<lastBuildDate>Mon, 20 Oct 2014 00:32:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Send email notification on successful ssh login using ssmtp</title>
		<link>http://digitaljournal.sg/wp/?p=133</link>
		<comments>http://digitaljournal.sg/wp/?p=133#comments</comments>
		<pubDate>Thu, 15 Nov 2012 01:33:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Tips&Info]]></category>
		<category><![CDATA[Send email notification on successful ssh login using ssmtp]]></category>
		<category><![CDATA[ssh login notification]]></category>
		<category><![CDATA[ssmtp tips]]></category>

		<guid isPermaLink="false">http://digitaljournal.sg/wp/?p=133</guid>
		<description><![CDATA[Sometime i wants to know who is login and when user login to my server  but i don&#8217;t want to setup and run my own mail server, this can be done easily by using tcpwrapper and ssmtp , first make sure ssmtp is installed # dpkg -l&#124;grep ssmtp iF  ssmtp                                  2.64-4fakesync1                                 extremely simple MTA to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime i wants to know who is login and when user login to my server  but i don&#8217;t want to setup and run my own mail server, this can be done easily by using tcpwrapper and ssmtp , first make sure ssmtp is installed</p>
<p><strong><em># dpkg -l|grep ssmtp</em></strong><br />
iF  ssmtp                                  2.64-4fakesync1                                 extremely simple MTA to get mail off the sys</p>
<p>&nbsp;</p>
<p>if ssmtp is not installed yet, install it by using</p>
<p><em><strong># apt-get install ssmtp</strong></em></p>
<p>&nbsp;</p>
<p>If you are using Gmail account , change the <em>root</em>, <em>authuser</em>, and <em>authpass</em> options to the email address, username, and password of your email account. If you’re using another mail service you’ll need to change <em>mailhub</em> to the relevant SMTP server.</p>
<p>edit /etc/ssmtp/ssmtp.conf and add these lines</p>
<p><code>--------------------------------------------<br />
root=alert@example.com<br />
mailhub=smtp.example.com:587<br />
rewriteDomain=<br />
hostname=smtp.example.com:587<br />
UseSTARTTLS=YES<br />
UseTLS=YES<br />
AuthUser=alert@example.com<br />
AuthPass=password<br />
AuthMethod=LOGIN<br />
FromLineOverride=YES # optional<br />
--------------------------------------------</code></p>
<p>&nbsp;</p>
<p>Change the &#8216;From&#8217; text by editing /etc/passwd to receive mail from &#8216;root@server1.example.com&#8217; instead of just &#8216;root&#8217;.<br />
<strong># chfn -f root@server1.example.com root</strong><em><br />
</em></p>
<p>edit /etc/ssmtp/revaliases and add this line or add more line for another user<br />
<code>--------------------------------------------<br />
# sSMTP aliases<br />
#<br />
# Format:    local_account:outgoing_address:mailhub<br />
#<br />
# Example: root:your_login@your.domain:mailhub.your.domain[:port]<br />
# where [:port] is an optional port number that defaults to 25.<br />
root:alert@example.com:smtp.example.com:587<br />
--------------------------------------------</code></p>
<p>to test it</p>
<p><em><strong># echo &#8220;test send email using ssmtp|mail -s &#8220;TEST&#8221; alert@example.com</strong></em></p>
<p>&nbsp;</p>
<p>once you are able to receive that test message, proceed to edit /etc/hosts.allow and add these 2 lines, so you will be notified if someone login to your sever</p>
<p><code>--------------------------------------------<br />
SSHD: ALL: spawn (/bin/echo "SSH connection to %H from %h[%a]" | \<br />
/usr/bin/mail -s "SSH Login Alert [server1.example.com]" alert@example.com)<br />
--------------------------------------------</code></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://digitaljournal.sg/wp/?feed=rss2&#038;p=133</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ip_conntrack: table full, dropping packet</title>
		<link>http://digitaljournal.sg/wp/?p=119</link>
		<comments>http://digitaljournal.sg/wp/?p=119#comments</comments>
		<pubDate>Thu, 25 Oct 2012 09:31:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Tips&Info]]></category>
		<category><![CDATA[dropping packet]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ip_conntrack]]></category>
		<category><![CDATA[ip_conntrack: table full]]></category>
		<category><![CDATA[table full]]></category>

		<guid isPermaLink="false">http://digitaljournal.sg/wp/?p=119</guid>
		<description><![CDATA[Today i found this message in one of my server, although the server&#8217;s load is quite low. using dmesg , i kept getting this, and it kept coming ip_conntrack: table full, dropping packet I&#8217;d seen this message before, but I headed over to Red Hat&#8217;s site for more details. Generally, the ip_conntrack_max is set to [...]]]></description>
			<content:encoded><![CDATA[<p>Today i found this message in one of my server, although the server&#8217;s load is quite low. using dmesg , i kept getting this, and it kept coming<br />
ip_conntrack: table full, dropping packet</p>
<p>I&#8217;d seen this message before, but I headed over to Red Hat&#8217;s site for more details. Generally, the ip_conntrack_max is set to the total MB of RAM installed multiplied by 16. However, this server had 4GB of RAM, but ip_conntrack_max was set to 65536:</p>
<p><strong><em># cat /proc/sys/net/ipv4/ip_conntrack_max</em></strong><br />
65536</p>
<p>&nbsp;</p>
<p>If you want to check your server&#8217;s current tracked connections, just run the following:</p>
<p><strong><em># cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count</em></strong></p>
<p>&nbsp;</p>
<p>If you want to adjust it, just run the following as root:<br />
<strong><em># echo 131072 &gt; /proc/sys/net/ipv4/ip_conntrack_max</em></strong></p>
<p>&nbsp;</p>
<p>If you want to find out how many sessions are open right now:<br />
<strong><em># wc -l /proc/net/ip_conntrack</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://digitaljournal.sg/wp/?feed=rss2&#038;p=119</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
