# Port forwarding, which public port?

**URL:** https://dietpi.com/forum/t/port-forwarding-which-public-port/5101
**Category:** Troubleshooting
**Created:** [12 March 2021 09:58 UTC](https://dietpi.com/forum/t/port-forwarding-which-public-port/5101 "2021-03-12T09:58:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![glasblazer](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/g/839c29/32.png) [@glasblazer](https://dietpi.com/forum/u/glasblazer)
#### Post date: [12 March 2021 09:58 UTC](https://dietpi.com/forum/t/port-forwarding-which-public-port/5101/1 "2021-03-12T09:58:35Z")

</div>

Hi,

I can’t get the outside world to connect to my DietPi server, because I do not know what **public port** and **internal port** to use.

I can connect on my local network through the static IP Address, and I have assigned a public IP Address through my internet provider. But I seem to be stuck.

Do you guys know which ports I should fill out when port forwarding and also which protocol I should select (TCP , TCP/ UDP or UDP)?

Thanks!

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [12 March 2021 10:36 UTC](https://dietpi.com/forum/t/port-forwarding-which-public-port/5101/2 "2021-03-12T10:36:58Z")

</div>

Hi,

this depends on the application you like to reach from internet. Each application has a different port that would need to be open on your router.

---

<div class="post-metadata">

### Author: ![glasblazer](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/g/839c29/32.png) [@glasblazer](https://dietpi.com/forum/u/glasblazer)
#### Post date: [12 March 2021 11:14 UTC](https://dietpi.com/forum/t/port-forwarding-which-public-port/5101/3 "2021-03-12T11:14:18Z")

</div>

Hi Joulinar,

Ok thanks. I did not know it had to be application specific.

I want to host a website. Which port would that be then? 80 maybe?

Thanks!

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [12 March 2021 11:30 UTC](https://dietpi.com/forum/t/port-forwarding-which-public-port/5101/4 "2021-03-12T11:30:13Z")

</div>

usually it should be 80 and 443.

80 would be normal http while 443 is https.

In past I created a how-to for setup secure connection for a NextCloud web site. [https://dietpi.com/forum/t/how-can-i-secure-connection-to-nextcloud/3820/4](https://dietpi.com/forum/t/how-can-i-secure-connection-to-nextcloud/3820/4)

Basically it should work same for other web sites as well

---

<div class="post-metadata">

### Author: ![glasblazer](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/g/839c29/32.png) [@glasblazer](https://dietpi.com/forum/u/glasblazer)
#### Post date: [12 March 2021 18:31 UTC](https://dietpi.com/forum/t/port-forwarding-which-public-port/5101/5 "2021-03-12T18:31:12Z")

</div>

Hi Joulinar,

Thank you very much! Port 80 did the trick. I will now go through your tutorial as well to get a secure connection.
