Ingress is allways open for any IP and I can't do anything about it in iptables #7400
Closed
CrazyPilot
started this conversation in
General
Replies: 1 comment 4 replies
-
Use network policy. Don't try to manipulate the Kubernetes-managed iptables rules directly. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I installed RKE2 cluster, and placed there a website with nginx-ingress. Now I want to ban several IPs from accessing this website. Actually I plan to maintain set of IPs to be entirely blocked in iptables. For now, I'm truing to block 1.2.3.4 on my nodes and it does not work.
So I run
iptables -I INPUT -s 1.2.3.4 -j DROP
and get this result:I placed my drop rule on a first place, but rke2 moved chain
cali-INPUT
to the 1st place again.After that when I try to access this node from ip 1.2.3.4, all ports are inaccessible except 80 and 443. RKE2 just ignores this rule and exposes ingress to everyone. Seems like it's because of
cali-INPUT
chain, and I can't put any rule in front of it.RKE2 version: v1.31.2+rke2r1
Beta Was this translation helpful? Give feedback.
All reactions