Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ufw to k3s known issues #2732

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t0xicCode
Copy link

@t0xicCode t0xicCode commented Oct 4, 2020

Addresses k3s-io/k3s#2059 by adding information on the modifications needed to run k3s with ufw enabled.

@t0xicCode t0xicCode changed the title Add ufw to known issues Add ufw to k3s known issues Oct 4, 2020
Addresses k3s-io/k3s#2059 by adding information on the modifications needed to run k3s with ufw enabled

Signed-off-by: t0xicCode <[email protected]>
@cjellick
Copy link
Contributor

cjellick commented Oct 4, 2020

Thank you! @erikwilson @Oats87 can you review this?

UFW firewall rules are evaluated prior to the kube-proxy rules, so traffic to cluster services can be blocked. Traffic from the service and pod networks should be allowed in ufw to ensure that the kube-proxy rules are evaluated. Given the default values, the following will allow traffic from those network through the ufw portion, before reaching the kube-proxy rules.

```
sudo ufw allow from 10.42.0.0/16 to any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be curious to see the actual resulting chain on the iptables side after applying these UFW rules. I'm not sure we should be blindly adding these instructions to our docs without a full understanding of what is going on (and assurance that we aren't going to still have other "good" traffic blocked)

I think this needs more investigation IMO

@t0xicCode
Copy link
Author

t0xicCode commented Nov 25, 2020 via email

@Oats87
Copy link
Contributor

Oats87 commented Nov 25, 2020

I can run some tests and push the resulting iptables changes here. I was under the impression that the original issue had delved into the details, but it doesn’t hurt to check it again.

That'd be great if you could do that -- the original issue seemed to be more of a "It happens to work with these rules" but I've had to fight these system-level firewalls a few times on issues like this, where certain things work but others don't.

@catherineluse
Copy link
Contributor

@SheilaghM @davidnuzik Should we close this PR, then open an issue in the K3s repo for further investigation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants