-3

I have created a local node server on my laptop. And I can access it using the private IP (like 192.168.1.9:8080) on same network on my other devices like phone and other PC. I have disabled firewall.

But now I want to access it using my public IP. So that anyone using a different Internet connection can also connect to it. But it just doesn't respond.

I added a DMZ Host:

enter image description here

Then I added this port forwarding setting (I saw it on YouTube tutorial). I'm not very sure if it's correct or not.

enter image description here

And here is network status:

enter image description here

But it made no difference. Am I doing something wrong?

Note: My problem is probably not related to Hairpin NAT.

PS: If you think I've shared some sensitive/private information in the screenshots, please let me know I'll update it immediately.

Vikas
  • 97
  • 5
  • 1
    The search term you are looking for is `hairpin nat` – Gerald Schneider Apr 23 '22 at 17:44
  • @GeraldSchneider Thanks I'll try them and will update soon. – Vikas Apr 23 '22 at 17:53
  • @GeraldSchneider I'm not sure if that is the thing I am looking for. Isn't Hairpin NAT is more about connecting to your server using public IP with same network? Note that I want to access my server from a different brand network in a different location. I think that wouldn't count hairpin NAT? That is how I understood it. – Vikas Apr 24 '22 at 03:11
  • "This question already has answers here:" No it doesn't. – Vikas Apr 26 '22 at 02:51
  • Note for future visitors: Hairpin NAT is a different issue. Nothing to do with issue described in my question detail. – Vikas Apr 26 '22 at 02:52
  • This is a home use question and has no place on [sf] it should have been asked on [su]. – user9517 Apr 28 '22 at 08:01

1 Answers1

2

first check if your ISP doesn't user GCNAT and provides you with a real IP address. then you need to configure a firewall and port forwarding your router. Don't do all port range from 1 to 65535, configure only ports you need.

yourrounter_IP:8080 => localserver_IP:8080

4snok
  • 104
  • 4
  • Do I need to put same IP and ports in WAN and LAN in port forwarding? I don't know what WAN host IP and port are for. – Vikas Apr 24 '22 at 04:38
  • WAN IP is an IP your rounter gets from ISP via DHCP. "WAN and LAN" don't have to be the same, you can put any. if you put WAN port 80 and LAN port 8080 your router with forward all traffic from its public ip port 80 to your local server's private ip port 8080 – 4snok Apr 24 '22 at 05:23
  • So if I put different ports (80 for WAN, 8080 for LAN), I should be able to access my server using *yourrouter_IP:80* ? – Vikas Apr 24 '22 at 05:28
  • https://i.stack.imgur.com/grnIo.jpg – Vikas Apr 24 '22 at 10:51
  • I think the problem is GCNAT. In this screenshot, you see 100.100.x.x IP which is different from public IP. Right? – Vikas Apr 24 '22 at 10:52
  • yep, CGNAT subnet is 100.64.0.0/10 - from 100.64.0.0 to 100.127.255.255. Usually ISPs provide a public IP address as an additional service – 4snok Apr 25 '22 at 00:27
  • Anyway. There is no free solution for this? Other than using some VPN? – Vikas Apr 25 '22 at 03:21