0

Let's just say that I am a peasant that can only avail of a typical Dynamic Public IP address from my ISP.

Just for the sake of example, let's say have the following:

  • Domain Name: experiment626.example.com
  • Dynamic Public IP: 131.226.127.69

I manage the domain name but the ISP manages the dynamic public IP.

Would it be possible to run a webserver running on TCP port 80 with those details? I checked port 80 on that dynamic public IP address provided by the ISP, and that it seems it was left open.

My question is... What if the ISP did not assign any port forwarding? Will it reach my router/machine? Will the ISP's router just route it to any connected device on it that listens to port 80 or does it need an explicit setting up of port forwarding towards my device before it will work?

3
  • 1
    Port forwarding is needed to expose internal systems to the internet. The internal net starts after the router, i.e. its your LAN. Thus port forwarding need to be by the one managing the router, i.e. you and not the ISP. This would be different if your router only gets another internal IP address from the ISP, like in case of CG-NAT (carrier grade NAT) used by many ISP due to a shortage of IPv4 addresses. But this is not the case in your example. Sep 29, 2021 at 6:49
  • A business will have a fixed public address in its contract. and it will maintain its own router. You are describing a home/residential network. Unfortunately, questions about home networking and consumer-grade devices are explicitly off-topic here, as are questions about networks you do not directly control and protocols above OSI layer-4.
    – Ron Maupin
    Sep 29, 2021 at 12:24
  • Just FYI @RonMaupin, my business cable line, in a Class A office building, does not have static addresses. The service has 4 dynamic addresses. They don't change very often, so it's never been an issue. (the modem at my shop also has a dynamic address, as does their own wifi AP)
    – Ricky
    Oct 22, 2021 at 7:45

1 Answer 1

1

Would it be possible to run a webserver running on TCP port 80 with those details?

Basically yes, provided you set up the public-to-private destination NAT aka port forwarding.

The problem is when your public IP changes. The DNS entry then points at the old, wrong IP address. Updating the record still doesn't update cached copies of the old record which is controlled by the record's TTL value. You might want to set that to just 30 minutes or so, depending on the required update frequency.

What if the ISP did not assign any port forwarding?

As the router (even when part of your ISP contract) is normally configured by your, you need to set up the port forwarding yourself. Having some kind of port forwarding already in place is highly irregular.

Will the ISP's router just route it to any connected device on it that listens to port 80 or does it need an explicit setting up of port forwarding towards my device before it will work?

The latter. Port forwarding requires a specific private address to forward to. Forwarding as a broadcast cannot work with TCP.

In any case, if you're exposing your own web server to the public Internet, make sure it's been hardened for that purpose (web server setup, application server setup) and regularly updated when vulnerabilities show up.

4
  • Aw! So does that mean if I can not ask my ISP to port forward TCP 80 to my device, It won't work? Sep 29, 2021 at 7:44
  • If you can configure your router you should. Whether your ISP can do that for you depends on your SLAs, you'd need to check them.
    – Zac67
    Sep 29, 2021 at 8:05
  • I am just using a router (USB mobile broadband) that works using a sim. That's why its on dynamic public IP. No lease, no contract. Does that mean that I just need to configure the NAT of my router? How about that router of the ISP before my router? Will it need to have its NAT configured such that TCP 80 is forwarded to my router? Sep 29, 2021 at 8:38
  • Sorry, home networking and consumer-grade devices are explicitly off-topic here, see the help center. Yes, configure that router. With mobile access, you need to make sure that you really get a public IP address, without CG-NAT - in that case, port forwarding is impossible (the ISP won't set that up for you).
    – Zac67
    Sep 29, 2021 at 8:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.