<div dir="ltr">On Thu, Sep 4, 2008 at 5:11 AM, Didier Roche <span dir="ltr">&lt;<a href="mailto:didrocks@gmail.com">didrocks@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><br><div class="gmail_quote">2008/9/4 Nicolas Valcárcel <span dir="ltr">&lt;<a href="mailto:nvalcarcel@ubuntu.com" target="_blank">nvalcarcel@ubuntu.com</a>&gt;</span><div class="Ih2E3d"><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>On Wed, 2008-09-03 at 17:33 -0700, Steve Langasek wrote:<br>
&gt; How does this design prevent<br>
&gt; leaving ports open when the package that they legitimately correspond<br>
&gt; to is<br>
&gt; no longer installed?<br>
<br>
</div>I think we can (if it&#39;s not already preventing it) add a command<br>
on .postrm that disables it on ufw. At the end this files are just for<br>
declaring profiles, not enabling or open any port, they just describe a<br>
service ports so the user doesn&#39;t need to care about them just enable<br>
that service on ufw. So we don&#39;t need to care about those files opening<br>
any port, but for disabling them on ufw after removing.<br>
<font color="#888888"><br>
</font></blockquote><div><br></div></div></div></div>The issue is more
complex than that. Because you do not know which profile is currently
loaded (they can be more than one profile by package.<br>A typical example is Apache which has 3 profiles: one for port 80, one for 443 and the last one for both of them.<br>
<br>An idea might be to force (without watching at the error in case
the profile is not associated to a rule) the removal of the
corresponding rules by doing &quot;sudo ufw delete allow &lt;profile&gt;&quot; on
all profiles of the package (and even &quot;sudo ufw delete deny
&lt;profile&gt;&quot;/&quot;sudo ufw delete limit &lt;profile&gt;&quot;. Maybe a &quot;sudo
ufw delete any_policy &lt;profile&gt;&quot; will be a good new command).<br>
<br>What is the case if another package use the same port and had it
opened (with ufw profile integration)? Does the port is still open on
the firewall (which is what we really want)?<br></div></blockquote></div><br>I would say leave the ports open and leave the profile files.&nbsp; Leave it up to the user to manage the firewall.&nbsp; If the package is removed, it&#39;s not going to be listening on those ports any more anyway.<br>
<br>James<br></div>