Static IP from a DHCP IP - Comcast

Static IP from a DHCP IP - Comcast

Postby KodyPython » Sat Aug 06, 2016 11:35 pm

Good Afternoon All,

I am building a Myowncloud Server with my Raspberry 2 and all is going well until I realized that Comcast issues Dynamic IP's. Opps..

So in doing some research on the net, I have found out how to add a static IP to my PI but they suggest using an IP outside of my DHCP range.

For example, (No not my real IP)

Starting DHCP Address: 192.168.1.100
Ending Address: 192.168.1.149

The one the guide showed picking as a static is 192.168.1.4.

That is NOT in my range so is it safe to use it?

Thanks,

Kody
KodyPython
 
Posts: 9
Joined: Sun Jul 31, 2016 5:28 am

Re: Static IP from a DHCP IP - Comcast

Postby Ofnuts » Sun Aug 07, 2016 9:58 pm

You are talking about different things. In your home, things that connect to the router get an address in the home network, usually in a 192.168.*.* range. Your router is itself connected to the internet at an address assigned by your ISP, and acts as a bridge between your own network and internet. It does a bit of magic with the addresses and the connections, so all devices in your home share one single address as seen from the internet. The router remembers which device in your home talks to which server on the internet, so when the server answers back the router can send the answer to the proper device. However this is true only for connections initiated from your home devices. The random computer connected to the Internet can't connect to your devices (which is fortunate otherwise they would have been pwned already....).

So to connect to your server from the internet you need several things:
  • a fixed address for your Rpi on your home network. Since, once it is allocated, the router tend to reassign it to the same device, this is probably already the case.
  • a specific configuration in the router to tell it to allow connections from the outside on specific ports (NAT addressing). In practice this is mostly telling the router that connection attempts from the outside on some given ports (80 and 443, likely) should be routed to the address of the Rpi. Make sure your code is robust, and that having your Rpi pwned has little consequences.
  • at that point you can connect to the server from the internet, if you know your current Comcast address. To make this a bit easier, there are dynamic DNS server out there (free or not). You subscribe to a name, says kodipythonserver, and regularly update your IP (which can be as simple a issuing a regular http request to the site, using a cron job). Then outside users can connect to your systems using kodipythonserver.dynamic-dns-service-name.com, and this will be resolved to your last known address.
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987

Re: Static IP from a DHCP IP - Comcast

Postby KodyPython » Wed Aug 17, 2016 5:28 pm

I probably am talking two different things.. sorry.. still being new the vocab is not quite there.

I am doing the best I can.

Has anyone had issues of their PI2 going into a screen saver or power down mode? I had to walk away for a couple of hours and the TV went dark and I could not Putty into it. the power light was on but the activity light was not.

Sorry I do not have the vocab.

Kody
KodyPython
 
Posts: 9
Joined: Sun Jul 31, 2016 5:28 am

Re: Static IP from a DHCP IP - Comcast

Postby Ofnuts » Wed Aug 17, 2016 8:23 pm

Not that many people here use a Rpi. Maybe ask on a Rpi forum?
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987


Return to Networking

Who is online

Users browsing this forum: No registered users and 2 guests

cron