All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hansa" <mythtv@logic-q.nl>
To: 'Andrew Beverley' <andy@andybev.com>
Cc: netfilter@vger.kernel.org
Subject: RE: Is the current firewall model static?
Date: Wed, 21 Dec 2011 10:18:13 +0100	[thread overview]
Message-ID: <002201ccbfc1$7743d7f0$65cb87d0$@nl> (raw)
In-Reply-To: <1324375868.21032.1.camel@steve-pc>

From: Andrew Beverley [mailto:andy@andybev.com]
Sent: dinsdag 20 december 2011 11:11
> On Tue, 2011-12-20 at 10:25 +0100, Hansa wrote:
> > Hi there,
> >
> > Fedora is running a project called firewalld. Firewalld manages the
> firewall
> > dynamically via D-BUS
> > (http://fedoraproject.org/wiki/FirewallD/#Why_A_Firewall_Daemon).
> They say:
> > "the current firewall model is static and **every** change requires a
> > complete firewall restart. This includes also to unload the firewall
> > netfilter kernel modules and to load the modules that are needed for
> the new
> > configuration."
> >
> > I would be very surprised if their claim is true. Because that would
> break
> > statefull connections when changing the rules. I'm not familiar with
> the
> > code so I can't comment on that. Hence my question. Is the current
> firewall
> > model static?
> 
> I think that what they mean is that the current *Fedora* firewall model
> is static. It looks like firewalld still uses iptables, but is slightly
> more intelligent as to how it processes changes to rules and so on.

I wasn't aware the firewall model is implemented differently across different Linux flavors. I thought netfilter implements a packet filtering framework into the Linux kernel. Shouldn't it work the work the same on every Linux flavor? I did the following test.

Ssh on port 22 into a Linux box with following filter rules
# iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
2    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
4    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Remove line 3, so new ssh connections are rejected. The current ssh session however should be working because of rule number 1.

# iptables -D INPUT 3
# echo "yup it does"
yup it does

Seems pretty much dynamic to me :)
Am I missing something?

-Hansa


  reply	other threads:[~2011-12-21  9:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  9:25 Is the current firewall model static? Hansa
2011-12-20 10:11 ` Andrew Beverley
2011-12-21  9:18   ` Hansa [this message]
2011-12-21  9:27     ` Andrew Beverley
2011-12-21 10:16       ` Hansa
2011-12-21 10:22         ` Andrew Beverley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002201ccbfc1$7743d7f0$65cb87d0$@nl' \
    --to=mythtv@logic-q.nl \
    --cc=andy@andybev.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.