Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Security leak because of service shutdown order?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Tue Jul 26, 2005 6:01 pm    Post subject: Security leak because of service shutdown order? Reply with quote

I recently noticed that the iptables firewall gets stopped before my network interface are being shut down. Doesn't that give my machine some exposure to the internet one usually does not want to have?
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Tue Jul 26, 2005 7:27 pm    Post subject: Reply with quote

Most likely all your network listeners have been stopped before that, so I don't think it's a cause for much concern.
Back to top
View user's profile Send private message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Wed Jul 27, 2005 9:35 am    Post subject: Reply with quote

No. It stops mysql, sshd and ntpd after shutting down the firewall. Upon boot, almost all network services get started before the firewall.
Back to top
View user's profile Send private message
Nuteater
Apprentice
Apprentice


Joined: 25 Sep 2003
Posts: 193
Location: Jyväskylä, Finland

PostPosted: Wed Jul 27, 2005 10:34 am    Post subject: Reply with quote

At least with shorewall, stopping the firewall just puts it in the default
state, which is 'deny everything'. As it should be, a firewall is just a
program allowing access in some cases, and the default is
what it should be. :)
_________________
I am Nuteater, hear me roar.
Back to top
View user's profile Send private message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Wed Jul 27, 2005 10:40 am    Post subject: Reply with quote

well, the default policy when NOT using shorewall is: ACCEPT all and everything.
Back to top
View user's profile Send private message
Nuteater
Apprentice
Apprentice


Joined: 25 Sep 2003
Posts: 193
Location: Jyväskylä, Finland

PostPosted: Wed Jul 27, 2005 10:56 am    Post subject: Reply with quote

Cinquero wrote:
well, the default policy when NOT using shorewall is: ACCEPT all and everything.

You are right, this is not how it should be. You could try tweaking the init script shutting
down your script and adding a rule that blocks everything. However, the firewall is only
your first line of defence, so to speak, and you shouldn't rely on it too much. The system
behind the firewall should also be secure, and not running any unnecessary or vulnerable
services. But you are right, as good practice the firewall should be started first and shut down
last, even if the security gain from this is minimal.
_________________
I am Nuteater, hear me roar.
Back to top
View user's profile Send private message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Wed Jul 27, 2005 11:59 am    Post subject: Reply with quote

Uhm, let me put it that way: the firewall's concern is security. And it is its main concern. Behind the firewall, I have running various daemons for developing purposes. Such ones are not usually known to be the securest ones...

I think I'll have a quick look on how to change the default policy and post a bug then.
Back to top
View user's profile Send private message
joaander
Tux's lil' helper
Tux's lil' helper


Joined: 30 Apr 2004
Posts: 132

PostPosted: Wed Jul 27, 2005 2:26 pm    Post subject: Reply with quote

Quote:
Uhm, let me put it that way: the firewall's concern is security. And it is its main concern. Behind the firewall, I have running various daemons for developing purposes. Such ones are not usually known to be the securest ones...

Why even allow such a service to even listen on an internet interface? If a service is to be used on the internal net only, then it should only listen on the internal network interface whether or not you have a firewall. As Nuteater said:
Quote:
The system behind the firewall should also be secure, and not running any unnecessary or vulnerable
services
Back to top
View user's profile Send private message
ben-xo
n00b
n00b


Joined: 13 Dec 2004
Posts: 38

PostPosted: Wed Jul 27, 2005 7:28 pm    Post subject: Reply with quote

Yes but what's the sense in iptables loading up later / unloading earlier than is appropriate for maximum security? This should be simple matter to sort out, so i'd post it as a bug.
_________________
Ben XO
Back to top
View user's profile Send private message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Thu Jul 28, 2005 9:13 am    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=84783
Back to top
View user's profile Send private message
ben-xo
n00b
n00b


Joined: 13 Dec 2004
Posts: 38

PostPosted: Thu Jul 28, 2005 1:14 pm    Post subject: Reply with quote

joaander wrote:
Why even allow such a service to even listen on an internet interface? If a service is to be used on the internal net only, then it should only listen on the internal network interface whether or not you have a firewall.


oh and just to answer this one... some services are so simple (read: in development) that they cannot be configured to only listen on a specific NIC. In this case, one uses a firewall to block it...
_________________
Ben XO
Back to top
View user's profile Send private message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Thu Jul 28, 2005 1:16 pm    Post subject: Reply with quote

Oh, ok, the last bug was a duplicate of

https://bugs.gentoo.org/show_bug.cgi?id=70226
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum