User avatar
NickT
Posts: 272
Joined: Mon May 21, 2012 10:43 am
Location: UK

Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 8:00 pm

I have had an account, a host name and a static IP address with Demon for about 20 years. My Pi runs a little Apache/PHP web server on port 80 and I've port-forwarded a high number port on my router to port 80 on the Pi. This means I can access my Pi's server web pages at myhostname.demon.co.uk:nnnnn/ with no problems.

I'm going to be moving soon and sadly will have to leave Demon, as the new address will have a poor ADSL speed and Demon don't offer fibre yet. I'll probably have to go with an ISP like Virgin who do offer fibre but not a static IP address. I'm not even sure I'll get a hostname?

My question is simple: How can I continue to reach my RPi's web pages from outside when I move ISP? I'm sorry if this is a really stupid question but it's not something I've ever had to think about before.

umputun
Posts: 2
Joined: Sun Jan 13, 2013 8:07 pm

Re: Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 8:10 pm

DynDns will help you. On pi side you may use ddclient to update automatically

titanicsaled
Posts: 15
Joined: Tue Feb 28, 2012 4:24 pm
Contact: Website

Re: Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 8:32 pm

I have my raspberry pi hosted on a virgin media super hub. Although virgin don't actually give you a static ip address, the only time my ip has ever changed is when i upgraded from a modem to the new superhub. I wouldn't have any concern regarding the IP address changing. If your IP address does appear to change then I would use a dynamic dos provider like dyndns which gives you a subdomain that will always point to your Pi's home IP address.

Your biggest problem wont be the IP address it will be the superhub that virgin provide. Sometimes it decides to stop portforwading and you have to reboot the router to fix it.

If you have any more questions then fire away and I'll do my best to answer them!

trouch
Posts: 310
Joined: Fri Aug 03, 2012 7:24 pm
Location: France
Contact: Website

Re: Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 8:49 pm

you can use a dynamic dns:
http://www.no-ip.com/
http://dyn.com/dns/

it requires a client running on your pi that will detect IP change then update DNS record on your dynamic dns provider.
there is also some routers which provide that feature to avoid installing the client.

WebIOPi - Raspberry Pi REST Framework to control your Pi from the web
http://store.raspberrypi.com/projects/webiopi
http://code.google.com/p/webiopi/
http://trouch.com

User avatar
NickT
Posts: 272
Joined: Mon May 21, 2012 10:43 am
Location: UK

Re: Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 8:52 pm

Do you actually get a host name like xyz123.virginmedia.com when you sign up? I can't work out whether it's just the IP address that can vary with dynamic addresses or if the concept of an actual hostname doesn't exist?

User avatar
NickT
Posts: 272
Joined: Mon May 21, 2012 10:43 am
Location: UK

Re: Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 8:55 pm

Thanks all. Even though I haven't got my head round this, I think the important point is you are both saying 'it can be done'. I'll worry about the details when I've got less on my mind and the time gets nearer.

trouch
Posts: 310
Joined: Fri Aug 03, 2012 7:24 pm
Location: France
Contact: Website

Re: Accessing my RPi web server when I change ISP

Sun Jan 13, 2013 9:02 pm

NickT wrote:Do you actually get a host name like xyz123.virginmedia.com when you sign up? I can't work out whether it's just the IP address that can vary with dynamic addresses or if the concept of an actual hostname doesn't exist?
you will have whatyouwant.no-ip.com
you can also buy your own domain and set it up on your dynamic dns provider

WebIOPi - Raspberry Pi REST Framework to control your Pi from the web
http://store.raspberrypi.com/projects/webiopi
http://code.google.com/p/webiopi/
http://trouch.com

turbine2
Posts: 47
Joined: Thu Dec 06, 2012 11:21 am

Re: Accessing my RPi web server when I change ISP

Mon Jan 14, 2013 9:54 am

NickT wrote:Do you actually get a host name like xyz123.virginmedia.com when you sign up? I can't work out whether it's just the IP address that can vary with dynamic addresses or if the concept of an actual hostname doesn't exist?
You won't get a host with Virgin Media like you did with Demon (where you'd have ended up with my_chosen_login.demon.co.uk), but if you go down the route of the DDNS piece you will (something like my_chosen_login.ddns.org instead) and you can use DDNS with a Virgin Media cable connection.

Note, cable and fibre are different things, Virgin Media cable although not offering a true static IP does give you an IP that will rarely change (only usually changes when they resegment that area of the network or you get a replacment Super Hub). Virgin Media don't do fibre (yet, but may do soon). Fibre and ADSL work in a similar way for IP addressing (i.e. every time you dicsonnect / connect you'll get a new address). You can tell if you'll get cable or ADSL on the Virgin Media site (yes, I work for Virgin Media)
David

User avatar
NickT
Posts: 272
Joined: Mon May 21, 2012 10:43 am
Location: UK

Re: Accessing my RPi web server when I change ISP

Thu Jan 24, 2013 6:41 pm

Thank you all for the helpful advice. Virgin assure me that I will be getting fibre not cable in my new location, so I guess the IP address can change quite often. Acting on a suggestion I've got myself a hostname on no-ip.org and installed the noip2 client on my Pi. When I ran "make install", I opted for the default 30 minute update. I think I'd like to change that to be 10 minutes. How do I reconfigure the client? I've seen some web references suggesting editing no-ip2.conf, but it doesn't look to be a suitable text file with entries for hostname and update interval. It does appear to be some form of encrypted ASCII though.

Update: Rerunning 'make install' and specifying a different interval seems to have done it

Return to “Networking and servers”