Need Help With Dynamic DNS & Namecheap

RomesFall

‍‍‍
BuSo Pro
Joined
Oct 7, 2014
Messages
460
Likes
684
Degree
2
I digress, I've just bought myself a Raspberry Pi 3 B to host a small site on, cost wise it's just a huge saving over the course of a year.

I've setup a LAMP server on the Pi, installed WordPress, all that good stuff.

Like most people these days, I go through a router and my IP is dynamic, so I signed up with no-ip in order to 'solve' this issue.

In my mind all I now had to do was take the Hostname / IP they gave me and drop it into my domain registrar which is Namecheap.

That's where I'm stuck, and seven hells it's awful troubleshooting this. I'm just going round in endless circles right now, with no clear cut explanation from either Namecheap or no-ip on how to do it.

Can anyone tell me how the hell I'm supposed to get my domain pointed to my new server? Because either I'm not understanding it, and I can't use no-ip to resolve the issue or I just don't know what to edit in Namecheap to get the two working in symphony.

Thanks in advance guys.
 
I'm not familiar with no-ip, but how the internet works normally is a website is located at a server with an IP address - 277.277.277.277 for example, your home IP address in your case I am guessing. In order for a website to resolve you need to setup the domains nameservers settings to connect to a "system" that resolves the IP address of the server. That's where the NS1.Linode.com or NS1.Hostgator.com stuff comes in. All modern computers can do that on their own, but there are reasons that a proper nameserver is better, but bypassing that for now; Lets say you want to change it so your domain.com has custom nameservers of NS1.domain.com and NS2.domain.com. You need to edit your domain's hostname settings so NS1 and NS2 resolve to the 277.277.277.277 IP address AND THEN AFTERWARDS switch your domains nameserver to NS1.domain.com and NS2.domain.com.

So now when people do WHOIS queries they'll see you resolving to your own self at NS1.domain.com, and NS2.domain.com. If they do a "dig" on the commandline to those two hostname (in your world you might think of them as subdomains but they aren't subdomains), they will get the ip address 277.277.277.277.

So with that in mind, you would have to have no-ip provide you a static IP address so you can setup your domain's hostname to that IP address, then setup your nameservers to resolve to the NS1 and NS2 hostnames, so computers connected to the internet can know what IP address the website is located at and therfore know where in the world the server is located at which has the files.

Here are the instructions on how to setup the private nameserver settings with namecheap.com: https://kb.iweb.com/entries/21778632-Creating-Private-Nameservers-at-NameCheap-com

Within Godaddy, you can click on your domain, then click on the "Host Name" section like so:

iDA4a36.jpg


A pop up will come up that will allow you to add a new hostname, and you input NS1 and NS2 and have them resolve to your IP address:

zQmLQAa.jpg


Afterward change your name servers to the new NS1 and NS2 ones you just created.

--

All this is predicated on that at some level you have an IP address. Now if "no-ip" can hand you a static IP address that simply "forwards" data to the dynamic, maybe it'll work, but given the name...

... this is me overlooking the glaring flaw in this Raspberry Pi website theory, which I don't even know where to begin. One of my business partners would call this a "no money meeting"- meaning no new money is getting created as a result of this conference. You can hate me, but it's the truth. Are you aware of your upstream speed? Unless you plan on having zero traffic and not ranking within Google, and if that's the case I guess this is just a hobby situation and not to be taken seriously, so then we can all just carry on...
 
Is your ISP going to allow you to receive Internet traffic on port 80 (standard HTTP port)? Quite a few ISP's block port 80 incoming because they don't want their customers hosting their own sites.

Also, is opening up a computer on the inside of your network to the public what you really want to do? Say someone were to somehow manage to get a web shell on the Raspberry Pi through, say, a poorly implemented WordPress plugin. Now they are on the inside with all the computers on your network and now they also have a Linux server to set up camp on. Anything with an IP that is on a network is a potential attack vector, even if it's the thermostat on your wall or your home security cam. . .

A Raspberry Pi is nothing more than a mini computer with Linux and GPIO pins. If you know Debian Linux distos (e.g. Ubuntu), you'll be right at home on a Raspberry Pi. I'd definitely recommend NGINX over Apache because of the limited resources of the Pi.

If you are using this as a learning experience and investment in tech skills, by all means go for it, otherwise you're going to be much better off just going with Digital Ocean, Linode or some other VPS provider. If you still want to push forward, I'd be glad to explain any of the DNS concepts, port-forwarding or config changes on your router you might have to make to get this to work.
 
Is your ISP going to allow you to receive Internet traffic on port 80 (standard HTTP port)? Quite a few ISP's block port 80 incoming because they don't want their customers hosting their own sites.

