Skip to content

Commit 42192e8

Browse files
Update mini-lab and enhance firewall make target
1 parent 284e5b9 commit 42192e8

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

capi-lab/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ controller:
3636

3737
.PHONY: firewall
3838
firewall:
39-
metalctl firewall create --description fw --name fw --hostname fw --project 00000000-0000-0000-0000-000000000001 --partition mini-lab --image firewall-ubuntu-3.0 --size v1-small-x86 --firewall-rules-file=capi-lab/firewall-rules.yaml --networks internet-mini-lab,16ec44b7-771b-4514-bb91-d1312a70cdcd
39+
metalctl firewall create --description fw --name fw --hostname fw --project 00000000-0000-0000-0000-000000000001 --partition mini-lab --image firewall-ubuntu-3.0 --size v1-small-x86 --firewall-rules-file=firewall-rules.yaml --networks internet-mini-lab,$(shell docker compose run $(DOCKER_COMPOSE_RUN_ARG) metalctl network list --name metal-test -o template --template '{{ .id }}')

capi-lab/firewall-rules.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
1+
---
12
egress:
2-
- comment: allow outgoing traffic for HTTP and HTTPS and DNS
3+
- comment: allow outgoing HTTP and HTTPS traffic
34
ports:
4-
- 443
55
- 80
6+
- 443
7+
protocol: TCP
8+
to:
9+
- 0.0.0.0/0
10+
- comment: allow outgoing DNS traffic via TCP
11+
ports:
612
- 53
713
protocol: TCP
814
to:
915
- 0.0.0.0/0
10-
- comment: allow outgoing DNS and NTP via UDP
16+
- comment: allow outgoing DNS and NTP traffic via UDP
1117
ports:
1218
- 53
1319
- 123
1420
protocol: UDP
1521
to:
1622
- 0.0.0.0/0
1723
ingress:
18-
- comment: allow incoming HTTPS to kube-apiserver
24+
- comment: allow incoming HTTP and HTTPS traffic
1925
ports:
26+
- 80
2027
- 443
2128
protocol: TCP
2229
from:
23-
- 0.0.0.0/0
30+
- 172.16.0.0/12 # Docker Networks
31+
- 203.0.113.0/24 # metal_lab_ext
32+
to:
33+
- 203.0.113.128/25

0 commit comments

Comments
 (0)