droplan icon indicating copy to clipboard operation
droplan copied to clipboard

Do you clear the old entries from the chain ?

Open bobymicroby opened this issue 9 years ago • 7 comments

Hi @tam7t

I had a quick look ad the code, and it seems to me that you only append rules to the chain. Droplets are ephemeral, so we will end up with a lot of allowed droplets, even after we have destroyed them and they already belong to Eve.

Regards, B.

bobymicroby avatar Nov 01 '16 08:11 bobymicroby

Each run of droplan will first clear the chain before adding peers:

https://github.com/tam7t/droplan/blob/master/tables.go#L43

tam7t avatar Nov 02 '16 00:11 tam7t

Great . Go is still a bit cryptic for me :)

On Wed, Nov 2, 2016, 02:48 Tommy Murphy [email protected] wrote:

Each run of droplan will first clear the chain before adding peers:

https://github.com/tam7t/droplan/blob/master/tables.go#L43

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tam7t/droplan/issues/35#issuecomment-257742211, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4nV6YrfoReWm0lgYfao78HNzoH8H7Lks5q593BgaJpZM4Kl4xv .

bobymicroby avatar Nov 02 '16 06:11 bobymicroby

Does this mean that there is a period of time during which the network is left unsecured? Seems like a better tact would be to load the existing chain, modify it in-memory, and apply changes as necessary.

josegonzalez avatar Feb 20 '17 02:02 josegonzalez

No, the chain that is cleared only has the ACCEPT rules, the default rule is DROP on the interface.

tam7t avatar Feb 20 '17 03:02 tam7t

So then network traffic will blip?

josegonzalez avatar Feb 20 '17 19:02 josegonzalez

@josegonzalez that is addressed by https://github.com/tam7t/droplan/issues/11 with the -A INPUT -i eth1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT rule so that established connections are not dropped.

tam7t avatar Feb 20 '17 19:02 tam7t

Right but I guess new connections will break during the time it takes to update the chain, correct?

josegonzalez avatar Feb 20 '17 20:02 josegonzalez