Also, is opening up a computer on the inside of your network to the public what you really want to do? Say someone were to somehow manage to get a web shell on the Raspberry Pi through, say, a poorly implemented WordPress plugin. Now they are on the inside with all the computers on your network and now they also have a Linux server to set up camp on. Anything with an IP that is on a network is a potential attack vector, even if it's the thermostat on your wall or your home security cam. . .

A Raspberry Pi is nothing more than a mini computer with Linux and GPIO pins. If you know Debian Linux distos (e.g. Ubuntu), you'll be right at home on a Raspberry Pi. I'd definitely recommend NGINX over Apache because of the limited resources of the Pi.

If you are using this as a learning experience and investment in tech skills, by all means go for it, otherwise you're going to be much better off just going with Digital Ocean, Linode or some other VPS provider. If you still want to push forward, I'd be glad to explain any of the DNS concepts, port-forwarding or config changes on your router you might have to make to get this to work.

@SmokeTree

Hey mate,

I've sorted out the port forwarding and so on, to my knowledge at least. All WWW incoming traffic (presumably port 80) I've forwarded to the Pi.

This is definitely for the experience, nothing important is going on that machine. Just a personal blog that has no income tied to it.

Funny you mention the inherent security flaws, I'm connecting to the Pi over SSH with PuTTY. All Raspberry Pi's have the exact same username and password, so I've definitely got to change that. Not exactly hard for someone to do a reverse DNS lookup on my site once it's live and grab the IP and hop on.

I'm not really worried about plugins as I avoid the shitty ones, the ones I do use are paid for and in constant development (sure not 100% safe but hey) and I build 90% of my sites off of Buso Lightning now. I trust @Ryuzaki ' ability to code!

Having said all of that I'm sure there's probably things I haven't thought about security wise. I don't think I'm at high risk though, but certainly it is a risk.

I actually used to use Ubuntu and never thought I learned a great deal, but here I am 6 years later and using the console still and feel at home haha.

I'll definitely take you up on your offer of help if you're still willing though, because I'm sure that I've gone wrong somewhere. I just don't think it's the ports / router.
 
... this is me overlooking the glaring flaw in this Raspberry Pi website theory, which I don't even know where to begin. One of my business partners would call this a "no money meeting"- meaning no new money is getting created as a result of this conference. You can hate me, but it's the truth. Are you aware of your upstream speed? Unless you plan on having zero traffic and not ranking within Google, and if that's the case I guess this is just a hobby situation and not to be taken seriously, so then we can all just carry on...

Thanks for the info @CCarter I wasn't actually aware of the upstream stuff, but it's not a massive issue in this case. I really want to learn more about the back-end and I figure running a Pi is both a good learning experience and experiment.

I've seen a few sites running on them that genuinely do rank for keywords, paired with a CDN. As I said I'm unaware of the upstream speed stuff, just briefly read a less than comprehensive Wikipedia entry about it... So yeah still not 100% sure of the practical ramifications of that with a home web server.

I'd be interested to learn more about it though so I'll dig a bit deeper.

I don't know whether the sites that do rank are losing a lot of traffic by being hosted on these machines... From what you're saying that's most likely true.

I'm going to push ahead with this anyway, keep learning and so on.

It could even be an interesting case-study on here, if it's possible with a fast internet connection, a CDN and a $40 PC to run a fast, efficient web server for smaller sites. That would be cool data to have, because worst case scenario I still learn something.

Best case scenario BuSo members have another competitive advantage because even a basic shared web server is going to cost you like $80-90 a year? And for what? 5gb storage, limited bandwidth, 1 CPU core and unspecified RAM. Versus the most recent Pi where you get 16gb SD card (can run Raspbian or even Ubuntu from a USB instead), 1GB RAM and a 1.2ghz quad-core CPU with presumably unlimited bandwidth since most serious folks get plans that offer that.

I never bothered with getting a Pi in the past, but now it looks like they could by hardware alone be worth it. But as I say I need to understand what you said about upstream speed!
 
@CCarter is this what you're referring to? I think I might be ok! lol

No you won't be. For reduced latency hosting companies are connected to the backbone of the internet, for example think Level 3 which is a Tier 1 network (https://en.wikipedia.org/wiki/Tier_1_network). Here is a diagram from the wikipedia page:

Ce5INqI.jpg


^^ In your case you would technically be considered "tier 4" since you are connected to a tier 3 network, your ISP. Even if you "somehow" were connected to a tier 2, your customers still have to go through the whole back and forth communication to get to you, which would add an extra step (tier 2). At tier 4 you are adding 3 extra steps.

Think about it, a User connects to a website's hosting company's which is on a tier 1 network, and sends data down 3 tiers to get to the user's browser within milliseconds multiple times cause there are multiple files to send to your browser (average http connections for a web page are over 100+).

