<?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>OpenBSD and FreeBSD resources &#187; Network</title>
	<atom:link href="http://purebsd.com/category/openbsd/network/feed" rel="self" type="application/rss+xml" />
	<link>http://purebsd.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jun 2010 06:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Cablemodem configuration</title>
		<link>http://purebsd.com/cablemodem-configuration.html</link>
		<comments>http://purebsd.com/cablemodem-configuration.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:54:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[configuration]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=30</guid>
		<description><![CDATA[If you use DHCP to acquire your external interface&#8217;s configuration, it is necessary with some ISP&#8217;s to edit your /etc/dhclient.conf. Add or uncomment the following line in/etc/dhclient.conf: send host-name "cp10682-a" Where &#171;cp10682-a&#187; is the &#171;hostname&#187; the ISP assigned to you. It is probably printed on some form you received. More coming soon!]]></description>
			<content:encoded><![CDATA[<p>If you use DHCP to acquire your external interface&#8217;s configuration, it is necessary with some ISP&#8217;s to edit your <code>/etc/dhclient.conf</code>. Add or uncomment the following line in<code>/etc/dhclient.conf</code>:</p>
<p><code> send host-name "cp10682-a"<br />
</code><br />
Where &laquo;cp10682-a&raquo; is the &laquo;hostname&raquo; the ISP assigned to you. It is probably printed on some form you received.</p>
<p>More coming soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/cablemodem-configuration.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring ADSL</title>
		<link>http://purebsd.com/configuring-adsl.html</link>
		<comments>http://purebsd.com/configuring-adsl.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:53:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[ADSL]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=22</guid>
		<description><![CDATA[Nota bene In The Netherlands there are now, as far as I know, two different ways in which ADSL users have to configure their machines. One is without hassles (good!) and one is with hassles (bad!). The without-hassle method below is valid for people connecting to Demon in The Netherlands. Please inform me of other ISPs [...]]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0" width="700" align="center">
<tbody>
<tr>
<td width="572" valign="top"><strong>Nota bene</strong></p>
<p>In The Netherlands there are now, as far as I know, two different ways in which ADSL users have to configure their machines. One is without hassles (good!) and one is with hassles (bad!).</p>
<p>The without-hassle method below is valid for people connecting to <a href="http://www.demon.nl/">Demon</a> in The Netherlands. Please inform me of other ISPs implementing this method.</p>
<p>The with-hassle method below is valid for Alcatel ADSL modems as provided by the Dutch ISP<a href="http://www.planetinternet.nl/">Planet Internet</a>. People with an ADSL connection from the Austrian ISP <a href="http://www.inode.at/">Inode</a> should encounter no problems, but they may not be (entirely) correct for Other ISP&#8217;s, in The Netherlands or abroad.</p>
<p><strong>ADSL without hassles</strong></p>
<p>Say you have an external interface called <code>rl0</code>. While installing OpenBSD, configure the interface<code>rl0</code> by typing &laquo;dhcp&raquo; when asked for an IP address. If you&#8217;ve already a running install, you can edit <code>/etc/hostname.rl0</code>. That file should exist of only one line reading &laquo;dhcp&raquo;.</p>
<p>This is pretty much it. If you&#8217;re editing <code>/etc/hostname.rl0</code> after you installed OpenBSD, you should either reboot or run <code>route flush &amp;&amp; sh -x /etc/netstart</code>.</p>
<p>OpenBSD asks via the DHCP protocol your ISP to provide your machine with an IP address, gateway, DNS servers, etc. You might not like everything you receive from the remote DHCP daemon, so you might have to edit <code>/etc/dhclient.conf</code> in order to override some of the options the DHCP daemon whispers in your DHCP client&#8217;s ear:</p>
<p><code> supersede host-name "aurora";<br />
supersede domain-name "intranet.hezeldrama.net";<br />
prepend domain-name-servers 127.0.0.1;<br />
</code><br />
Above three lines tell the DHCP client to use &laquo;aurora&raquo; as the hostname of the machine, &laquo;intranet.hezeldrama.net&raquo; as its domain name and to setup <code>/etc/resolv.conf</code> in such a way that the first <code>nameserver</code> line reads &laquo;127.0.0.1&#8243;. The last option is required only if you&#8217;d like to run your own caching DNS server on the localhost (= 127.0.0.1).</p>
<p><strong>ADSL with hassles</strong></p>
<ol type="1">
<li>Reconfigure and recompile your kernel if you run the GENERIC OpenBSD kernel or a custom one, built with GRE (Generic Route Encapsulation) support. GRE eats the packets that are actually meant for the PPTP daemon software we&#8217;re about to use, resulting in a not working ADSL connection and the following error: <code>LCP: timeout sending Config-Requests</code>.So search for the line <code>pseudo-device	gre	1</code> in your kernel configuration file and disable it by putting a hash-sign (#) in front of that line. See the section <a href="http://purebsd.com/updating-the-system.html">updating</a> for more information on recompiling your kernel.
<p>Doing <code>sysctl -w net.inet.gre.allow=0</code> does <strong>not</strong> work. Reconfigure &amp; Recompile(tm).</li>
<li>Now you configure the network interface connected to your modem. Create or edit for this<code>/etc/hostname.&lt;if&gt;</code>, where <code>if</code> is the devicename of the interface:<code> inet 10.0.0.150 255.0.0.0 NONE</code></li>
<li>Download <a href="http://www.packetst0rm.net/html/projects/howto/pptp-obsd.tar.gz">PPTP software</a> from packetst0rm. Extract the source, run<code>make</code> and copy <code>pptp</code> and <code>pptp_callmgr</code> to <code>/usr/sbin</code>.</li>
<li>Edit <code>/etc/ppp/options</code> to read the following:<code> name "LOGINNAME"<br />
noauth<br />
noipdefault<br />
defaultroute<br />
debug<br />
</code><br />
Replace <code>LOGINNAME</code> with the loginname/username/user-id that you need to dial-in to your ISP.</li>
<li>Edit <code>/etc/ppp/pap-secrets</code> to read the following:<code> LOGINNAME 10.0.0.138 PASSWORD</code>
<p>Replace <code>LOGINNAME</code> with the loginname/username/user-id that you need to dial-in to your ISP. The same goes for <code>PASSWORD</code>.</li>
<li>If you do not run your own (caching) nameserver, you may like to edit<code>/etc/resolv.conf</code> to use the nameservers of your ISP:<code> search speed.planet.nl<br />
nameserver 195.121.1.34<br />
nameserver 195.121.1.66<br />
</code></li>
<li>Run <code>pptp 10.0.0.138</code> to login to your ISP. The ADSL internet link should now be up.</li>
<li>Credits:<br />
<a href="mailto:frost@packetst0rm.net">Michael Kummer</a> for his <a href="http://www.packetst0rm.net/html/projects/howto/openbsd-adsl-howto.html">OpenBSD ADSL howto</a><br />
<a href="mailto:l.ertl@univie.ac.at">Lukas Ertl</a> for his <a href="http://mailbox.univie.ac.at/~le/freebsd+adsl-howto.html">FreeBSD ADSL howto</a></li>
</ol>
<p><strong>ADSL with hassles: Afterwards</strong></p>
<ol type="1">
<li>For OpenBSD versions below 3.0:If you&#8217;d like to use NAT over your ADSL connection, disable the <code>ipnat</code> in your<code>/etc/rc.conf</code>, since ppp0 is not a valid configured interface at the time when<code>/etc/netstart</code> is run. Though <code>ipfilter</code> should be enabled.
<p><code> ipfilter=YES<br />
ipnat=NO<br />
</code><br />
Only when your ADSL connection is running and ppp0 is configured you should run:</p>
<p><code> /sbin/ipnat -CF -f /etc/ipnat.conf</code></p>
<p>For OpenBSD versions above 2.9:</p>
<p>You&#8217;re probably running PF and not IPFilter. I&#8217;m not sure if you need to do special things in order to have NAT work automatically when connected to the internet via de ADSL line. I&#8217;ll ask around.</li>
<li>You could optionally download this <a href="http://www.packetst0rm.net/html/projects/howto/adsl_reconnect.sh">ADSL reconnect script</a> from <a href="http://www.packetst0rm.net/">packetst0rm</a> and run it from crontab to reestablish a broken connection. But that&#8217;s <strong>not</strong> a usable script.Don&#8217;t panic! I wrote one myself. Though it is very brutal, it <strong>does</strong> reconnect in <strong>all</strong> possible situations as far as I know. Packetst0rm&#8217;s script didn&#8217;t.
<p>- View <a href="http://www.purebsd.com/adsl_reconnect.sh.txt">adsl_reconnect.sh</a><br />
- Download <a href="http://www.purebsd.com/files/adsl_reconnect.sh.gz">adsl_reconnect.sh</a> (gzipped)</p>
<p>The only thing you should configure is the REMOTE_IP variable, which is the IP address of the remote end of your PPTP tunnel. This IP can be found easily when ADSL is running:</p>
<p><code> $ ifconfig ppp0<br />
ppp0: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1500<br />
inet 62.131.xx.yyy --&gt; 195.190.aaa.bbb netmask 0xff000000<br />
</code><br />
Here, the &laquo;195.190.aaa.bbb&raquo; is the value you should assign to the REMOTE_IP variable.<br />
<strong>Note:</strong> some ISPs drop/block ping packets directed to the remote end of the PPTP tunnel or most if not all of their other servers. So it is advised to check if the IP you&#8217;d like to use is returning ping packets before using it in the reconnect script.</p>
<p>To have that reconnection script executed every five minutes you could edit <a href="http://purebsd.com/cron-crontab.html">root&#8217;s crontab</a>and insert the following somewhere:</p>
<p><code> # Check ADSL connection<br />
*/5 * * * * /root/bin/adsl_reconnect.sh &gt; /dev/null<br />
</code></li>
</ol>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/configuring-adsl.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PFlog</title>
		<link>http://purebsd.com/pflog.html</link>
		<comments>http://purebsd.com/pflog.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:33:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[PFlog]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=20</guid>
		<description><![CDATA[PF, by means of the /etc/pf.conf file, indicates which packets should be logged. pflogdhandles those logging requests. Normally, the pflog file used is /var/log/pflog. It&#8217;s in tcpdump readable format. It is synced every minute with the pflog0 interface. To view the pflog file: tcpdump -n -e -ttt -r /var/log/pflog To view packets being logged in realtime: tcpdump -n -e -ttt [...]]]></description>
			<content:encoded><![CDATA[<p>PF, by means of the <code>/etc/pf.conf</code> file, indicates which packets should be logged. <code>pflogd</code>handles those logging requests.</p>
<p>Normally, the pflog file used is <code>/var/log/pflog</code>. It&#8217;s in <code>tcpdump</code> readable format. It is synced every minute with the <code>pflog0</code> interface.</p>
<p>To view the pflog file:</p>
<p><code> tcpdump -n -e -ttt -r /var/log/pflog</code></p>
<p>To view packets being logged in realtime:</p>
<p><code> tcpdump -n -e -ttt pflog0</code></p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/pflog.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network Address Translation</title>
		<link>http://purebsd.com/network-address-translation.html</link>
		<comments>http://purebsd.com/network-address-translation.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:32:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[NAT]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=18</guid>
		<description><![CDATA[Note: This page is for people still using OpenBSD versions below 3.0 or OpenBSD versions above 2.9 patched to include IPFilter support. This page will be restructured soon. To enable NAT you should enable ipfilter and ipnat in /etc/rc.conf and edit/etc/ipnat.rules to reflect your needs. An example. rl0 is the external interface, connected with the internet. Proxy outgoing FTP [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> This page is for people still using OpenBSD versions below 3.0 or OpenBSD versions above 2.9 patched to include IPFilter support. This page will be restructured soon.</p>
<p>To enable NAT you should enable <code>ipfilter</code> and <code>ipnat</code> in <code>/etc/rc.conf</code> and edit<code>/etc/ipnat.rules</code> to reflect your needs.</p>
<p>An example. <code>rl0</code> is the external interface, connected with the internet.</p>
<p>Proxy outgoing FTP connections from the intranet:</p>
<p><code> map rl0 192.168.0.0/24 -&gt; rl0/32 proxy port ftp ftp/tcp</code></p>
<p>Do some redirection from the outside to an internal host:</p>
<p><code> rdr rl0 0.0.0.0/0 port 8022 -&gt; 192.168.0.8 port 22<br />
rdr rl0 0.0.0.0/0 port 8080 -&gt; 192.168.0.8 port 80<br />
</code><br />
Two NAT rules to let the intranet transparently talk with the internet:</p>
<p><code> map rl0 192.168.0.0/24 -&gt; rl0/32 portmap tcp/udp 10000:20000<br />
map rl0 192.168.0.0/24 -&gt; rl0/32<br />
</code><br />
More coming soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/network-address-translation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up Firewall</title>
		<link>http://purebsd.com/setting-up-firewall.html</link>
		<comments>http://purebsd.com/setting-up-firewall.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:15:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[Firewall]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=14</guid>
		<description><![CDATA[Setting up a firewall A structured page about configuring PF, the OpenBSD firewall program, is coming soon. In the mean time you might like to view my /etc/pf.conf file below. It has comments to make things more clear. You can also download it: - pf.conf (plaintext) - pf.conf.gz (gzipped) My /etc/pf.conf: # $OpenBSD: pf.conf,v 1.21 2003/09/02 20:38:44 david Exp [...]]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0" width="700" align="center">
<tbody>
<tr>
<td width="572" valign="top"><strong>Setting up a firewall</strong><br />
A structured page about configuring PF, the OpenBSD firewall program, is coming soon. In the mean time you might like to view my <code>/etc/pf.conf</code> file below. It has comments to make things more clear.</p>
<p>You can also download it:<br />
- <a href="http://purebsd.com/pf.conf.txt">pf.conf</a> (plaintext)<br />
- <a href="http://purebsd.com/pf.conf.gz">pf.conf.gz</a> (gzipped)</p>
<p>My <code>/etc/pf.conf</code>:</p>
<p><code>#	$OpenBSD: pf.conf,v 1.21 2003/09/02 20:38:44 david Exp $<br />
#<br />
# See pf.conf(5) and /usr/share/pf for syntax and examples.<br />
# Required order: options, normalization, queueing, translation, filtering.<br />
# Macros and tables may be defined and used anywhere.<br />
# Note that translation rules are first match while filter rules are last match.<br />
#</code></p>
<p><code># &lt;bof&gt;</p>
<p>#########################################<br />
# *** START MACRO &amp; TABLE DEFINITIONS ***<br />
#</p>
<p># (Device)names of network interfaces<br />
loc_if	 = "lo0"<br />
int_if	 = "xl0"<br />
ext_if	 = "rl0"</p>
<p># IP addresses of network interfaces<br />
loc_addr	= "127.0.0.1"<br />
int_addr	= "192.168.0.3"<br />
ext_addr	= "132.175.118.161"</p>
<p># CIDR address spaces of our networks<br />
loc_net	 = "127.0.0.1/32"<br />
int_net	 = "192.168.0.0/24"<br />
ext_net	 = "132.175.118.161/32"</p>
<p># Port intervals, icmp-types, etc<br />
ftp_ports	= "{ 50042 &gt;&lt; 52042 }"<br />
icmp_types	= "echoreq"</p>
<p># Stateful packet filtering options macros for clarity pf rules<br />
sf_udp	 = "keep state"<br />
sf_icmp	 = "keep state"<br />
sf_tcp	 = "flags S/SA modulate state"</p>
<p># Restrictive access tables (for POP3 &amp; syslog)<br />
table &lt;popxs&gt;	{ 180.126.21.182, 243.73.176.15, 243.73.158.228 }<br />
table &lt;syslxs&gt;	{ 132.175.117.104 }</p>
<p>#<br />
# *** END MACRO &amp; TABLE DEFINITIONS ***<br />
#######################################</p>
<p>###################################################<br />
# *** START OPTIONS, SCRUBBING &amp; QUEUEING RULES ***<br />
#</p>
<p># Options: tune the behavior of pf, default values are given.<br />
#set timeout { interval 10, frag 30 }<br />
#set timeout { tcp.first 120, tcp.opening 30, tcp.established 86400 }<br />
#set timeout { tcp.closing 900, tcp.finwait 45, tcp.closed 90 }<br />
#set timeout { udp.first 60, udp.single 30, udp.multiple 60 }<br />
#set timeout { icmp.first 20, icmp.error 10 }<br />
#set timeout { other.first 60, other.single 30, other.multiple 60 }<br />
#set timeout { adaptive.start 0, adaptive.end 0 }<br />
#set limit { states 10000, frags 5000 }<br />
#set loginterface none<br />
#set optimization normal<br />
#set block-policy drop<br />
#set require-order yes<br />
#set fingerprints "/etc/pf.os"</p>
<p># Options that suit us better than the defaults<br />
set block-policy return</p>
<p># Normalization: reassemble fragments and resolve or reduce traffic ambiguities.<br />
scrub in all</p>
<p># Queueing: rule-based bandwidth control.<br />
#altq on $ext_if bandwidth 15Kb cbq queue { dflt, developers, marketing }<br />
#queue dflt bandwidth 5% cbq(default)<br />
#queue developers bandwidth 80%<br />
#queue marketing bandwidth 15%</p>
<p>#<br />
# *** END OPTIONS, SCRUBBING &amp; QUEUEING RULES ***<br />
#################################################</p>
<p>#######################################<br />
# *** START NAT &amp; REDIRECTION RULES ***<br />
#</p>
<p># NAT: Do some NAT favors for the internal net (-:<br />
nat on $ext_if from $int_net to any -&gt; $ext_addr</p>
<p># RDR: Redirect eDonkey2000/Overnet and WinMX traffic to my laptop<br />
rdr on $ext_if proto tcp to $ext_if port 4662 -&gt; 192.168.0.110 port 4662 # eDonkey<br />
rdr on $ext_if proto udp to $ext_if port 4665 -&gt; 192.168.0.110 port 4665 # eDonkey<br />
rdr on $ext_if proto tcp to $ext_if port 6699 -&gt; 192.168.0.110 port 6699 # WinXM<br />
rdr on $ext_if proto udp to $ext_if port 6257 -&gt; 192.168.0.110 port 6257 # WinXM</p>
<p># RDR: Redirect outgoing FTP requests to the ftp-proxy<br />
rdr on $int_if proto tcp from any to any port ftp -&gt; $loc_if port 8021</p>
<p># RDR: spamd-setup puts addresses to be redirected into table &lt;spamd&gt;.<br />
table &lt;spamd&gt; persist<br />
no rdr on $loc_if all<br />
rdr inet proto tcp from &lt;spamd&gt; to any port smtp -&gt; $loc_if port 8025</p>
<p>#<br />
# *** END NAT &amp; REDIRECTION RULES ***<br />
######################################</p>
<p>#########################################<br />
# *** START (STATEFUL) FIREWALL RULES ***<br />
#</p>
<p># External interface: anti-spoofing measures; with logging<br />
block drop in quick log on $ext_if from 127.0.0.1/8 to any<br />
block drop in quick log on $ext_if from 172.16.0.0/12 to any<br />
block drop in quick log on $ext_if from 192.168.0.0/16 to any<br />
block drop in quick log on $ext_if from $ext_addr to any</p>
<p># External interface: drop ASAP Windows SMB &amp; MS-SQL related packets; no logging<br />
block drop in quick on $ext_if proto { tcp, udp } to port { 135, 137, 138, 139, 1433 }<br />
block drop in quick on $ext_if proto { tcp, udp } from port { 135, 137, 138, 139, 1433 }</p>
<p># External interface: drop UDP port 4669 crap without logging<br />
block drop in quick on $ext_if proto udp to port 4669</p>
<p># External inferface: drop ASAP spammers; no logging<br />
block drop in quick on $ext_if from 202.84.15.0/24 to any	# Hongkong.com crap</p>
<p># External interface: drop crap we don't want to see in our logs<br />
block drop in quick on $ext_if to 0.0.0.0/32<br />
block drop in quick on $ext_if from 0.0.0.0/32<br />
block drop in quick on $ext_if to 224.0.0.0/4<br />
block drop out quick on $ext_if to 224.0.0.0/4<br />
block drop in quick on $ext_if to 255.255.255.255/32<br />
block drop in quick on $ext_if from 255.255.255.255/32</p>
<p># Local interface: TCP/UDP/ICMP incoming/outgoing connection<br />
pass in quick on $loc_if all<br />
pass out quick on $loc_if all</p>
<p># Internal interface: TCP/UDP/ICMP incoming/outgoing connection<br />
pass in quick on $int_if all<br />
pass out quick on $int_if all</p>
<p># External interface: incoming eDonkey2000/Overnet and WinMX traffic to my laptop<br />
pass in quick on $ext_if proto tcp to 192.168.0.110 port 4662 # eDonkey<br />
pass in quick on $ext_if proto udp to 192.168.0.110 port 4665 # eDonkey<br />
pass in quick on $ext_if proto tcp to 192.168.0.110 port 6699 # WinXM<br />
pass in quick on $ext_if proto udp to 192.168.0.110 port 6257 # WinXM</p>
<p># External interface: UDP incoming connections<br />
pass in quick on $ext_if proto udp to $ext_if port 53 $sf_udp<br />
pass in quick on $ext_if proto udp from &lt;syslxs&gt; to $ext_if port 514 $sf_udp</p>
<p># Externel interface: TCP incoming connections<br />
pass in quick on $ext_if proto tcp to $ext_if port 22 $sf_tcp<br />
pass in quick on $ext_if proto tcp to $ext_if port 25 $sf_tcp<br />
pass in quick on $ext_if proto tcp to $ext_if port 80 $sf_tcp<br />
pass in quick on $ext_if proto tcp from &lt;popxs&gt; to $ext_if port 110 $sf_tcp<br />
pass in quick on $ext_if proto tcp to $ext_if port 113 $sf_tcp<br />
pass in quick on $ext_if proto tcp to $loc_if port 8025 $sf_tcp<br />
pass in quick on $ext_if proto tcp from any port 20 to $ext_if port $ftp_ports user proxy $sf_tcp</p>
<p># Externel interface: ICMP incoming connections<br />
pass in quick on $ext_if proto icmp to $ext_if icmp-type $icmp_types $sf_icmp</p>
<p># Externel interface: TCP outgoing connections<br />
pass out quick on $ext_if proto tcp all $sf_tcp<br />
pass out quick on $ext_if proto { udp, icmp } all $sf_udp</p>
<p># All interfaces: block everything by default<br />
block log quick all</p>
<p>#<br />
# *** END (STATEFUL) FIREWALL RULES ***<br />
#######################################</p>
<p>#####################################################<br />
# *** START QUEUE ASSIGNMENTS FOR OUTGOING TRAFIC ***<br />
#</p>
<p># Assign packets to a queue.<br />
#pass out on $ext_if from 192.168.0.0/24 to any keep state queue developers<br />
#pass out on $ext_if from 192.168.1.0/24 to any keep state queue marketing</p>
<p>#<br />
# *** END QUEUE ASSIGNMENTS FOR OUTGOING TRAFIC ***<br />
###################################################</p>
<p></code><code># &lt;eof&gt;<br />
</code></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/setting-up-firewall.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

