<?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 and Unix technical recipes &#187; CentOS</title>
	<atom:link href="http://www.howtonix.com/category/linux/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtonix.com</link>
	<description>Linux Tutorial and Guide</description>
	<lastBuildDate>Thu, 30 Sep 2010 23:41:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Squid Proxy Server Mac Address based filtering</title>
		<link>http://www.howtonix.com/squid-proxy-server-mac-address-based-filtering/</link>
		<comments>http://www.howtonix.com/squid-proxy-server-mac-address-based-filtering/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:44:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Squid Proxy server Mac Filtering]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=158</guid>
		<description><![CDATA[google_ad_client = "pub-4492234592142803"; /* 468x60, created 9/1/10 howtonix */ google_ad_slot = "5691725759"; google_ad_width = 468; google_ad_height = 60; To set up ACL&#8217;s based on MAC address: Open squid.conf: # vi /etc/squid/squid.conf Local acl, section and append ACL as follows: acl macf1 arp mac-address acl macf2 arp 00:11:22:33:44:55 http_access allow macf1 http_access allow macf2 http_access deny [...]]]></description>
			<content:encoded><![CDATA[
<!-- Quick Adsense WordPress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<script type="text/javascript">

google_ad_client = "pub-4492234592142803";
/* 468x60, created 9/1/10 howtonix */
google_ad_slot = "5691725759";
google_ad_width = 468;
google_ad_height = 60;


</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<h2>To set up ACL&#8217;s based on MAC address:</h2>
<p>Open squid.conf:</p>
<blockquote>
<p># vi /etc/squid/squid.conf</p></blockquote>
<p>Local acl, section and append ACL as follows:</p>
<blockquote><p>acl macf1 arp mac-address<br />
acl macf2 arp 00:11:22:33:44:55<br />
http_access allow macf1<br />
http_access allow macf2<br />
http_access deny all
</p></blockquote>
<p>Save and close the file. Restart squid server:</p>
<blockquote><p># /etc/init.d/squid restart</p></blockquote>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/squid-proxy-server-mac-address-based-filtering/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to disable SELinux in CentOS?</title>
		<link>http://www.howtonix.com/disable-selinux-centos/</link>
		<comments>http://www.howtonix.com/disable-selinux-centos/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:32:30 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[SELinux Security Firewall]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=154</guid>
		<description><![CDATA[In Fedora Core and RedHat Enterprise or CentOS, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled That&#8217;s all.]]></description>
			<content:encoded><![CDATA[<p>In Fedora Core and RedHat Enterprise or CentOS, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled</p>
<p>That&#8217;s all. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/disable-selinux-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git Tutorial</title>
		<link>http://www.howtonix.com/git-tutorial/</link>
		<comments>http://www.howtonix.com/git-tutorial/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 17:19:55 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[git version control]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=136</guid>
		<description><![CDATA[You have to download your project and place to a folder. $ tar xzf project.tar.gz $ cd project $ git init-db This will initialize your project on git.now you have to add files which will monitored via git. $ git add . these means git will monitor all files. $ git commit -a This will [...]]]></description>
			<content:encoded><![CDATA[<p>You have to download your project and place to a folder.</p>
<blockquote><p>$ tar xzf project.tar.gz<br />
$ cd project<br />
$ git init-db
</p></blockquote>
<p>This will initialize your project on git.now you have to add files which will monitored via git.</p>
<blockquote><p>$ git add .</p></blockquote>
<p>these means git will monitor all files.</p>
<blockquote><p>$ git commit -a</p></blockquote>
<p>This will prompt a message to commit.<br />
Try modifying some files, then run</pre>
<blockquote><p>$git diff</p></blockquote>
<p>to review your changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/git-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to create tar.gz?</title>
		<link>http://www.howtonix.com/how-to-create-tar-gz/</link>
		<comments>http://www.howtonix.com/how-to-create-tar-gz/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 12:23:41 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mandrake]]></category>
		<category><![CDATA[SuSE]]></category>
		<category><![CDATA[Linux Tar Zip Compress untar]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=102</guid>
		<description><![CDATA[You can create tar.gz file with the following command.DO NOT ENTER / after the directory name. tar -cvzf  test.tar.gz test]]></description>
			<content:encoded><![CDATA[<p>You can create tar.gz file with the following command.DO NOT ENTER / after the directory name.</p>
<p>tar -cvzf  test.tar.gz test</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/how-to-create-tar-gz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Install Perl CPAN Module</title>
		<link>http://www.howtonix.com/how-to-install-perl-cpan-module/</link>
		<comments>http://www.howtonix.com/how-to-install-perl-cpan-module/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:47:07 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mandrake]]></category>
		<category><![CDATA[SuSE]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=96</guid>
		<description><![CDATA[From the root prompt on your server, invoke the CPAN shell: # perl -MCPAN -e shell Once the Perl interpreter has loaded (and been configured), you can install modules with: install MODULENAME. The first thing you should do is upgrade your CPAN: cpan&#62; install Bundle::CPAN Once it is completed, type: cpan&#62; reload cpan Now, enter [...]]]></description>
			<content:encoded><![CDATA[<p>From the root prompt on your server, invoke the <acronym>CPAN</acronym> shell:</p>
<pre><code>#</code> <strong><code>perl -MCPAN -e shell</code></strong></pre>
<p>Once the Perl interpreter has loaded (and been configured), you can install modules with: <code>install <em><code>MODULENAME</code></em></code>.</p>
<p>The first thing you should do is upgrade your <acronym>CPAN</acronym>:</p>
<pre><code>cpan&gt;</code> <strong><code>install Bundle::CPAN</code></strong></pre>
<p>Once it is completed, type:</p>
<pre><code>cpan&gt;</code> <strong><code>reload cpan</code></strong></pre>
<pre><strong><code>
Now, enter the following command to retrieve all of the required modules:
<pre><code>cpan&gt;</code> <strong><code>install DateTime</code></strong></pre>
<pre><strong></strong></pre>
<pre><strong><code>
<h3>Note</h3>

Be aware that after freshly installing <code><em><code>make</code></em></code> / <code><em><code>gcc</code></em></code>, your perl installation will not necessarily detect it. This means module installation will still fail during the 'make' stage. You may need to invoke the <acronym>CPAN</acronym> shell and run the setup routine again, to point to the location of <code>make</code>:
<pre><code>#</code><strong><code> <span><strong>perl <code>-MCPAN -e shell CPAN</code></strong></span></code></strong></pre>
<p> </p>
<pre><code>cpan&gt;</code> <strong><code><span><strong>o conf <code>make</code></strong></span> <em><code>/usr/bin/make</code></em></code></strong></pre>
<pre><code>cpan&gt;</code> <strong><code><span><strong>o conf <code>commit</code></strong></span></code></strong></pre>
<pre><strong><code><span><strong></strong></span></code></strong></pre>
<p></code></strong></pre>
<p></code></strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/how-to-install-perl-cpan-module/feed/</wfw:commentRss>
		<slash:comments>342</slash:comments>
		</item>
		<item>
		<title>Text-To-Speech (TTS) from AT&amp;T Research Labs</title>
		<link>http://www.howtonix.com/text-to-speech-tts-from-att-research-labs/</link>
		<comments>http://www.howtonix.com/text-to-speech-tts-from-att-research-labs/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:48:26 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Mandrake]]></category>
		<category><![CDATA[Network Tools]]></category>
		<category><![CDATA[SuSE]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=78</guid>
		<description><![CDATA[Here is the link: http://www.research.att.com/~ttsweb/tts/demo.php]]></description>
			<content:encoded><![CDATA[<p>Here is the link:</p>
<p><a href="http://www.research.att.com/~ttsweb/tts/demo.php">http://www.research.att.com/~ttsweb/tts/demo.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/text-to-speech-tts-from-att-research-labs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>List of TCP and UDP port numbers</title>
		<link>http://www.howtonix.com/list-of-tcp-and-udp-port-numbers/</link>
		<comments>http://www.howtonix.com/list-of-tcp-and-udp-port-numbers/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:46:22 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mandrake]]></category>
		<category><![CDATA[NetBSD]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[SuSE]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=76</guid>
		<description><![CDATA[The following link contains list of TCP and UDP ports: http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers]]></description>
			<content:encoded><![CDATA[<p>The following link contains list of TCP and UDP ports:</p>
<p><a href="http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers">http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/list-of-tcp-and-udp-port-numbers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FreeRADIUS Unique Accouting Id</title>
		<link>http://www.howtonix.com/freeradius-unique-accouting-id/</link>
		<comments>http://www.howtonix.com/freeradius-unique-accouting-id/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:31:52 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=67</guid>
		<description><![CDATA[The rlm_acct_unique module creates a unique accounting session Id. Many NAS vendors have their equipment supply an Acct-Session-Id attribute which is not unique over reboots. This makes accounting difficult, as there will be many independent sessions with the same Acct-Session-Id attribute. This module uses the Acct-Session-Id attribute, along with other attributes in the request, to [...]]]></description>
			<content:encoded><![CDATA[<p>The <em>rlm_acct_unique</em> module creates a unique accounting session Id.</p>
<p>Many NAS vendors have their equipment supply an Acct-Session-Id attribute which is not unique over reboots. This makes accounting difficult, as there will be many independent sessions with the same Acct-Session-Id attribute. This module uses the Acct-Session-Id attribute, along with other attributes in the request, to create a more unique session ID, called Acct-Unique-Session-Id.</p>
<p>The main configuration items to be aware of are:</p>
<dl>
<dt>keyA list of the attributes used in calculating an MD5 hash which is used as the value for the unique session id.</p>
</dt>
</dl>
<h2>Configuration</h2>
<p>modules { &#8230;<br />
acct_unique {</p>
<p>key = &#8220;User-Name, Acct-Session-Id, NAS-IP-Address, NAS-Port&#8221;</p>
<dl>
<dt>}<br />
&#8230;<br />
}<br />
&#8230;<br />
preacct { &#8230;<br />
acct_unique &#8230;<br />
}After generating the MD5 hash, the module adds it to the accounting request packet received from the client. It will look something like this in your detail file:</p>
</dt>
<dd>Acct-Unique-Session-Id = &#8220;c66ef57e480b9d26&#8243; </dd>
<dt>NOTE: Any attribute you specify that is not found in the &#8216;dictionary&#8217; file will cause the server to fail and exit with an error.NOTE: If you want the Acct-Unique-Session-Id of the Start and the Stop packet of a particular session to match, you must use values for the key that will stay the same for the Start and Stop. The above example is a good start. Adding &#8216;Acct-Session-Time&#8217;, for example, would cause a mismatch because that value is not the same on the Start and Stop accounting packets.</p>
</dt>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/freeradius-unique-accouting-id/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to install Opensips</title>
		<link>http://www.howtonix.com/how-to-install-opensips/</link>
		<comments>http://www.howtonix.com/how-to-install-opensips/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:24:11 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[OpenSIPS]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=61</guid>
		<description><![CDATA[Opensips is one of the best solution that are present in opensource, it provide you ITSP level services on good hardware box, Single box configure with opensips can supports 5000-10000 calls at time, which it make any teleco to operate with more then 5-10 billion mins per year. Anyone can use it to support their [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.opensips.org/" target="_blank">Opensips</a> is one of the best solution that are present in opensource, it provide you ITSP level services on good hardware box, Single box configure with opensips can supports 5000-10000 calls at time, which it make any teleco to operate with more then 5-10 billion mins per year. Anyone can use it to support their bussiness which is incuring lot of cost due high hardware cost such as <a href="http://www.howtonix.com/wp-admin/www.e-softbilling.com" target="_blank">iSoftSwitch</a>.</p>
<p>REQUIRMENTS:</p>
<ol>
<li>gcc / suncc / icc : gcc &gt;= 2.9x; 4.[012] recommended (it will work with older version but it might require some options tweaking for best performance)</li>
<li>bison or yacc (Berkley yacc)</li>
<li>flex</li>
<li>GNU make (on Linux this is the standard “make”, on FreeBSD and Solaris is called “gmake”) version &gt;= 3.79.</li>
<li>sed and tr (used in the makefiles)</li>
<li>GNU tar (”gtar” on Solaris) and gzip if you want “make tar” to work</li>
<li>GNU install or BSD install (on Solaris “ginstall”) if you want “make install”, “make bin”, “make sunpkg” to work</li>
<li>openssl if you want to compile the TLS support</li>
<li>libsctp if you want to compile the SCTP support</li>
<li>libmysqlclient &amp; libz (zlib) -libs and devel headers- if you want mysql DB support (the db_mysql module)</li>
<li>libpq / postgresql -libs and devel headers- if you want postgres DB support (the db_postgres module)</li>
<li>unixodbc -libs and devel headers- if you want unixodbc DB support (the db_unixodbc module)</li>
<li>libexpat if you want the jabber gateway support (the jabber module) or the XMPP gateway support</li>
<li>libxml2 if you want to use the cpl-c (Call Processing Language) or the presence modules (presence and pua*)</li>
<li>libradius-ng -libs and devel headers- if you want to use functionalities with radius support – authentication, accounting, group support, etc</li>
<li>unixodbc – libs and devel headers – if you want UNIXODBC support as DB underlayer</li>
<li>libxmlrpc-c3 – libs and devel headers – if you want to have XML-RPC support for the Management interface (MI)</li>
<li>libperl – libs and devel headers – if you want PERL connector to support perl scripting from you config file (perl module)</li>
<li>libsnmp9 – libs and devel headers – if you want SNMP client functionality (SNMP AgentX subagent) for opensips</li>
<li>libldap libs and devel headers v2.1 or greater – if you want LDAP support</li>
<li>libconfuse and devel headers – if you want to compile the carrierroute module</li>
</ol>
<p>INSTALLATION</p>
<ol>
<li>cd /usr/src/</li>
<li>Download opensips (<a href="http://opensips.org/pub/opensips/1.5.0/src/opensips-1.5.0-tls_src.tar.gz">Opensips 1.5</a> wget http://opensips.org/pub/opensips/1.5.0/src/opensips-1.5.0-tls_src.tar.gz)</li>
<li>tar -xzf  opensips-1.5.0-tls_src.tar.gz</li>
<li>make all</li>
<li>make install</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/how-to-install-opensips/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A basic firewall configuration suitable for a gateway/nat</title>
		<link>http://www.howtonix.com/a-basic-firewall-configuration-suitable-for-a-gatewaynat/</link>
		<comments>http://www.howtonix.com/a-basic-firewall-configuration-suitable-for-a-gatewaynat/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 05:50:49 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Mandrake]]></category>
		<category><![CDATA[SuSE]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=55</guid>
		<description><![CDATA[Introduction The field of application of a NAT Gateway is in example a private LAN consisting of several PC with an Internet connection with one public IP address. The goal is to share the Internet connection among the LAN PCs. The problem is that there is only one public IP for outbound traffic. The solution [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>The field of application of a <a title="NAT" href="http://wiki.linuxquestions.org/wiki/NAT">NAT</a> Gateway is in example a private <a title="http://en.wikipedia.org/wiki/LAN" rel="nofollow" href="http://en.wikipedia.org/wiki/LAN">LAN</a> consisting of several <a title="http://en.wikipedia.org/wiki/Personal_computer" rel="nofollow" href="http://en.wikipedia.org/wiki/Personal_computer">PC</a> with an <a title="http://en.wikipedia.org/wiki/Internet" rel="nofollow" href="http://en.wikipedia.org/wiki/Internet">Internet</a> connection with one public IP address.</p>
<ul>
<li>The goal is to share the Internet connection among the LAN PCs.</li>
<li>The problem is that there is only one public IP for outbound traffic.</li>
<li>The solution is &#8220;<em>Network Address Translation</em>&#8221; (or NAT for short).</li>
</ul>
<p>The Gateway (GW) is equipped with two network interfaces. One gets assigned the public IP, the second a private IP (i.e. 192.168.0.1). Every other LAN PCs has it&#8217;s own private IP (i.e. 192.168.0.2). If an outbound connection is requested the LAN PC talks to the gateway which masquerades the outbound traffic using the public IP. So every external connection looks like if it is coming from only one PC.</p>
<p>The basic firewalling will prevent all connections from outside with the exception of <a title="SSH" href="http://wiki.linuxquestions.org/wiki/SSH">SSH</a> (port 22) which we leave open for service purposes (i.e.).</p>
<p><strong>System preparation</strong></p>
<p>The following assumes that the gateway has two network interfaces:</p>
<ul>
<li>eth0 will be the external and</li>
<li>eth1 the internal interface.</li>
</ul>
<p>To use iptables you need to have at least the following kernel components compiled in or as modules</p>
<ul>
<li><tt>ip_tables</tt></li>
<li><tt>ip_conntrack</tt> and <tt>ip_conntrack_ftp</tt></li>
</ul>
<p>IP forwarding needs to be active (<tt>echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;/userdefined</tt>).</p>
<p>Setup the external interface using the necessary data from your provider (IP and standard gateway). The internal interface (eth1) needs to get a private IP address, like 10.174.254.197. The routing table of the gateway will be set up automatically during network initialization.</p>
<p>Every LAN PC will use the NAT-Gateways internal IP (192.168.0.1 in our example) as standard gateway in its networking setup.</p>
<p><strong>Firewall script</strong></p>
<blockquote><p>#!/bin/sh ipt=/sbin/iptables extip=192.168.2.243 # replace with your EXTERNAL IP lan=10.174.254.197/27 # your LAN&lt; # start firewall start_firwall { echo &#8220;Enabling IP forwarding.&#8221; echo 1 &gt; /proc/sys/net/ipv4/ip_forward echo &#8220;Enabling iptables firewall.&#8221; # default policies $ipt -P INPUT DROP $ipt -P FORWARD DROP # NAT $ipt -t nat -A POSTROUTING -o eth0 -j SNAT &#8211;to-source $extip # INPUT chain $ipt -A INPUT -i lo -j ACCEPT $ipt -A INPUT -i eth1 -s $lan -j ACCEPT $ipt -A INPUT -i eth0 -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT $ipt -A INPUT -p tcp &#8211;destination-port 22 -j ACCEPT # FORWARD chain $ipt -A FORWARD -i eth1 -s $lan -j ACCEPT $ipt -A FORWARD -i eth0 -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT } # stop firewall stop_firwall { $ipt -P INPUT DROP $ipt -P OUTPUT DROP $ipt -P FORWARD DROP # allow internal traffic $ipt -A INPUT -i eth1 -j ACCEPT $ipt -A OUTPUT -o eth1 -j ACCEPT } # flushing, removing and zeroing tables<br />
reset_firwall { chains=`cat /proc/net/ip_tables_names` for i in $chains; do $debug $ipt -t $i -F $debug $ipt -t $i -X $debug $ipt -t $i -Z done } case &#8220;$1&#8243; in start|restart|reload) reset_firewall start_firewall  ;; stop) reset_firewall stop_firewall  ;; *) echo &#8220;Usage: $0 {start|stop|restart|reload}&#8221; exit 1  ;; esac exit 0</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/a-basic-firewall-configuration-suitable-for-a-gatewaynat/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

