# Opening Ports on Core Compute VMs

All TensorDock Core Compute VMs enjoy per-VM dedicated IPs. This allows your machine to enjoy a full range of ports, further streamlining your workflow.

## For Linux-based VMs (Optional):

**By default, all ports on your Linux VMs are open, and UFW is disabled.** \
The following steps are for securing your VM with the UFW firewall, to help protect your VM. \
\
If you choose to use UFW to whitelist ports, **please always ensure you forward port 22**. Failure to do so can lock you out of your VM with no access back in.&#x20;

1. Log into your VM (ssh user\@ip)
2. ```
   sudo ufw enable
   ```
3. ```
   sudo ufw allow <port_number>
   ```

Ensure you replace \<port\_number> with the port you want to open. For example, `80` for HTTP, `443` for HTTPS, `22` for SSH.&#x20;

4. ```
   sudo ufw status verbose
   ```

The final step will show you a list of all your existing rules, including your newly added port forward. \ <br>

### Additional optional commands for Linux:

#### Opening a port using a specific protocol:

```
sudo ufw allow <port_number>/<protocol>
```

Replace \<protocol> with TCP or UDP. \
Syntax:

```
sudo ufw allow 22/tcp
```

#### Opening a range of ports using a specific protocol:

```
sudo ufw allow <start_port>:<end_port>/<protocol>
```

Replace \<protocol> with TCP or UDP, and replace the \<start\_port> and \<end\_port> with your appropriate port range. \
Syntax:&#x20;

```
sudo ufw allow 50000:50010/udp
```

## For Windows-based VMs:

Opening ports on your Windows-based VMs requires the use of Windows Firewall.

1. Search for "Windows Firewall" and open **Windows Defender Firewall with Advanced Security.**&#x20;

<figure><img src="https://276866638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FScYFYZoiZXazILi6lxJ5%2Fuploads%2FxgUdReI4O5lJInwoeLbY%2FScreenshot%202025-07-29%20at%206.31.42%E2%80%AFPM.png?alt=media&#x26;token=b9161bdb-ac86-4248-9fae-4d4166f900ce" alt=""><figcaption></figcaption></figure>

2. On the left-hand bar, click "**Inbound Rule**" and then click "**New Rule..."** on the right-hand bar side. You should get a window pop-up as shown.&#x20;

<figure><img src="https://276866638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FScYFYZoiZXazILi6lxJ5%2Fuploads%2Frm79LL7TFKWAbvrXulRb%2FScreenshot%202025-07-29%20at%206.33.04%E2%80%AFPM.png?alt=media&#x26;token=50162baa-fcf9-4ecd-9443-02d47a740dc6" alt=""><figcaption></figcaption></figure>

3. Select "**Port**" on the pop-up menu, and click "**Next >**". Next, select the desired protocol (only one can be selected at a time, a duplicate rule must be created if both protocols are desired), and then select "**Specific local ports**" and enter the port you'd like to open. Click "**Next >**".<br>

<figure><img src="https://276866638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FScYFYZoiZXazILi6lxJ5%2Fuploads%2Ffkc9ZTxr5iakmh8hhS31%2FScreenshot%202025-07-29%20at%206.37.21%E2%80%AFPM.png?alt=media&#x26;token=8cbf3ed4-8be7-4541-97a4-dcaf519095d1" alt=""><figcaption></figcaption></figure>

4. Select **"Allow the Connection**" on the next menu, and click "**Next >**".&#x20;

<figure><img src="https://276866638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FScYFYZoiZXazILi6lxJ5%2Fuploads%2FecscdJL8Ysd9GZHSjyEY%2FScreenshot%202025-07-29%20at%206.39.19%E2%80%AFPM.png?alt=media&#x26;token=def37de5-dbde-4fb5-b8c0-afe265984cfe" alt=""><figcaption></figcaption></figure>

5. Ensure all boxes are checked in the preceding menu and click "**Next >**".

<figure><img src="https://276866638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FScYFYZoiZXazILi6lxJ5%2Fuploads%2FK8mun9aADOwmkc0MSya8%2FScreenshot%202025-07-29%20at%206.41.11%E2%80%AFPM.png?alt=media&#x26;token=5e464407-f419-4f5a-8e40-94fe432616df" alt=""><figcaption></figcaption></figure>

6. Add a name for your new rule and a description if you wish. Click "**Finish**" and verify that the rule has been added to your firewall.&#x20;

<figure><img src="https://276866638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FScYFYZoiZXazILi6lxJ5%2Fuploads%2FrXAEgJA43ZtAIXzTkirD%2FScreenshot%202025-07-29%20at%206.43.05%E2%80%AFPM.png?alt=media&#x26;token=c35d087b-dafc-4f07-ac6f-4ae759d10a1c" alt=""><figcaption></figcaption></figure>
