<?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>iptables-restore command &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="http://lifelinux.com/tag/iptables-restore-command/feed/" rel="self" type="application/rss+xml" />
	<link>http://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Tue, 31 Jan 2012 11:39:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.9</generator>
	<item>
		<title>How Do I Block An IP Address On Linux Server ?</title>
		<link>http://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/</link>
					<comments>http://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 11:06:46 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[block ip iptables]]></category>
		<category><![CDATA[block ip linux]]></category>
		<category><![CDATA[block ip unix]]></category>
		<category><![CDATA[block ip via iptables]]></category>
		<category><![CDATA[block ip with iptables]]></category>
		<category><![CDATA[destination port]]></category>
		<category><![CDATA[firewall script]]></category>
		<category><![CDATA[interface name]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[ip subnet]]></category>
		<category><![CDATA[ip table blocking]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[iptables firewall]]></category>
		<category><![CDATA[iptables-restore command]]></category>
		<category><![CDATA[iptables-save]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux block ip]]></category>
		<category><![CDATA[linux block ip address]]></category>
		<category><![CDATA[linux command to block ip]]></category>
		<category><![CDATA[linux drop ip address]]></category>
		<category><![CDATA[linux server]]></category>
		<category><![CDATA[linux server how to block ip/user]]></category>
		<category><![CDATA[log target]]></category>
		<category><![CDATA[public interface]]></category>
		<category><![CDATA[sbin]]></category>
		<category><![CDATA[server port]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[session block]]></category>
		<category><![CDATA[spoof]]></category>
		<category><![CDATA[syntax]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1326</guid>

					<description><![CDATA[<p>I run CentOS on my server, and I often find that my server is being attacked by other computers. Brute force SSH attacks, port scanning, viruses scanning for the ability to spread, things like that. In this article, I&#8217;ll show you how to block an IP address on Linux server using IPTables. The First, I&#8217;ll [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/">How Do I Block An IP Address On Linux Server ?</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>I run CentOS on my server, and I often find that my server is being attacked by other computers. Brute force SSH attacks, port scanning, viruses scanning for the ability to spread, things like that. In this article, I&#8217;ll show you how to block an IP address on Linux server using IPTables.<br />
<span id="more-1326"></span><br />
The First, I&#8217;ll assume you are already using iptables. If you need help setting that up, read <a href="http://www.lifelinux.com/how-to-install-iptables-on-redhat-centos-linux/">this article</a>.</p>
<h2>How do I block an IP address ?</h2>
<p>Example I want to block incoming request from IP <span style="color: #ff0000;">1.2.3.4</span>, login as root and type the following command</p>
<pre># iptables -I INPUT -s <span style="color: #ff0000;">1.2.3.4</span> -j DROP</pre>
<p><strong>Where,</strong><br />
&#8211; I: Inserts the chain at the top of the rules.<br />
&#8211; s: Match source IP address.<br />
&#8211; j: Jump to the specified target chain when the packet matches the current rule.</p>
<p>To drop packets coming in on interface eth0 from <span style="color: #ff0000;">1.2.3.4</span>, type the following command</p>
<pre># iptables -I INPUT -i eth0 -s <span style="color: #ff0000;">1.2.3.4</span> -j DROP</pre>
<h2>How do I block a subnet ?</h2>
<p>Use the following syntax to block <span style="color: #ff0000;">10.0.0.0/8</span></p>
<pre># iptables -I INPUT -s <span style="color: #ff0000;">10.0.0.0/8</span> -j DROP</pre>
<h2>How do I save blocked IP address ?</h2>
<p>To save blocked IP address to iptables config file, type the following command</p>
<pre># service iptables save</pre>
<p>Or</p>
<pre># /etc/init.d/iptables save</pre>
<h2>How Do I Unblock An IP Address?</h2>
<p>First, you need to display blocked IP address along with line number and other information, type the following command</p>
<pre># iptables -L INPUT -n --line-numbers
# iptables -L INPUT -n --line-numbers | grep 1.2.3.4</pre>
<p>Sample outputs:</p>
<pre>Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    DROP       all  --  1.2.3.4              0.0.0.0/0
2    LOCALINPUT  all  --  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     udp  --  203.162.4.1          0.0.0.0/0           udp spts:1024:65535 dpt:53</pre>
<p>To unblock 1.2.3.4 you must delete line number 1, enter:</p>
<pre># iptables -D INPUT 1</pre>
<g:plusone href="http://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/">How Do I Block An IP Address On Linux Server ?</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/how-do-i-block-an-ip-address-on-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Save/Restore Iptables Rules</title>
		<link>http://lifelinux.com/how-to-saverestore-iptables-rules/</link>
					<comments>http://lifelinux.com/how-to-saverestore-iptables-rules/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 18 May 2011 05:49:46 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[iptables-restore command]]></category>
		<category><![CDATA[iptables-save command]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux server]]></category>
		<category><![CDATA[ubuntu iptables]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<category><![CDATA[ubuntu save firewall]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=598</guid>

					<description><![CDATA[<p>Save Iptables rules Rules created with the iptables command are stored in memory. If the system is restarted before saving the iptables rule set, all rules are lost. To save netfilter rules, type the following command as root: # /etc/init.d/iptables save If you are using IPv6, enter: # /etc/init.d/ip6tables save The above commands will write [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-saverestore-iptables-rules/">How To Save/Restore Iptables Rules</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><h3>Save Iptables rules</h3>
<p>Rules created with the <strong>iptables</strong> command are stored in memory. If the system is restarted before saving the iptables rule set, all rules are lost. To save netfilter rules, type the following command as root:</p>
<pre>
# /etc/init.d/iptables save 
</pre>
<p><span id="more-598"></span><br />
If you are using IPv6, enter:</p>
<pre>
# /etc/init.d/ip6tables save 
</pre>
<p>The above commands will write the current iptables configuration to <strong>/etc/sysconfig/iptables</strong>. The next time the system boots, the iptables init script reapplies the rules saved in /etc/sysconfig/iptables. You can also save the iptables rules to a separate file for distribution, backup or other purposes. Type the following command as root</p>
<pre>
# iptables-save > /root/iptables.rules
</pre>
<p>If you are using IPv6, enter:</p>
<pre>
# ip6tables-save  > /root/iptables.rules
</pre>
<h3>Restore Iptables rules</h3>
<p>To restore it use the command iptables-restore, type the following command as root:</p>
<pre>
# iptables-restore < /root/iptables.rules
</pre>
<p>If you are using IPv6, enter:</p>
<pre>
# ip6tables-restore < /root/iptables.rules
</pre>
<g:plusone href="http://lifelinux.com/how-to-saverestore-iptables-rules/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-saverestore-iptables-rules/">How To Save/Restore Iptables Rules</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/how-to-saverestore-iptables-rules/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
