Skip to content

Commit a0304dc

Browse files
authored
[Security] Don't bind tcp zmq socket to all interfaces (#17197)
Signed-off-by: Russell Bryant <[email protected]>
1 parent c7941cc commit a0304dc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/source/serving/distributed_serving.md

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ bash run_cluster.sh \
7777

7878
Then you get a ray cluster of **containers**. Note that you need to keep the shells running these commands alive to hold the cluster. Any shell disconnect will terminate the cluster. In addition, please note that the argument `ip_of_head_node` should be the IP address of the head node, which is accessible by all the worker nodes. The IP addresses of each worker node should be specified in the `VLLM_HOST_IP` environment variable, and should be different for each worker node. Please check the network configuration of your cluster to make sure the nodes can communicate with each other through the specified IP addresses.
7979

80+
:::{warning}
81+
It is considered best practice to set `VLLM_HOST_IP` to an address on a private network segment for the vLLM cluster. The traffic sent here is not encrypted. The endpoints are also exchanging data in a format that could be exploited to execute arbitrary code should a malicious party gain access to the network. Please ensure that this network is not reachable by any untrusted parties.
82+
:::
83+
8084
:::{warning}
8185
Since this is a ray cluster of **containers**, all the following commands should be executed in the **containers**, otherwise you are executing the commands on the host machine, which is not connected to the ray cluster. To enter the container, you can use `docker exec -it node /bin/bash`.
8286
:::

vllm/distributed/device_communicators/shm_broadcast.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def __init__(
241241
self.remote_socket.setsockopt(IPV6, 1)
242242
remote_addr_ipv6 = True
243243
connect_ip = f"[{connect_ip}]"
244-
socket_addr = f"tcp://*:{remote_subscribe_port}"
244+
socket_addr = f"tcp://{connect_ip}:{remote_subscribe_port}"
245245
self.remote_socket.bind(socket_addr)
246246
remote_subscribe_addr = f"tcp://{connect_ip}:{remote_subscribe_port}"
247247
else:

0 commit comments

Comments
 (0)