0

I have 192.168.0.3 on LAN, and ran on my pc ASP NET app on this IP and port 80. It works well on LAN, when I type 192.168.0.3:80, nothing exciting.

But I wanted to do port forwarding. So on my router, in port forwarding section, I setted up IP to 192.168.0.3 and port range to 80-80. I selected TCP as a protocol.

I don't know if I understand well port forwarding, but I thought that if now I type my public IP address along with port, then I would get response from my ASP NET app.

But it occured that doesn't work like this. I even completely disabled firewall on my PC (Windows).

So my question is why it doesn't work, and did I misunderstand port forwarding?

10
  • Take a look at the existing threads about "NAT hairpin" or "NAT loopback" on this site. It's a common topic – port forwarding due to its design can't reliably work when you're on the same network as the "forwarded to" server. Commented Jun 29, 2023 at 19:35
  • 1
    Does this answer your question? Can't connect to my public IP from other machine in same local network
    – harrymc
    Commented Jun 29, 2023 at 19:45
  • I'm not sure if it answers. So as I understand, the server cannot be in the same network in which router is (and this is due to NAT)? So I need in my LAN something like router-switch-server? And provided question says about connecting "from other machine in same local network", but I cannot do it even from a different, remote network.
    – Szyszka947
    Commented Jun 29, 2023 at 20:01
  • Being unable to access from a different network is usually a completely different issue (e.g. the CGNAT problem; how did you determine your own public IP address?) Commented Jun 29, 2023 at 20:03
  • 1
    @u1686_grawity I just went to router admin page to "WAN status". If you meant the public address from different network than router, I don't know it, but it wasn't the same address, as it was address of my friend several km away.
    – Szyszka947
    Commented Jun 29, 2023 at 21:13

0

You must log in to answer this question.

Browse other questions tagged .