2025-07-18 14:47:26 +03:00
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: NetworkPolicy
|
|
|
|
metadata:
|
|
|
|
name: rustdesk-network-policy
|
|
|
|
spec:
|
|
|
|
podSelector:
|
|
|
|
matchLabels:
|
|
|
|
app: rustdesk-hbbs
|
|
|
|
policyTypes:
|
|
|
|
- Ingress
|
|
|
|
- Egress
|
|
|
|
ingress:
|
2025-07-18 15:22:18 +03:00
|
|
|
# Allow all incoming connections to RustDesk ports
|
2025-07-18 14:47:26 +03:00
|
|
|
- from: []
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 21115
|
|
|
|
- protocol: TCP
|
|
|
|
port: 21116
|
|
|
|
- protocol: UDP
|
|
|
|
port: 21116
|
|
|
|
egress:
|
2025-07-18 15:22:18 +03:00
|
|
|
# Allow DNS
|
2025-07-18 14:47:26 +03:00
|
|
|
- to: []
|
|
|
|
ports:
|
|
|
|
- protocol: UDP
|
|
|
|
port: 53
|
|
|
|
- protocol: TCP
|
|
|
|
port: 53
|
2025-07-18 15:22:18 +03:00
|
|
|
# Allow communication between HBBS and HBBR
|
2025-07-18 14:47:26 +03:00
|
|
|
- to:
|
|
|
|
- podSelector:
|
|
|
|
matchLabels:
|
|
|
|
app: rustdesk-hbbr
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 21117
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: NetworkPolicy
|
|
|
|
metadata:
|
|
|
|
name: rustdesk-hbbr-network-policy
|
|
|
|
spec:
|
|
|
|
podSelector:
|
|
|
|
matchLabels:
|
|
|
|
app: rustdesk-hbbr
|
|
|
|
policyTypes:
|
|
|
|
- Ingress
|
|
|
|
- Egress
|
|
|
|
ingress:
|
2025-07-18 15:22:18 +03:00
|
|
|
# Allow all incoming connections to relay port
|
2025-07-18 14:47:26 +03:00
|
|
|
- from: []
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 21117
|
2025-07-18 15:22:18 +03:00
|
|
|
# Allow connections from HBBS
|
2025-07-18 14:47:26 +03:00
|
|
|
- from:
|
|
|
|
- podSelector:
|
|
|
|
matchLabels:
|
|
|
|
app: rustdesk-hbbs
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 21117
|
|
|
|
egress:
|
2025-07-18 15:22:18 +03:00
|
|
|
# Allow DNS
|
2025-07-18 14:47:26 +03:00
|
|
|
- to: []
|
|
|
|
ports:
|
|
|
|
- protocol: UDP
|
|
|
|
port: 53
|
|
|
|
- protocol: TCP
|
|
|
|
port: 53
|