In your scenario you are sending data from a low level tier 4 UP 3 levels AND THEN down 3 again on the user's side - for multiple files, and god-forbid a packet gets lost within your added 3 levels, that starts the process all over for that file. On top of that ISPs detect people trying to run webservers off their home connection, just the overall latency alone Your 3-5 second website on a tier 1 setup now will load at what - 10-20 seconds?

There is a lot more to, like browser's max limit connections to a server and the max limit from your server of what can be handled simultaneously. That's probably why those other Pi setups are using CDNs. But there really is a lot more going on, but it's like trying to use your tricycle during a NASCAR race... "Can you?" "Technically yes, but there are barriers in place so you don't do that and even if by some miracles you get around those you are going up against people on tier 1 connections from the get-go."

There is also a lot more to running a web server than just comparing specs of a computer. Web Servers are built from the ground up to serve websites, there are fail safes and backup systems and a lot that goes into a proper operation to keep things online.

Another business partner of mine has a quote "That cost savings is going to cost you more in the long run."

Can I use my XBox to run as a web server, sure, but WHY would I waste time doing that? I dunno my brain doesn't work like most people at times. I see it as if the Xbox domain can't pay for it's own existence it doesn't deserve to exist, so just delete the website. And wasting all this time and energy towards saving $100? How many hours would I be working on this project that I know isn't going to generate revenue and just suck time that could be spent generating revenue?

Wouldn't it make more sense to spend that time and energy on mastering skills that will generate you revenue and profits versus hours on end down a blackhole project thought up from a no money meeting? That's what sort of saddens me and pisses me off about this cause it's clearly procrastination, it's clear as day cause no serious revenue generating results can come from this, yet I see people all the time putting hours, days, and years of their life towards things that never go anywhere and were really never meant to go anywhere.

My dilemma is before I hit that publish button for these posts, I wonder if I should simply delete my post or should I be kind to this person that's clearly wasting their time but no one has the balls to tell them that or they might get mad at me cause I call out a clear problem and they'd rather take the blue pill in life instead of harnessing the potential to make profits all of us have. If you don't take it to heart, hopefully someone reading this will realize the signs of wasted time that in the end is clearly procrastination. I know 99% of people aren't going to make it, but come on, at least TRY to do something productive that will help you create a better future for yourself.

ydcNN9C.jpg
 
Super interesting stuff about the network tiers @CCarter it makes sense, I think we all have an intuitive sense that there must be some advantage other than hardware that these hosting companies have.

Admittedly I didn't know what that was, but it's good to know it now.

Out of interest, how on earth do they get that kind of access to either have permission or simply 'connect' to the backbone of the internet as you put it? It's really more interesting than you probably think it is!

As for the procrastination stuff, fair shout. I think making some kind of a case-study would be procrastinating, and with the info you've now given me it's not worth a case-study regardless of that.

Just to make it clear though, I work on 1 project and anything else I do on a computer is for fun, for learning or a bit of both. E.g. In my downtime. I get that maybe you see it as if you have time to be at the computer you should be grinding, but to me it's no different than going to the gym. I do it for fun and self-improvement and a lot of my hobbies just happen to revolve around computers and I've finally got the time/money to explore a few more of them.

I love that comic btw lol
 
I actually used to use Ubuntu and never thought I learned a great deal, but here I am 6 years later and using the console still and feel at home haha.
Much respect for taking the time to learn the command line and sticking with it. No one becomes a Linux master with a cpanel. Feel free to PM or hit me up on Skype if you have any questions about Linux/Networking.

One thing that might be fun to look into is to put a bunch of scrapers on a Raspberry Pi. You can have a mini server doing work for you while you're using your workstation to concentrate on your money site(s). It would be an excellent platform for automation. Right out of the box they have Perl and Python installed on them and adding new langs is as simple as compiling source or apt-get. I have one of the older models but mainly use it along with an Arduino for the GPIO pins so I can control hardware (sensors, simple robotics, etc).
 
Much respect for taking the time to learn the command line and sticking with it. No one becomes a Linux master with a cpanel. Feel free to PM or hit me up on Skype if you have any questions about Linux/Networking.

One thing that might be fun to look into is to put a bunch of scrapers on a Raspberry Pi. You can have a mini server doing work for you while you're using your workstation to concentrate on your money site(s). It would be an excellent platform for automation. Right out of the box they have Perl and Python installed on them and adding new langs is as simple as compiling source or apt-get. I have one of the older models but mainly use it along with an Arduino for the GPIO pins so I can control hardware (sensors, simple robotics, etc).

Funnily enough after what @CCarter said earlier I was thinking of doing something along those lines, I've always wanted to learn Python for scraping. Could be fun.

And yeah screw cPanel... I'm too much of a curious geek for that!

I'll hit you up via PM for Skype details!
 
Back