0

I have a node Js web server running on my machine. It is running on port 3000. My PC LAN IP is 192.168.0.101. it is static. I am expecting if i hit http://192.168.0.101:3001 the request should be forwared to http://192.168.0.101:3000. But it is not happening.

Below is mapping i created on TP Link router.

enter image description here

2 Answers 2

1

Port forwarding only works from outside of your network (WAN) towards inside of your network (LAN).

Port forwarding is part of NAT and is meant to tell your router where incoming traffic should be directed to.

You cannot create a port forwarding rule for traffic inside your network unless you have an advanced router that is capable of doing NAT hairpinning. In either cases, you would still have to connect to your WAN ip address to pass through your router's NAT before port forwarding would work.

But instead, you should just access your site on the port it was configured to, or configure your service to listen to port 3001 instead.

So yes, your router's portforwarding works, but only to allow people from the internet to access your device. That's the whole idea behind a router.

0

Port Forwarding is used when you want to access your Computer/Server from outside your local network(LAN). Since you are already in LAN, you don't need to Portforward, as the router does that itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .