rootless-containers / usernetes

Kubernetes without the root privileges
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2033-kubelet-in-userns-aka-rootless
Apache License 2.0
879 stars 60 forks source link

Running with different mode for `rp_filter`? #338

Open vsoch opened 2 months ago

vsoch commented 2 months ago

It looks like rp_filter is required to be 2:

rp_filter - INTEGER
    0 - No source validation.
    1 - Strict mode as defined in RFC3704 Strict Reverse Path
        Each incoming packet is tested against the FIB and if the interface
        is not the best reverse path the packet check will fail.
        By default failed packets are discarded.
    2 - Loose mode as defined in RFC3704 Loose Reverse Path
        Each incoming packet's source address is also tested against the FIB
        and if the source address is not reachable via any interface
        the packet check will fail.

@AkihiroSuda is there any means to run with 0, and if not, is there some scoped way we could set this for usernetes and make a solid argument to prevent ip spoofing? I learned from one of our admins that current recommended practice in RFC3704 is to enable strict mode to prevent IP spoofing from DDos attacks. If using asymmetric routing or other complicated routing, then loose mode is recommended. So if that's the only way, I'd need a solid argument for how it could be OK.