<?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>jason schaefer &#187; firewall</title>
	<atom:link href="http://jasonschaefer.com/archives/tag/firewall/feed" rel="self" type="application/rss+xml" />
	<link>http://jasonschaefer.com</link>
	<description>documentation and stuff :(){ :&#124;:&#38; };:</description>
	<lastBuildDate>Thu, 12 Jan 2012 20:15:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>* openwrt, firewall to block public wireless from private lan</title>
		<link>http://jasonschaefer.com/archives/3</link>
		<comments>http://jasonschaefer.com/archives/3#comments</comments>
		<pubDate>Thu, 08 Oct 2009 02:14:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[firewall]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kamikaze]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://jasonschaefer.com/?p=3</guid>
		<description><![CDATA[A while ago Second Street Brewery asked for a good stable public wireless internet connection. Of course, the solution was obvious, openwrt on a linksys wrt54gl. The office, point of sale and public networks all share the same gateway. The problem was segregating the public wireless network from the private office lan. Sam (http://thepromisedlan.org) and <a href='http://jasonschaefer.com/archives/3'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>A while ago Second Street Brewery asked for a good stable public wireless internet connection. Of course, the solution was obvious, openwrt on a linksys wrt54gl. The office, point of sale and public networks all share the same gateway. The problem was segregating the public wireless network from the private office lan. Sam (<a href="http://thepromisedlan.org">http://thepromisedlan.org</a>) and I set out to setup a firewall to protect them. This is what we came up with:</p>
<p>check if the following is in /etc/config/firewall otherwise, add it</p>
<pre class="brush: plain">
config include
option path /etc/firewall.user
</pre>
<p>and in /etc/firewall.user we put:</p>
<pre class="brush: plain">
#Insert this into the chain, so 10.1.10.0/24 (office) can connect to public 192.168.10.0/24.
#This rule gets repeated by the setup script /etc/init.d/firewall.
iptables -I FORWARD 1 -m state --state RELATED,ESTABLISHED -j ACCEPT

#block all traffic to any possible private network address (10.*.*.*, 172.16-32.*.*, 192.168.*.*)
iptables -I FORWARD 2 -d 192.168.0.0/16 -j DROP
iptables -I FORWARD 2 -d 172.16.0.0/12 -j DROP
iptables -I FORWARD 2 -d 10.0.0.0/8 -j DROP
</pre>
<p>If you would like to have remote administration on the openwrt so you can access the luci web interface and ssh from the wan side of the router, you can change /etc/config/firewall wan zone to allow it. !!WARNING!! If you are directly connected to the internet, this will expose your open ports to the world. You should take precautions to secure them before changing this firewall rule.</p>
<pre class="brush: plain">
config 'zone'
option 'name' 'wan'
option 'input' 'REJECT' #<- change this to ACCEPT
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
option 'masq' '1'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jasonschaefer.com/archives/3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

