File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 7
7
# # How to Use
8
8
# This script can be used in a systemd service to set up firewall rules before starting VMs.
9
9
# Example systemd service configuration:
10
- #
10
+ # ```
11
11
# [Unit]
12
12
# Description=Dstack Firewall Configuration
13
13
# Before=dstack-vmm.service
14
14
#
15
15
# [Service]
16
16
# Type=oneshot
17
- # ExecStart=/path/to/config-fw.sh -u dstack-vmm --allow-tcp 22 --allow-tcp 8080
17
+ # ExecStart=/path/to/config-fw.sh -u dstack-vmm
18
18
# RemainAfterExit=yes
19
19
#
20
20
# [Install]
21
21
# WantedBy=multi-user.target
22
+ # ```
22
23
#
23
24
# # Note
24
25
# The dstack supervisor must be run with a dedicated user specified by USERNAME in this script.
25
26
# For example, if dstack-gateway is running on the same host, it must use a different user account than USERNAME.
26
- #
27
+ # To allow specific local ports to be accessed by CVMs, add --allow-tcp and --allow-udp.
28
+ # For example, if dstack-gateway is running on local host and listening RPC on port 9001, wg on port 9182:
29
+ # ```
30
+ # ./config-fw.sh -u dstack-vmm --allow-tcp 9001 --allow-udp 9182
31
+ # ```
32
+ # If the KMS is also running on the same host and listening on port 9002:
33
+ # ```
34
+ # ./config-fw.sh -u dstack-vmm --allow-tcp 9001 --allow-udp 9182 --allow-tcp 9002
35
+ # ```
36
+
27
37
28
38
# Default values
29
39
USERNAME=${USERNAME:- " " }
You can’t perform that action at this time.
0 commit comments