<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=Iptables</id>
	<title>Iptables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.scott5.org/index.php?action=history&amp;feed=atom&amp;title=Iptables"/>
	<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=Iptables&amp;action=history"/>
	<updated>2026-04-13T00:33:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.scott5.org/index.php?title=Iptables&amp;diff=443&amp;oldid=prev</id>
		<title>Scott at 18:29, 4 February 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.scott5.org/index.php?title=Iptables&amp;diff=443&amp;oldid=prev"/>
		<updated>2011-02-04T18:29:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lowercase title}}&lt;br /&gt;
Here is an example firewall that blocks out everything except &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;http&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;vnc&amp;lt;/code&amp;gt; ports 5901 to 5920 on the local subnet (this file would be found at &amp;lt;code&amp;gt;/etc/sysconfig/iptables&amp;lt;/code&amp;gt; on Red Hat):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Firewall configuration written by redhat-config-securitylevel&lt;br /&gt;
# Manual customization of this file is not recommended (but has been performed!)&lt;br /&gt;
*filter&lt;br /&gt;
:INPUT ACCEPT [0:0]&lt;br /&gt;
:FORWARD ACCEPT [0:0]&lt;br /&gt;
:OUTPUT ACCEPT [0:0]&lt;br /&gt;
:RH-Firewall-1-INPUT - [0:0]&lt;br /&gt;
-A INPUT -j RH-Firewall-1-INPUT&lt;br /&gt;
-A FORWARD -j RH-Firewall-1-INPUT&lt;br /&gt;
-A RH-Firewall-1-INPUT -i lo -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -s 123.45.67.0/24 -m state --state NEW -m tcp -p tcp --dport 5901:5920 -j ACCEPT&lt;br /&gt;
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited&lt;br /&gt;
COMMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes to this file won&amp;#039;t be reflected until the iptables service is restarted:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/init.d/iptables restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
check with &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -L -n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Scott</name></author>
	</entry>
</feed>