Jump to content



Photo

How to Properly Setup a DNS Hostname with VPS Linux Server

Answered Go to the full post dns vps linux hostname server website

  • Please log in to reply
13 replies to this topic

#1 ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 03 September 2014 - 04:27

Hello,

Well, I just bought a cheap VPS server. Nothing too fancy for now. Just a little something to launch my portfolio. I also bought a domain name to go with it.

However, I'm a little lost..The VPS has Fedora 19 installed on it. How do I setup Bind? I'm trying to setup the hostname (the ns1.site.com thing), but the tutorials that I try..Well, they don't seem to work. None of the files are where they are suppose to be..I don't know if the tutorials are too old, or if I'm doing something wrong..Bind is installed already..And that's about all I know at the moment. I can't seem to find a good tutorial..Been trying to figure this out for a couple of hours now..Beginning to wonder if I should have gone with a simple web host instead of a VPS..lol

Thanks for any help



Best Answer +BudMan , 03 September 2014 - 11:56

So from their response they do not provide name services. Curious if they provide reverse for your IP. Mine does - so I can point my IP to my fqdn I create for my host. this is not a requirement unless you for example wanted to send email from the box for your domain. Many major players will block email from an IP without a proper reverse record (PTR)

Here is the thing - 1 IP, while some registrars might allow to only have one ns for your domain - it is VERY VERY BAD practice to do so. You should have 2 at min, so if you wanted to host the nameservers for your domain I would suggest we can setup your box as ns1, but will need to find a service that can be your 2nd (ns2) - many free places to do that.

From looking at your host support http://sibername.biz...-to-weebly-com/

They seem to support advanced dns - where you can create records for your domain using their NS - and then just create A records, etc. pointing to your IP.

If you want - if you let me gain access to your account on your registrar we can look through the screens together using teamviewer or something, etc. And we can get your vps with a name in your domain to resolve to its IP.

So in the end what is your goal - do you just want to be able to go to something.yourdomain.tld and get to your vps be it for ssh, ftp, www, etc. Or do you really want to play with running your own nameservices with bind?

Happy to walk you through whatever you want to do - but to be honest, I would go with just getting your registrars dns to resolve your domain to your vps IP. This is by far a much simpler and less complex setup. Go to the full post



#2 Jared-

Jared-

    Pick it, pack it, light it up...

  • Joined: 02-October 07
  • Location: Melbourne, Australia
  • OS: Windows Server\OS X

Posted 03 September 2014 - 04:37

Ns1 and ns2 usually refer to name servers, not host names. 

 

Are you trying to configure the your domain to point to your VPS? You can usually do this at the registar that hosts your domain name. This is where you enter the name servers.

 

Once you do that, you can create DNS entries (hostnames ie test.domain.com) that should work.

 

Not really sure if I've caught the drift of what you're trying to do? Sorry if i haven't.



#3 OP ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 03 September 2014 - 04:39

Sorry, I did mean name servers..Been at this so long, my mind is starting to fall apart..lol

Ya, I need my domain name to point to the server, but I can't seem to figure out how..how do I make the DNS entries? As far as I can figure out, I need Bind to do that?



#4 Jared-

Jared-

    Pick it, pack it, light it up...

  • Joined: 02-October 07
  • Location: Melbourne, Australia
  • OS: Windows Server\OS X

Posted 03 September 2014 - 04:45

Ok - so whoever hosts your domain name, log into the control panel\dashboard\whatever they call it and find the name servers options. Were you given a set of name servers that should point to your VPS?

 

I've never owned a VPS, but I have owned plenty of shared\dedicated physical servers where CPanel\Parallels something (can't remember name) were installed, where I've had the option to create DNS zones. Create a DNS zone for your domain (domain.com). This then allows you to create subdomains (downloads.domain.com etc) 

 

In theory this means, when someone enters your domain name, requests look at your name servers, then forwards requests to your VPS which can serve it up because it's primary DNS zone for your domain. 



#5 OP ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 03 September 2014 - 04:48

There is no CPanel..or Parallels. It's all command line..I login by SSH



#6 Jared-

Jared-

    Pick it, pack it, light it up...

  • Joined: 02-October 07
  • Location: Melbourne, Australia
  • OS: Windows Server\OS X

Posted 03 September 2014 - 04:50

OooOooo not much help then, don't think I've ever needed to work via SSH to do these things (Windows sysadmin here).



#7 Jared-

Jared-

    Pick it, pack it, light it up...

  • Joined: 02-October 07
  • Location: Melbourne, Australia
  • OS: Windows Server\OS X

Posted 03 September 2014 - 04:53

http://docs.fedorapr...DNS_Server.html

 

Not sure if that's much help.



#8 OP ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 03 September 2014 - 05:02

Not sure at the moment if it is..Too confused at the moment..

Don't know how to get a slave either..

Think I need a long break from this at the moment..Try again tomorrow, mind is too confused, to come back at it when it's a little more focused I think lol

Thanks for the help so far though :)



#9 Mike

Mike

    Neowinian Senior

  • Joined: 11-August 02

Posted 03 September 2014 - 06:36

