<?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>Hack Admin &#187; Security</title>
	<atom:link href="http://www.hackadmin.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hackadmin.com</link>
	<description></description>
	<lastBuildDate>Tue, 16 Mar 2010 21:31:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Recover a Lost MySQL Password</title>
		<link>http://www.hackadmin.com/2010/02/20/how-to-recover-a-lost-mysql-password/</link>
		<comments>http://www.hackadmin.com/2010/02/20/how-to-recover-a-lost-mysql-password/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 18:23:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aashish]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.hackadmin.com/?p=256</guid>
		<description><![CDATA[This article explains the process that will allow you to recover a lost MySQL password:

Stop the MySQL server process]]></description>
			<content:encoded><![CDATA[<p>Article by <a href="http://www.hackadmin.com/aashish/">Aashish</a></p>
<p>This article explains the process that will allow you to recover a lost MySQL password:</p>
<p>Stop the MySQL server process</p>
<p>Start the MySQL (mysqld) server/daemon process with the<br />
&#8211;skip-grant-tables option so that it will not prompt for password.</p>
<p><span id="more-256"></span></p>
<p>Connect to mysql server as the root user.</p>
<p>Setup new mysql root account password.</p>
<p>Exit and restart the MySQL server.</p>
<p><strong>Example:</strong></p>
<p># service mysqld stop</p>
<p><strong>Output:</strong></p>
<p>Stopping MySQL database server: mysqld.</p>
<p>Then start MySql in safe mode</p>
<p># mysqld_safe &#8211;skip-grant-tables</p>
<p><strong>Output</strong></p>
<p>[1] 5988<br />
Starting mysqld daemon with databases from /var/lib/mysql</p>
<p>Then connect the mysql without any password</p>
<p># mysql -u root</p>
<p>( Then setup password )</p>
<p>mysql&gt; use mysql;</p>
<p>mysql&gt; update user set password=PASSWORD(&#8221;NEW-ROOT-PASSWORD&#8221;) where User=&#8217;root&#8217;;</p>
<div id=":1it">
<p>mysql&gt; flush privileges;</p>
<p>mysql&gt; quit</p>
<p>Then stop mysql</p>
<p># service mysql stop</p>
<p># service mysql start</p>
<p>Then Try your new password :</p>
<p># mysql -u root -p</p>
<p>Good Luck!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.hackadmin.com/2010/02/20/how-to-recover-a-lost-mysql-password/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Port Redirection through the iptables</title>
		<link>http://www.hackadmin.com/2010/02/19/port-redirection-through-the-iptables/</link>
		<comments>http://www.hackadmin.com/2010/02/19/port-redirection-through-the-iptables/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 03:44:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aashish]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://www.hackadmin.com/?p=254</guid>
		<description><![CDATA[How do I redirect 80 port to 8123 using iptables?

You can easily redirect incoming traffic by inserting rules into PREROUTING chain of the nat table. You can set destination port using the REDIRECT target.]]></description>
			<content:encoded><![CDATA[<p>Article by <a href="http://www.hackadmin.com/aashish/">Aashish</a></p>
<p><strong> </strong>How do I redirect 80 port to 8123 using iptables?</p>
<p>You can easily redirect incoming traffic by inserting rules into PREROUTING chain of the nat table. You can set destination port using the REDIRECT target.</p>
<p><span id="more-254"></span><br />
<strong>Syntax<br />
</strong><br />
The syntax is as follows to redirect tcp $srcPortNumber port to $dstPortNumber:</p>
<p>iptables -t nat -A PREROUTING -i eth0 -p tcp &#8211;dport $srcPortNumber -j REDIRECT &#8211;to-port $dstPortNumbe</p>
<p>The syntax is as follows to redirect udp $srcPortNumber port to $dstPortNumber:</p>
<p>iptables -t nat -A PREROUTING -i eth0 -p udp &#8211;dport $srcPortNumber -j REDIRECT &#8211;to-port $dstPortNumber</p>
<p>Replace eth0 with your actual interface name. The following syntax match for source and destination ips:</p>
<p>iptables -t nat -I PREROUTING &#8211;src $SRC_IP_MASK &#8211;dst $DST_IP -p tcp &#8211;dport $portNumber -j REDIRECT &#8211;to-ports $rediectPort</p>
<p><strong>Examples:</strong></p>
<p>In The following example redirects TCP port 25 to port 2525:</p>
<p># iptables -t nat -A PREROUTING -i eth0 -p tcp &#8211;dport 25 -j REDIRECT &#8211;to-port 2525</p>
<p>this example all incoming traffic on port 80 redirect to port 8123</p>
<p># iptables -t nat -I PREROUTING &#8211;src 0/0 &#8211;dst 192.168.1.5 -p tcp &#8211;dport 80 -j REDIRECT &#8211;to-ports 8123</p>
<p><strong>How Do I View NAT Rules?</strong></p>
<p>Type the following command:</p>
<p># iptables -t nat -L -n -v</p>
<p><strong>How Do I Save NAT Redirect Rules?</strong></p>
<p>Type the following command:</p>
<p># iptables-save</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackadmin.com/2010/02/19/port-redirection-through-the-iptables/feed/</wfw:commentRss>
		<slash:comments>63</slash:comments>
		</item>
		<item>
		<title>How to Create Connection Limits with Iptables</title>
		<link>http://www.hackadmin.com/2010/02/18/how-to-create-connection-limits-with-iptables/</link>
		<comments>http://www.hackadmin.com/2010/02/18/how-to-create-connection-limits-with-iptables/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 15:21:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aashish]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[centos]]></category>

		<guid isPermaLink="false">http://www.hackadmin.com/?p=243</guid>
		<description><![CDATA[How do I restrict the number of connections used by a single IP address to my server for port 80 and 25 using iptables?

You need to use the connection limit modules which allows you to restrict the number of parallel TCP connections to a server per client IP address (or address block). This is useful to protect your server or vps box against flooding, spamming or content scraping.]]></description>
			<content:encoded><![CDATA[<p>Article by <a href="http://www.hackadmin.com/aashish/">Aashish</a><br />
<span style="border-collapse: collapse; font-family: arial,sans-serif; font-size: 13px;"><span style="font-size: medium;"><strong></strong></span></span></p>
<p>How do I restrict the number of connections used by a single IP address to my server for port 80 and 25 using iptables?</p>
<p>You need to use the connection limit modules which allows you to restrict the number of parallel TCP connections to a server per client IP address (or address block). This is useful to protect your server or vps box against flooding, spamming or content scraping.</p>
<p><span id="more-243"></span><br />
<strong>Syntax</strong><br />
The syntax is as follows:</p>
<p># /sbin/iptables -A INPUT -p tcp &#8211;syn &#8211;dport $port -m connlimit &#8211;connlimit-above N -j REJECT &#8211;reject-with tcp-reset</p>
<p>save the changes see iptables-save man page, the following is redhat and friends specific command service iptables save</p>
<p><strong>Example</strong>: Limit SSH Connections Per IP / Host</p>
<p>Only allow 3 ssh connections per client host:</p>
<p># /sbin/iptables  -A INPUT -p tcp &#8211;syn &#8211;dport 22 -m connlimit &#8211;connlimit-above 3 -j REJECT</p>
<p>save the changes see iptables-save man page, the following is redhat and friends specific command service iptables save</p>
<p><strong>Example</strong>: Limit HTTP Connections Per IP / Host</p>
<p>Only allow 20 http connections per IP (MaxClients is set to 60 in httpd.conf):</p>
<p># /sbin/iptables -A INPUT -p tcp &#8211;syn &#8211;dport 80 -m connlimit &#8211;connlimit-above 20 -j REJECT &#8211;reject-with tcp-reset<br />
save the changes see iptables-save man page, the following is redhat and friends specific command service iptables save</p>
<p><strong>Skip proxy server IP 1.2.3.4 from this kind of limitations:</strong></p>
<p># /sbin/iptables -A INPUT -p tcp &#8211;syn &#8211;dport 80 -d ! 1.2.3.4 -m connlimit-above 20 -j REJECT &#8211;reject-with tcp-reset</p>
<p>Enjoy it&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackadmin.com/2010/02/18/how-to-create-connection-limits-with-iptables/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>Chroot Jail for Untrusted Users</title>
		<link>http://www.hackadmin.com/2008/03/29/chroot-jail-for-untrusted-users/</link>
		<comments>http://www.hackadmin.com/2008/03/29/chroot-jail-for-untrusted-users/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 10:55:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[chroot]]></category>
		<category><![CDATA[Chroot Jail]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.hackadmin.com/2008/03/29/chroot-jail-for-untrusted-users/</guid>
		<description><![CDATA[So we&#8217;ve been buying some websites recently and I&#8217;ve needed to let people into the web server to upload content and such.  I knew I needed to put these folks someplace where they couldn&#8217;t hurt anything else, or more importantly, see anything else on the server.  So, I went digging around for an [...]]]></description>
			<content:encoded><![CDATA[<p>So we&#8217;ve been buying some websites recently and I&#8217;ve needed to let people into the web server to upload content and such.  I knew I needed to put these folks someplace where they couldn&#8217;t hurt anything else, or more importantly, see anything else on the server.  So, I went digging around for an FAQ on how to most effectively get this done and I came across this script:</p>
<p><span id="more-3"></span><a title="Chroot Jail" href="http://www.fuschlberger.net/programs/ssh-scp-sftp-chroot-jail/make_chroot_jail.sh.html">Chroot Jail</a></p>
<p>It&#8217;s quite nice.</p>
<p>Basically, you just pull that script down and get it on your machine.  Then you feed it a username and let it go to work.</p>
<p>When it&#8217;s done, you&#8217;ll have a new user who is isolated to /home/jail.  Their home dir will be in /home/jail/home and they can shell in and do whatever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackadmin.com/2008/03/29/chroot-jail-for-untrusted-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

