threefoldtech / zos

Autonomous operating system
https://threefold.io/host/
Apache License 2.0
85 stars 14 forks source link

farmer local network security #2455

Open xmonader opened 2 weeks ago

xmonader commented 2 weeks ago

TBD @delandtj

Mik-TF commented 1 week ago

Any progress on this one? @delandtj

delandtj commented 1 week ago

So in a nutshell (tested on my machine of how it behaves:) you'd want to add these nft rules in the namespace that does NAT for vms. In case of the 'light' version I assume you'd do it in the host namespace, otherwise in the ndmz namespace.

HERE are the tools and calls necessary to find the default gw mac address, as well the rules to be added to the forwarding chain for each networkd incantation (In errlang, of course)

Mik-TF commented 1 week ago

Great. Looks straightforward. @delandtj

@xmonader perhaps you can have a look and see how to implement this solution.

Do you guys propose host namespace or ndmz namespace?

delandtj commented 1 week ago

Do you guys propose host namespace or ndmz namespace? you'll have to put the rules in the one that is appropriate

Mik-TF commented 1 week ago

Alright great. So all we need now is to implement + test it.

xmonader commented 5 days ago

@delandtj How does that work in case of a farmerbot managing the farm?

delandtj commented 3 days ago

we'll have to learn to live with it a bit during development and testing, adding nft rules as we go. but indeed, talk a bit about what we need. so :

LeeSmet commented 3 days ago

For mycelium/ygg, discovery is 1 thing, but we also need to allow connections to the default ports of those services so something can be done with the discovered peers. Other than that I think that about sums it up

Mik-TF commented 2 days ago

So as I understand, we are now ready to implement + test this.

@xmonader can you manage to test this with dev team? Maybe Lee and Jan can help.