Port Forwarding showing Routers IP
-
Hello guys,
I have setup port forwarding for a service on my network and it is working great, i can access it outside my network and inside my network which is what i want. However, when i login to the webui of the service i have port forwarded from inside the network using the external ip the service shows that my ip address is the ip of my router.
But when i login from outside of my network the service shows that my ip is the ip of where im connecting from, which is what i want. Basically i want to know how i could get it to show my local ip of the machine when conencting inside of the network instead of it showing the routers ip.Any help would be great :)
-
Don't do nat reflection.. And just setup your dns to resolve whatever it is your going to the local IP vs your wan IP.
-
Yeah there is absolutely no way to do what you want to do with NAT reflection. The router must translate the source address to its interface address. If it does not, the server will attempt to respond directly to the client because the source address of the connection would be in its own subnet and your routing will be asymmetric and break the firewall states.
You can also work around this if you MUST use NAT reflection by placing the clients and the servers on different subnets/interfaces.
-
@johnpoz said in Port Forwarding showing Routers IP:
Don't do nat reflection.. And just setup your dns to resolve whatever it is your going to the local IP vs your wan IP.
Just to second it - this is the right answer. Google "Split DNS".
-
The only time you would ever use nat reflection is as a work around for a horrible app that has your wan IP hard coded in it sort of thing.. Even then it should only be a temp work around until you can slap some sense into who ever created the app ;)
As long as the app uses dns to find the dest, you can always just have that dns point to whatever IP you want.