# Allow Incoming Port Connection

## Windows:

1. Access Firewall Settings:
   * Press Windows + R, type control, and press Enter.
   * Go to System and Security > Windows Defender Firewall.
2. Advanced Settings:
   * On the left panel, click Advanced settings.
3. Create a New Rule:
   * In the new window, select Inbound Rules on the left.
   * Click New Rule... on the right.
4. Select Port:
   * Choose Port and click Next.
5. Specify the Port:
   * Select TCP or UDP, depending on your requirement.
   * Enter the port number you wish to open and click Next.
6. Allow the Connection:
   * Select Allow the connection and click Next.
7. Profile Selection:
   * Choose when the rule applies: Domain, Private, or Public.
   * Click Next.
8. Name the Rule:
   * Give your rule a name and click Finish.

### Video showing how to open ports on Windows

We are not affiliated with this YouTuber. This is a great video showing how to open ports on Windows ***but please stop the video at 9:12 as the whole point of QubitVPN is so you can avoid exposing your home network.***

{% embed url="<https://www.youtube.com/watch?v=cymXDevzthk>" %}
We are not affiliated with this YouTuber. This is a great video showing how to open ports on Windows ***but please stop the video at 9:12 as the whole point of QubitVPN is so you can avoid exposing your home network.***
{% endembed %}

## MacOS:

1. Access System Preferences:
   * Click the Apple menu and choose System Preferences.
2. Security & Privacy:
   * Select Security & Privacy > Firewall tab.
3. Unlock Settings:
   * Click the lock icon and enter your administrator password to make changes.
4. Firewall Options:
   * Click Firewall Options....
5. Add a Port:
   * Click the + button to add an application or service and specify the port number.
6. Save Changes:
   * Click OK and lock the settings by clicking the lock icon again.

## Linux:

### Ubuntu/Debian-based Systems:

1. Use UFW (Uncomplicated Firewall):
   * Open a terminal.
2. Enable UFW:
   * Run sudo ufw enable to ensure UFW is active.
3. Open a Port:
   * Use the command sudo ufw allow \[port number] to open a specific port.
4. Check the Status:
   * Run sudo ufw status to verify that the port is open.

### CentOS/RedHat-based Systems:

1. Use FirewallD:
   * Open a terminal.
2. Open a Port:
   * Run sudo firewall-cmd --zone=public --add-port=\[port number]/tcp --permanent.
3. Reload Firewall:
   * Execute sudo firewall-cmd --reload to apply changes.

Always ensure that you open ports only for trusted applications to maintain security.

### Video showing how to open ports on Linux

We are not affiliated with this YouTuber. This is a great video showing how to open ports on Linux.

{% embed url="<https://www.youtube.com/watch?v=7c_V_3nWWbA>" %}
We are not affiliated with this YouTuber. This is a great video showing how to open ports on Linux.
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://qubitvpn.gitbook.io/qubitvpn-docs/how-to-use/allow-incoming-port-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
