A Little Nat Help Please

General support questions and discussions.

A Little Nat Help Please

Postby me_rubin » Mon Feb 24, 2014 8:04 am

I've finally got it working!
I've configured my static internal IP address. Now I want to have it work from the outside world of my WIFI.

I've configured my Router's PORT FORARDING rule on my Verizon ACTIONTEC Router. I added the following rule.

192.168.1.60
Destination Ports 81
TCP Any -> 81
UDP Any -> 81 All Broadband Devices Active

( Currently you can see my static ip is 192.168.1.60 )

Now I know I need to change the Arduino code to from 80 to 81 LINE WebServer webserver("",80)

My question is in the IPHONE App. What IP address do I use?
Is it the Router DHCP address? 173.xx.xx.xx

I know the DHCP address can change, so I read somewhere that I need to name it and somehow register the name with the current DHCP address. I'm not sure where? I plug the name into the code so the name will get resolved to the correct address right?

It is a neat app. My first Arduion project so everything is new. I used a KA05 IO/ shield and it seems to work fine for both my door status pins 2,3 and relay's 8,9 I got two DLINK camera's and that part is working great. I'll post some pic's when everything is working on the projects link.

Thanks for your help here...
me_rubin
 
Posts: 7
Joined: Sat Jan 25, 2014 9:04 am

Re: A Little Nat Help Please

Postby support » Mon Feb 24, 2014 10:27 pm

Yes, you need to use your external IP address, that is the IP address of your home router, as
exposed over the internet, not the internal IP address of your Arduino.

Indeed, if you use an IP address as-is, you are subject to it changing over time (by your ISP). To
avoid this, you would typically use a naming service that will provide you with a fixed name to IP
mapping. Many of those services exist, such as dyn.com (some others are free too). Typically how
those work is that you install something on the inside of your network that monitors your external IP
and as soon as it changes, it notifies dyn.com of the change so that it can update its NAME->IP mapping
tables. Some routers have that monitoring tool built right in, so there's no need to install anything. Check
for DDNS in your router configuration to see if it's built-in for your specific router. When you use such
approach, in the iPhone app, you'd enter the DNS name instead of the actual IP, so that when the IP
changes, the service's map gets updated by the monitoring tool to reflect the address change, but the
actual name never changes.

Glad you're enjoying the app and the overall Arduino experience. Remember to post positive
feedback on the Apple App store for the app. Thanks in advance for doing so!

Best regards,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: A Little Nat Help Please

Postby me_rubin » Sun Nov 23, 2014 8:50 pm

Things have been working well, until the other day. I got a new Verizon Router...

Well my Nat Forwarding does not seem to be working for what I've configured in the new router.

Just to make sure it still worked. I changed the app back to the static ip address 182.168.1.60 - Yep it still works.

I went and looked and my external IP address is still the same and I can ping it from the outside.

To configure my new router, I go to Firewall Settings, Select Port Forwarding.
I specified the IP address 192.168.1.60 Picked the Custom Ports application Then picked Both (UDP & TCP and below is what it shows:
______________________________________________________________________________________________________________________
Network Computer/Device Name Application and Ports Forwarded Status
192.168.1.60 Destination Ports 81 Active
TCP Any -> 81
UDP Any -> 81


Any thoughts as to why it is not working now?

Thanks for your help in advance!

Mike
me_rubin
 
Posts: 7
Joined: Sat Jan 25, 2014 9:04 am

Re: A Little Nat Help Please

Postby support » Tue Nov 25, 2014 9:13 am

Hey,

If you changed the app to use 182.168.1.60 (external IP address) and it works, then you don't have a NAT issue.
If you changed the app to use a name instead of an IP address and it doesn't work, then you have a DNS issue.

Also, when you enter the server name in the app, make sure you enter it such as: http://my.home.router.name.com

How did you configure that name to lookup to that IP address? I'm guessing you're using some DynDNS service provider. Make
sure everything is properly defined with that DNS provider. You can test this name to IP resolution from the command line of
your computer using the following command:

"ping {name}" ...
or
"ping {ip address}" ...

Both should produce the same result if your name is properly assigned to the correct IP address. PS: The correct IP address
the name should be assigned to, is the IP address of your home router, not your Arduino's internal IP address.

Best regards,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: A Little Nat Help Please

Postby me_rubin » Tue Nov 25, 2014 2:47 pm

I must of made a typo in this post the ip address still is 192.168.1.60.

My home external ipaddress would be home.rubinsworld.com which I have configured on Go Daddy who manages rubinsworld.com it is a sub domain ip address configured.

That is what I have in the app. I can ping, you can too home.rubinsworld.com

The Port 81 is forwarded to the local ip, but it is not responding.

Like I said, if I change the apple app to http://home.rubinsworld.com:81 to 192.168.1.60 it works fine.

Thanks again for your help.

Mike
me_rubin
 
Posts: 7
Joined: Sat Jan 25, 2014 9:04 am

Re: A Little Nat Help Please

Postby support » Tue Nov 25, 2014 9:45 pm

Obviously if you change home.rubinsworld.com:81 to 192.168.1.60 it works ... That's because you are on your local network,
over WiFi and not going over the internet. Forget the app for now and try troubleshooting this using a web browser.

1) Determine your Arduino's IP address and port.
2) Using your web browser (IE, Safari, Firefox, Chrome, whatever), try connecting to ARDUINO_IP:ARDUINO_PORT ... You should get an XML payload response. Stop here if that doesn't work.

3) Determine the current external IP address (ROUTER_IP) of your home router
4) Define a NAT rule that will forward to your Arduino's IP and port. ROUTER_IP:SOME_PORT -> ARDUINO_IP:ARDUINO_PORT
5) Using your web browser, try connecting to ROUTER_IP:SOME_PORT ... You should get an XML payload response. Stop here if that doesn't work.

6) Have a DynDNS service associate ROUTER_IP -> SOME.NAME.OF.YOUR.CHOOSING.COM
7) Using your web browser, try connecting to SOME.NAME.OF.YOUR.CHOOSING.COM:SOME_PORT ... You should get an XML payload response. Stop here if that doesn't work.

Once all of the above works, go in the iPhone App and put in that same SOME.NAME.OF.YOUR.CHOOSING.COM:SOME_PORT ... Should work!

If this doesn't work, please report at which step it's failing. I think you're most likely confusing things here ...
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm


Return to Support



cron