<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 273: OpenBSD PF, `force state` on block rules</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/273/</link><description>Recent changes to 273: OpenBSD PF, `force state` on block rules</description><atom:link href="https://sourceforge.net/p/fwbuilder/bug-reports-current-version/273/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 29 Oct 2015 18:39:32 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/fwbuilder/bug-reports-current-version/273/feed.rss" rel="self" type="application/rss+xml"/><item><title>#273 OpenBSD PF, `force state` on block rules</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/273/?limit=25#0f2d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Quick correction, the post title:&lt;br/&gt;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OpenBSD PF, &lt;code&gt;keep state&lt;/code&gt; on block rules &lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MGR Admin</dc:creator><pubDate>Thu, 29 Oct 2015 18:39:32 -0000</pubDate><guid>https://sourceforge.net232a6424f279f461b48d3a329387ea6ae09b6688</guid></item><item><title>OpenBSD PF, `force state` on block rules</title><link>https://sourceforge.net/p/fwbuilder/bug-reports-current-version/273/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;OpenBSD 5.8&lt;br/&gt;
Firewall Builder 5.1.0.3599&lt;br/&gt;
OpenBSD binary package, mTier package updates www.mtier.org&lt;/p&gt;
&lt;p&gt;The generated conf. file:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;# Policy compiler errors and warnings:
# workstation:Policy:2: warning: Changing rule direction due to self reference
# workstation:Policy:3: warning: Changing rule direction due to self reference
# 
# Rule  0 (eth0)
# anti spoofing rule
block in   log  quick on eth0 inet  from self  to any keep state  label "RULE 0 -- DROP "  
# 
# Rule  1 (lo)
pass  quick on lo inet  from any  to any keep state  label "RULE 1 -- ACCEPT "  
# 
# Rule  2 (global)
# SSH Access to the host; useful ICMP
# types; ping request
# workstation:Policy:2: warning: Changing rule direction due to self reference

pass in   quick inet proto icmp  from any  to self icmp-type { 3 , 0 code 0 , 8 code 0 , 11 code 0 , 11 code 1  } keep state  label "RULE 2 -- ACCEPT "  
pass in   quick inet proto tcp  from any  to self port 22 keep state  label "RULE 2 -- ACCEPT "  
# 
# Rule  3 (global)
# workstation:Policy:3: warning: Changing rule direction due to self reference

pass out  quick inet  from self  to any keep state  label "RULE 3 -- ACCEPT "  
# 
# Rule  4 (global)
block  log  quick inet  from any  to any keep state  label "RULE 4 -- DROP "  
# 
# Rule  fallback rule
#    fallback rule 
block  quick inet  from any  to any  label "RULE 10000 -- DROP "
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Errors from &lt;code&gt;pfctl -f ./workstation.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;/home/devel/workstation.conf:10: keep state is great, but only for pass rules
/home/devel/workstation.conf:10: skipping rule due to errors
/home/devel/workstation.conf:10: keep state is great, but only for pass rules
/home/devel/workstation.conf:10: skipping rule due to errors
/home/devel/workstation.conf:10: rule expands to no valid combination
/home/devel/workstation.conf:29: keep state is great, but only for pass rules
/home/devel/workstation.conf:29: skipping rule due to errors
/home/devel/workstation.conf:29: rule expands to no valid combination
pfctl: Syntax error in config file: pf rules not loaded
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The problem is the &lt;code&gt;keep state&lt;/code&gt; option in block rules, e.g.:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;block in   log  quick on eth0 inet  from self  to any keep state
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Right clicking on &lt;code&gt;options&lt;/code&gt; in &lt;code&gt;Workstation / Policy&lt;/code&gt;, under the &lt;code&gt;State Tracking&lt;/code&gt; tab in the resulting options dialogue there is a force &lt;code&gt;keep state&lt;/code&gt; option for the rule.  This appears to have no effect (checked on unchecked), and seems to default to activated, causing the error on attempting to load the rule set.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MGR Admin</dc:creator><pubDate>Thu, 29 Oct 2015 18:30:58 -0000</pubDate><guid>https://sourceforge.netdb31e5d318e5069357f86750d8e2dc9b6d9140a6</guid></item></channel></rss>