• 0

How to Properly Setup a DNS Hostname with VPS Linux Server


Go to solution Solved by BudMan,

Question

ncc50446

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

Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0
binaryzero

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.

Link to post
Share on other sites
  • 0
ncc50446

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?

Link to post
Share on other sites
  • 0
binaryzero

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. 

Link to post
Share on other sites
  • 0
ncc50446

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

Link to post
Share on other sites
  • 0
binaryzero

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

Link to post
Share on other sites
  • 0
ncc50446

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 :)

Link to post
Share on other sites
  • 0
Mike

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!

Link to post
Share on other sites
  • 0
+BudMan

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

 

post-14624-0-44382700-1409739673.png

 

post-14624-0-56158100-1409739737.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.

post-14624-0-35495100-1409740279.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? 

 

 

 

Link to post
Share on other sites
  • 0
ncc50446
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.

Link to post
Share on other sites
  • 0
+BudMan

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/tutorial/how-to-point-my-domain-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.

Link to post
Share on other sites
  • 0
ncc50446

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 :)

Link to post
Share on other sites
  • 0
+BudMan

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.

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Namerah S
      LinkedIn is not working right now, support team is working on fixing it
      by Namerah Saud Fatmi

      Reports are pouring in from news sources such as The Verge and individuals alike. The professional networking service LinkedIn is currently facing some problems and is facing an outage. Both the website and the mobile application seem to be affected by the breakdown.

      LinkedIn's team members have responded to the outage, taking to Twitter to address the users' concerns. The response can be seen in the Tweet below:

      According to Downdetector, 89% of LinkedIn users are having trouble with the website at the moment.

      Hopefully, the Microsoft-owned professional networking platform will be back online soon. In the meantime, users will have to sit tight and wait patiently.

    • By News Staff
      Practical Linux Security Cookbook - Second Edition ($35.99 Value) Free Download
      by Steven Parker

      Claim your complimentary eBook (worth $35.99) for free, before the offer expires on 03/03.



      Over the last few years, system security has gained a lot of momentum and software professionals are focusing heavily on it.



      Linux is often treated as a highly secure operating system. However, the reality is that Linux has its share of security aws, and these security aws allow attackers to get into your system and modify or even destroy your important data. But there’s no need to panic, since there are various mechanisms by which these aws can be removed, and this book will help you learn about different types of Linux security to create a more secure Linux system.

      With a step-by-step recipe approach, the book starts by introducing you to various threats to Linux systems. Then, this book will walk you through customizing the Linux kernel and securing local files. Next, you will move on to managing user authentication both locally and remotely and mitigating network attacks. Later, you will learn about application security and kernel vulnerabilities. You will also learn about patching Bash vulnerability, packet filtering, handling incidents, and monitoring system logs. Finally, you will learn about auditing using system services and performing vulnerability scanning on Linux.

      By the end of this book, you will be able to secure your Linux systems and create a robust environment.

      This free offer expires on March 3.

      How to get it
      Please ensure you read the terms and conditions to claim this offer. Complete and verifiable information is required in order to receive this free offer. If you have previously made use of these free offers, you will not need to re-register. While supplies last!

      >> Practical Linux Security Cookbook - Second Edition ($35.99 Value) - free download <<
      Offered by Packt Publishing, view their other free resources. Expires 03/03/21.

      Not for you?
      That's OK, there are other deals on offer you can check out here.



      Home Gym Giveaway | Ultimate Gaming Giveaway (feat. PlayStation 5 & Xbox Series X) Ivacy VPN - 5 year subscription for just $1 per month NordVPN - 2 year subscription at up to 68% off Private Internet Access VPN - subscriptions at up to 71% off Unlocator VPN or SmartDNS - unblock Geoblock with 7-day free trial Neowin Store for our preferred partners. Subscribe to Neowin - for $14 a year, or $28 a year for Ad-Free experience Disable Sponsored posts · Neowin Deals · Free eBooks · Neowin Store

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.

    • By zikalify
      Debian 10.8 launches with new software patches and updates
      by Paul Hill

      Image via Alex Makas The Debian Project has announced the availability of Debian 10.8, the eighth update to its stable distribution Debian 10. Each time a point release is made available, a new ISO is spun with all the latest security fixes and software updates so that they do not need to be installed when Debian is installed on a new system.

      Some packages that have received updates with Debian 10.8 include Firefox ESR, Chromium, Flatpak, VLC, the Linux kernel, OpenSSL, X.Org, APT and Thunderbird. The NVIDIA graphics drivers have also been updated to a newer upstream version that fixes a denial of service issue.

      Appealing to users to think about the environment, the Debian Project said:

      Debian 10 was first launched on July 6, 2019, and it’s set to receive long-term support until 2024. Each new version of Debian arrives every two years but launch dates are not set in stone. If there aren’t any delays, Debian 11 should come out this year and Debian 10 will be demoted to the status of Old Stable alongside Debian 9 which is maintained by the main Debian security team until July 18, 2020.

    • By zikalify
      Canonical releases second point release of Ubuntu 20.04 LTS
      by Paul Hill



      Canonical has announced the availability of Ubuntu 20.04.2 LTS – the second point release for Ubuntu 20.04 LTS. As with other point releases, Canonical has spun a new ISO that includes all the security and software updates and it comes with the latest hardware enablement stacks so that newer hardware works properly.

      Ubuntu 20.04.2 LTS is available for the Desktop, Server, and Cloud products as well as other flavours of Ubuntu such as Kubuntu, Ubuntu Budgie, Ubuntu MATE, Lubuntu, Ubuntu Kylin, Ubuntu Studio, and Xubuntu. If you want to download any of the Ubuntu products or the spins, head over to the Ubuntu downloads page and find what you want.

      According to the Ubuntu 20.04 release notes page, Ubuntu 20.04.2 LTS ships with the Linux 5.8 kernel instead of Linux 5.4 which was the original kernel shipped last April when Focal Fossa came out. Those installing Ubuntu Server will have to opt-in to using the new kernel through the installer bootloader as it’s not the default choice.

      As with all Ubuntu LTS releases, you should expect security and software updates for five years until the first half of 2025. The derivative flavours are an exception, however, receiving support for just three years.

    • By LoneWolfSL
      Total War: Warhammer III announced by Creative Assembly, coming this year
      by Pulasthi Ariyasinghe

      The Total War: Warhammer trilogy that Creative Assembly began back in 2016 is concluding this year with the newly revealed third entry. After several teasers from the past few days, publisher Sega announced the latest turn-based and real-time strategy title today with a brand new cinematic trailer, catch it above.

      Total War: Warhammer III will have the conflict expanding to further territories like the Realms of Chaos and Lands of the East. New fantasy races are incoming too, with Kislev and Cathay, as well as Chaos factions Khorne, Nurgle, Slaanesh and Tzeentch. The studio promises to deliver the most diverse array of "legendary heroes, gargantuan monsters, flying creatures and magical powers that the series has ever seen."

      "Our vision, from the start, was to create a series that felt like an incredible journey through this world we all loved," said game director Ian Roxburgh. "The enormous support of our players in ensuring the success of the first two installments has pushed our ambition to new heights, and we can’t wait for everyone to experience it."

      Like in the first two games, Creative Assembly will allow players to combine the maps of the complete trilogy to have one massive campaign. However, this will arrive as a post-launch free update, as the studio's full focus is currently on Total War: Warhammer 3.

      Total War: Warhammer 3 is coming to Windows later this year, with Linux and macOS versions coming soon after. Both Steam and Epic Games Store versions are currently available for pre-order, and Creative Assembly will be bringing the previous two games and all their DLC to the latter store before the latest game's launch.