<?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>Ali Aboosaidi &#187; iptables</title>
	<atom:link href="http://insanelabs.com/tag/iptables/feed/" rel="self" type="application/rss+xml" />
	<link>http://insanelabs.com</link>
	<description>Umm... Unorthodox?</description>
	<lastBuildDate>Tue, 08 Nov 2011 21:04:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Linux: Apache Tomcat tips and tricks</title>
		<link>http://insanelabs.com/linux/linux-apache-tomcat-tips-and-tricks/</link>
		<comments>http://insanelabs.com/linux/linux-apache-tomcat-tips-and-tricks/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 21:14:31 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jre]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://insanelabs.com/?p=209</guid>
		<description><![CDATA[JAVA_HOME or JRE_HOME variables are not defined: Edit bash_profile for the user running Tomcat: nano ~/.bash_profile Add the following line and edit to point to correct directory: export JRE_HOME=/usr/local/jre Save and exit, then execute the following command: source ~/.bash_profile Running Apache Tomcat on privileged ports (lower then 1024) as non-root user: The best way is [...]
Related posts:<ol>
<li><a href="http://insanelabs.com/linux/linux-run-tomcat-with-apache-mod_jk-configuration/" rel='bookmark' title='Linux: Run tomcat with apache &#8211; mod_jk configuration' class="liinternal">Linux: Run tomcat with apache &#8211; mod_jk configuration</a></li>
<li><a href="http://insanelabs.com/linux/apache-namevirtualhost-80-has-no-virtualhosts-error-message/" rel='bookmark' title='Apache: NameVirtualHost *:80 has no VirtualHosts error message' class="liinternal">Apache:  NameVirtualHost *:80 has no VirtualHosts error message</a></li>
<li><a href="http://insanelabs.com/linux/linux-reset-iptables-firewall-rules/" rel='bookmark' title='Linux: Reset iptables firewall rules' class="liinternal">Linux: Reset iptables firewall rules</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>JAVA_HOME or JRE_HOME variables are not defined:</p>
<p>Edit bash_profile for the user running Tomcat:</p>
<pre>nano ~/.bash_profile</pre>
<p>Add the following line and edit to point to correct directory:</p>
<pre>export JRE_HOME=/usr/local/jre</pre>
<p>Save and exit, then execute the following command:</p>
<pre>source ~/.bash_profile</pre>
<p>Running Apache Tomcat on privileged ports (lower then 1024) as non-root user:</p>
<p>The best way is to set an iptables rule to forwards incoming requests from port 80 to 8080:</p>
<pre>iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080</pre>
<p><a href="http://insanelabs.com/linux/linux-run-tomcat-with-apache-mod_jk-configuration/" class="liinternal">or setup apache with mod_jk connector to pass http requests to tomcat</a></p>
<p>Related posts:<ol>
<li><a href="http://insanelabs.com/linux/linux-run-tomcat-with-apache-mod_jk-configuration/" rel='bookmark' title='Linux: Run tomcat with apache &#8211; mod_jk configuration' class="liinternal">Linux: Run tomcat with apache &#8211; mod_jk configuration</a></li>
<li><a href="http://insanelabs.com/linux/apache-namevirtualhost-80-has-no-virtualhosts-error-message/" rel='bookmark' title='Apache: NameVirtualHost *:80 has no VirtualHosts error message' class="liinternal">Apache:  NameVirtualHost *:80 has no VirtualHosts error message</a></li>
<li><a href="http://insanelabs.com/linux/linux-reset-iptables-firewall-rules/" rel='bookmark' title='Linux: Reset iptables firewall rules' class="liinternal">Linux: Reset iptables firewall rules</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://insanelabs.com/linux/linux-apache-tomcat-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Reset iptables firewall rules</title>
		<link>http://insanelabs.com/linux/linux-reset-iptables-firewall-rules/</link>
		<comments>http://insanelabs.com/linux/linux-reset-iptables-firewall-rules/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 00:24:47 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://insanelabs.com/?p=91</guid>
		<description><![CDATA[Create a shell script (iptables_flush.sh) and copy paste the following lines: #!/bin/sh echo "Flushing iptables rules..." sleep 1 iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT Make the file executable chmod [...]
Related posts:<ol>
<li><a href="http://insanelabs.com/linux/linux-mount-remote-windows-shares-with-smbfs/" rel='bookmark' title='Linux: Mount remote Windows shares with smbfs' class="liinternal">Linux: Mount remote Windows shares with smbfs</a></li>
<li><a href="http://insanelabs.com/linux/linux-vsftpd-and-symbolic-links/" rel='bookmark' title='Linux: vsftpd and symbolic links' class="liinternal">Linux: vsftpd and symbolic links</a></li>
<li><a href="http://insanelabs.com/linux/linux-apache-tomcat-tips-and-tricks/" rel='bookmark' title='Linux: Apache Tomcat tips and tricks' class="liinternal">Linux: Apache Tomcat tips and tricks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Create a shell script (iptables_flush.sh) and copy paste the following lines:</p>
<pre>#!/bin/sh
echo "Flushing iptables rules..."
sleep 1
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT</pre>
<p>Make the file executable</p>
<pre>chmod +x iptables_flush.sh</pre>
<p>and run the script:</p>
<pre>./iptables_flush.sh</pre>
<p>Related posts:<ol>
<li><a href="http://insanelabs.com/linux/linux-mount-remote-windows-shares-with-smbfs/" rel='bookmark' title='Linux: Mount remote Windows shares with smbfs' class="liinternal">Linux: Mount remote Windows shares with smbfs</a></li>
<li><a href="http://insanelabs.com/linux/linux-vsftpd-and-symbolic-links/" rel='bookmark' title='Linux: vsftpd and symbolic links' class="liinternal">Linux: vsftpd and symbolic links</a></li>
<li><a href="http://insanelabs.com/linux/linux-apache-tomcat-tips-and-tricks/" rel='bookmark' title='Linux: Apache Tomcat tips and tricks' class="liinternal">Linux: Apache Tomcat tips and tricks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://insanelabs.com/linux/linux-reset-iptables-firewall-rules/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

