In my case, I would like to block traffic of specific source cidrs and dest ports. But there are no iptables rules applied.
apiVersion: crd.projectcalico.org/v1
kind: GlobalNetworkPolicy
metadata:
name: allow-tcp-22-1
spec:
selector: kubernetes.io/hostname == “172.31.4.89”
#selector: all()
preDNAT: true
applyOnForward: true
types:
- Ingress
ingress: - action: Allow
metadata:
annotations:
from: vpc
protocol: TCP
source:
nets:- “172.20.32.101/32”
- “1.1.1.0/24”
- “2.2.2.0/24”
destination:
ports: - 80
- action: Deny
metadata:
annotations:
from: vpc
protocol: TCP
source:
nets:- “172.20.32.101/32”
- “1.1.1.0/24”
- “2.2.2.0/24”
destination:
ports: - 22
- action: Deny
metadata:
annotations:
from: vpc
protocol: TCP
source:
nets:- “172.20.32.101/32”
- “1.1.1.0/24”
- “2.2.2.0/24”