Can access a LAN IP with its port but not the WAN IP with that port...


Recommended Posts

Are you accessing your file server from within your LAN, or from somewhere else on the Internet, such as work?

If you're within your LAN, you won't be able to use http://72.23.12.12:8080 because what you're trying to access is on the LAN side of the network, not the WAN side. So use http://192.168.1.34:8080 if you're within your own LAN.

If you're outside your LAN, you must use http://72.23.12.12:8080 because that's the only presense your network has on the Internet. Your router then does the complicated routing and points that traffic to the file server.

If that still doesn't work, you will need to create some port forwarding rules within your router to point requests to your file server.

Link to comment
Share on other sites

you need port forwarding my friend,

in your router, create a rule for 8080 to forward it to your local ip 192.168.1.34 port 8080

Link to comment
Share on other sites

Thats what Im trying to do to test out that what I want to do works. I need to somehow access it because I need to do tests :)

So you have a file server inside your LAN, which you can access fine from elsewhere within your LAN?

You want to test whether it will work from outside your LAN?

Link to comment
Share on other sites

Are you testing

but I cant access http://72.23.12.12:8080. I can ping 72.23.12.12.

Hints? Tips?

Are you trying to test this from within your LAN?

If so that won't work but it will via the proxy because it's outside your network.

There is a reason for this but I'm not going to describe it someone else can do that.

Link to comment
Share on other sites

If you trying to access your public IP from the private side to get reflected back in. This is call nat reflection or loopback forwarding, and not all routers support it. And to be honest is not a good thing to use.

As stated to test a forward, you need to be external -- unless you are sure your router supports nat reflection, which many do not.

post-14624-0-47052400-1332763238.jpg

Link to comment
Share on other sites

NAT reflection; first time I've heard of it :) (haven't even seen it on my home's DD-WRT)

If this isn't avaliable on the router, is there any way to simulate it? The router I'm working with at work is a Zyxel (or however it is spelled)

Link to comment
Share on other sites

This is for a program I'm doing and I can't be bothered to have to change the code of the IP everytime I have to for every part of the code where I refrence that IP.....

I haven't looked (will do so now) if it supports NAT reflection but there has to be a workaround...

Link to comment
Share on other sites

This is for a program I'm doing and I can't be bothered to have to change the code of the IP everytime I have to for every part of the code where I refrence that IP.....

I haven't looked (will do so now) if it supports NAT reflection but there has to be a workaround...

If that had been stated earlier, it would have been helpful! I had just assumed you were going through a browser or something.

What language is your program in?

Could you not perform a check to see what the current IP you're assigned is? If it is 192.168.1.x then go to http://192.168.1.34:8080, if not then go http://72.23.12.12:8080.

Link to comment
Share on other sites

This is for a program I'm doing and I can't be bothered to have to change the code of the IP everytime I have to for every part of the code where I refrence that IP.....

I haven't looked (will do so now) if it supports NAT reflection but there has to be a workaround...

There is no work around for IP. name yes, IP no.

If you have a dns server you could redirect the name to point to the internal IP address, but being that you are using a IP the only thing you can do is either change it anytime you come on locally or enable nat reflection.

Link to comment
Share on other sites

"haven't even seen it on my home's DD-WRT"

like I said it can be called a few different things loopback forwarding, nat loopback, nat redirection, nat reflection, etc.

dd-wrt supports it for sure

http://www.dd-wrt.com/wiki/index.php/Port_Forwarding_Troubleshooting#Test_Loopback

Uncheck Filter WAN NAT Redirection (it is by default) which means loopback will be allowed.

Many routers do not support it, and to be honest there is no reason to support it.

As stated the normal way to do what you want is via name resolution. While inside you resolve to local IP, if outside then you would resolve public.

What program would you be using that you would hardcode an IP?? That is just asking for issue down the line to be sure!!! Whenever possible you should use FQDN vs direct IP.

Link to comment
Share on other sites

If that had been stated earlier, it would have been helpful! I had just assumed you were going through a browser or something.

What language is your program in?

Could you not perform a check to see what the current IP you're assigned is? If it is 192.168.1.x then go to http://192.168.1.34:8080, if not then go http://72.23.12.12:8080.

Its in Java. From what I read its not able to do pings (there are workarounds but a simple ping is imposible)

Basically I need this to test out, nothing else. Once tested, Ill just use the external IP.

Could someone please fill in more information on how to use a FQDN? Thanks

Link to comment
Share on other sites

"Could someone please fill in more information on how to use a FQDN?"

FQDN (fully qualified domain name)

Ie using host.domainname.tld vs 1.2.3.4

What are you not getting?

so in your program put in a FQDN vs 1.2.3.4

Now on your local dns, setup so the fqdn whateveryourusing.somedomain.tld resolves to your private IP 192.168.1.34

If you do not have control over your local dns, or don't have that functionality that you can do the same thing with a host file

Link to comment
Share on other sites

"Could someone please fill in more information on how to use a FQDN?"

FQDN (fully qualified domain name)

Ie using host.domainname.tld vs 1.2.3.4

What are you not getting?

so in your program put in a FQDN vs 1.2.3.4

Now on your local dns, setup so the fqdn whateveryourusing.somedomain.tld resolves to your private IP 192.168.1.34

If you do not have control over your local dns, or don't have that functionality that you can do the same thing with a host file

Problem is that when I install this on other PCs outside of my LAN, I dont have a FQDN for that IP address SO there is a potential change of that IP changing and/or failing (hence because I didnt test it out)

Well, thanks for the solution anyhow :)

Link to comment
Share on other sites

Yeah exactly there is potential for that IP to change -- then what you going to do if that IP changes?? Which is why if resolves via dns, then just change dns to point to new IP and nothing has to be done on the client.

is that really your IP?

I show it with a PTR of

dynamic-acs-72-23-12-12.zoominternet.net

hosting services off a dynamic IP is not a good idea -- so is that your home wan IP I take it? And your going to have some software that accesses that IP.. What happens when it changes next week, or 3 months from now?

If anything setup a dynamic dns service to point to your IP, there are a million services that will point a fqdn to your dynamic IP for you. And then clients and routers to keep it updated with current IP. dns-o-matic for example can update lots and lots of different services for you, etc. dyndns.org is one solution for a free dynamic IP to fqdn. I use a something.homeip.net for example

; <<>> DiG 9.7.3 <<>> snipped.homeip.net

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61164

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;snipped.homeip.net. IN A

;; ANSWER SECTION:

snipped.homeip.net. 4858 IN A 98.215.xxx.xxx

;; Query time: 3 msec

;; SERVER: 192.168.1.253#53(192.168.1.253)

;; WHEN: Mon Mar 26 14:07:38 2012

;; MSG SIZE rcvd: 52

Link to comment
Share on other sites

You could also just use a dynamic redirector when you're accessing it from outside then use a rule in your router's NAT table to assign the same name to the internal IP address of the host.

Then when you make the call to the name, if you are inside the router, the call is only directed internally (never even hits dyndns, therefore faster), and when you're outside it works too.

Maybe that's an obvious solution though.

Link to comment
Share on other sites

Why do people try these things!? There is only really 1 normal way of doing this and you tell them how to fix this issue and they turn around and say it's not good enough.

I'm sorry but there are only 2 ways to complete this and the most common way is DNS, so look into it a bit on google or what not and then get back to us regarding setup, do some proactive research as well as asking the question on here, it'll help us and yourself.

It seems we are going around in circles!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.