Wherever you bought the domain from, use them for setting the DNS records, I would advise against running your own DNS server without learning it properly on a private network!



#10 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 03 September 2014 - 10:33

Who is your registrar?  They normally provide dns.

 

All nice that you want to setup bind.  But you only have 1 IP and 1 vps - hosting nameservers for a domain require 2 IPs, 2 nameservers that should be on different boxes in different geographic areas on 2 different networks, etc..

 

Thee was recently a thread where the way he had registered the domain through the hosting company the interface provided no way to create nameservers for your domain.

 

So in a nutshell

 

you have domainx.com, lets say you have 2 vps with these IPs

 

vps1 1.2.3.4

vps2 5.6.7.8

 

On your registrar you would create 2 nameservers

 

nsreg.png

 

createns1.png

 

The registrar now sends this to the root servers..  So when someone looks up domainx.com they know to go ask 1.2.3.4 or 5.6.7.8 for your records

 

Now on your vps you would setup bind to be authoritative for your domainx.com

 

Here is the thing - who is your vps host?  They more than likely provide nameservers you can use?  So on your registrar you point your domain to those.  Or your registrar more than likely provides dns where you come up with a name and on their interface you put in your host name.

 

So for example on my vps - I just use http://freedns.afraid.org/

 

I picked a domain from them, and created a A record pointed to my vps IP.

afraiddns.png

 

So there are plenty of ways to get a fqdn pointd towards your IP..  You hosting your own nameservers would be my last choice if I were you - for one you don't have enough IPs - or do you?  And you could use a free service as your secondary.

 

Lets start here - what is your vps host company so we can see what features they provide, and who did you register your domain with so we can see what features they provide.

 

Once we have this info - more than happy to show you how to setup bind.  BTW is that the OS you want to run - doesn't your vps allow you to install your OS of choice? 

 

 

 



#11 OP ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 03 September 2014 - 10:53

snip

I only have a few minutes before I have to go to work, so don't have time to review your post, but to answer the questions quickly, I have one IP.

Registrar is https://www.sibername.com/

VPS server host is http://media-hosts.com/ (http://www.openvz.ca)

And they have other OS's, I just like Fedora..I'm more familiar with it than some of the others. CentOS, Ubuntu, and a couple others I think.

 

I'll be on later today, with some more time to review your post.

Thanks for the help so far!


Oh, and I asked them in an email, if this helps any.

 

 

Sorry, one more question..What is my name server? I'm trying to setup my domain with my server. I have a domain already, I'm just trying to attach it. I've never done this before, but from what I can gather, I'm suppose to have a nameserver from you, what I attach to my domain? I just can't find out where to get that information. Almost have my site up, just can't figure this out. Do I have to create one?
I also need it pointed to a certain folder within /var/www/
Thanks for any assistance

 

And this is their response

 

On a VPS you would be required to create your own nameserver and run an authoritative DNS server on your VPS.

You would first need to create a DNS hostame with your registrar, for example: NS1.yourdomain.com - and point this to your IP: 199.167.128.57

Then you would need to install BIND or any other DNS server on your VPS and create the proper DNS zone for your domain.

Once that is ready, you can log back in to your registrar and point the domain to the new nameserver that you created previously.



#12 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 03 September 2014 - 11:56   Best Answer

So from their response they do not provide name services. Curious if they provide reverse for your IP. Mine does - so I can point my IP to my fqdn I create for my host. this is not a requirement unless you for example wanted to send email from the box for your domain. Many major players will block email from an IP without a proper reverse record (PTR)

Here is the thing - 1 IP, while some registrars might allow to only have one ns for your domain - it is VERY VERY BAD practice to do so. You should have 2 at min, so if you wanted to host the nameservers for your domain I would suggest we can setup your box as ns1, but will need to find a service that can be your 2nd (ns2) - many free places to do that.

From looking at your host support http://sibername.biz...-to-weebly-com/

They seem to support advanced dns - where you can create records for your domain using their NS - and then just create A records, etc. pointing to your IP.

If you want - if you let me gain access to your account on your registrar we can look through the screens together using teamviewer or something, etc. And we can get your vps with a name in your domain to resolve to its IP.

So in the end what is your goal - do you just want to be able to go to something.yourdomain.tld and get to your vps be it for ssh, ftp, www, etc. Or do you really want to play with running your own nameservices with bind?

Happy to walk you through whatever you want to do - but to be honest, I would go with just getting your registrars dns to resolve your domain to your vps IP. This is by far a much simpler and less complex setup.

#13 OP ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 03 September 2014 - 21:45

Seems that I made a mistake in buying that host then..Should have gone with something simpler..lol I just wanted a vps to have more control and get some more practice with Linux..

My goal is just to use the host for my site. Nothing fancy, just to launch my portfolio, a typical site..(With ftp access, which is already setup). I have two other sites to launch shortly, but not sure what I'm going to do with those..

Think I'll take you up on that offer too. I'll send you a PM. And simple and less complex sounds good to me! Just want to launch my portfolio...lol

Thanks for this help :)



#14 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 04 September 2014 - 00:52

I answered your PM - sure we can find a few minutes here soon.  Shouldn't take more than a couple of minutes to be honest.