• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Assigning a non-local Ip address

Status
Not open for further replies.

EOJ

Member
So I'm playing around with this arduino project:

https://arduino-info.wikispaces.com/ethernet-temp-humidity

Basically I can take temperature and humidity readings and calculate the dew point and have them displayed on the internet using an Ethernet shield.

The problem is when I figured out how to assign the sensor/ethernet shield an IP address, it turns out its a local ip address which prevents me from accessing the readings from a device outside my LAN.

My question is how can I assign the ethernet/sensor a global ip address that would allow me to view the readings from anywhere?

The ethernet/sensor is operating though my wireless router at home. If you can, please include relevant websites PDFs, articles, that my be of help.

Thanks again.
 

Reloadron

Well-Known Member
Most Helpful Member
In keeping it simple there are two types of IP (Internet Protocol) addresses. There are Fixed and Dynamic. Your ISP (Internet Service Provider) assigns your IP address and unless you are paying a premium for a fixed web address you have a dynamic IP address which periodically changes. For example do a Google of "get my ip address" will bring up your current IP address later it may be different and by tomorrow different again. A dynamic IP address changes. Your ISP can assign you a "fixed" IP, usually at an expensive cost. A fixed IP address does not change. That is where you need to start. You create a web page and the arduino sends data to the Ether Shield and the shield is assigned a static IP address.

You can try getting a fixed IP from a third party. A Google of "third party static ip" will get you going. This method is popular for people using WordPress and similar software.

Something else to read up on is port forwarding.

Ron
 
Last edited:

Reloadron

Well-Known Member
Most Helpful Member
Yes...port forwarding...that's why I ask for the model number of the router...
That might work and be a quick. easy and low cost solution. Should work. Cool thinking on that one.

Ron
 

djsfantasi

Member
There are four types of IP addresses. Fixed vs. dynamic. Local (non-routable or private) vs. public, routable addresses. Two times two is four.
 

picbits

Well-Known Member
If your local IP device is serving web pages on port 80 then you need to port forward a port on your routers external IP to port 80 on your local IP.

I.e. if your local device is 192.168.1.123 and your external is 80.123.123.123 then you tell your router (for example) to forward port 1234 on the external IP to port 80 on the 192.168.1.123 device.

Then from a browser anywhere in the world you could type http://80.123.123.123:1234 and it would route the traffic correctly. I run a number of web and email servers through various ports for various devices.
 

Reloadron

Well-Known Member
Most Helpful Member
If your local IP device is serving web pages on port 80 then you need to port forward a port on your routers external IP to port 80 on your local IP.

I.e. if your local device is 192.168.1.123 and your external is 80.123.123.123 then you tell your router (for example) to forward port 1234 on the external IP to port 80 on the 192.168.1.123 device.

Then from a browser anywhere in the world you could type http://80.123.123.123:1234 and it would route the traffic correctly. I run a number of web and email servers through various ports for various devices.
Thanks for sharing. Something I just never got into.

Ron
 

picbits

Well-Known Member
I probably haven't explained it brilliantly but 90%+ of the information needed to let internal network devices free on the big World Wide Web is in my post :)
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
Although not you initial question: see Amazon Web Services https://aws.amazon.com/documentation/ for a whole new ball of wax to play with.

For your other question, you will need a DYNDNS (Dynamic DNS) http://dyn.com/dns/?rdr=dyndnsorg running somewhere (a good place is your router), So, whenever your IP address changes, your assigned easy to remember name will point to your home instead of someone elses's. This is just one provider.

But, the basic idea is to forward a port with your router to the private IP address and port (can be different).

HTTP is port 80 and well-known ports have a "service" associated to it. You may not want http: to point to your datalogger, so you could use mydynamicaddressname:99 where the public port 99 is forwarded to the private IP 192.168.1.100:80

FWIW: There's lots of issues trying to email from devices on your network.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top