LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configure DNS for Public IP (https://www.linuxquestions.org/questions/linux-newbie-8/configure-dns-for-public-ip-4175425221/)

sunveer 09-02-2012 01:18 AM

Configure DNS for Public IP
 
I want configure DNS for the public IP, so that anyone can access my web server using a name and not the public ip.

Please provide me the steps.

pingu 09-02-2012 03:00 AM

You need a valid domainname.
I don't know where you live but here are some:
www.godaddy.com
www.register.com
www.namecheap.com

These are examples, I have never used them, know nothing about them.
Google for "buy domainname" in your own language.

sunveer 09-02-2012 03:03 AM

Quote:

Originally Posted by pingu (Post 4770460)
You need a valid domainname.
I don't know where you live but here are some:
www.godaddy.com
www.register.com
www.namecheap.com

These are examples, I have never used them, know nothing about them.
Google for "buy domainname" in your own language.

These require DNS for our webhost and since my machine is the host, so I want to configure DNS for my machine.
Therefore, first I have to configure DNS and require those steps.

pingu 09-02-2012 03:15 AM

I'm not sure I understand you.
For DNS, you need a valid domainname. Then you set the nameservers to be used, normally done in registrars web interface.
You can use registrars nemeservers if you want, and point 'www.' and whatever url you like to your public ip.

Example, my domain 'tuxit'se':
Code:

Extract from "#whoios tuxit.se"
nserver:          ns3.binero.se
dnssec:          unsigned delegation
status:          ok
registrar:        Loopia AB

So I have bought the domainname from Loopia AB, then in Loopias controlpanel (webgui) I changed nameservers to ns#.binero.se

Then, in Bineros controlpanel I have my DNS records.

Code:

*        A        3600        195.74.38.17
@        A        3600        195.74.38.17
ftp        A        3600        195.74.38.22
www        A        3600        195.74.38.17

So, my website is on host with public ip 195.74.38.17

sunveer 09-02-2012 03:24 AM

Can I setup my own domain name instead of purchasing it from a registrar?

pingu 09-02-2012 03:30 AM

Nope - not if want it to be publicly available.
Using a domainname of your own means you have to set up your own dns-servers. Noone else will use them no matter how publicly available they are.
(Also, trying to set up a personal, publicly available nameserver will give you LOTS of headache! The only people I know of that do that are criminals who try to lure people to their sites.)

But domainnames aren't that costly, I pay around 10 euro / 15$ per year for a domainname.

sunveer 09-02-2012 03:35 AM

Quote:

Originally Posted by pingu (Post 4770467)
Nope - not if want it to be publicly available.
Using a domainname of your own means you have to set up your own dns-servers. Noone else will use them no matter how publicly available they are.
(Also, trying to set up a personal, publicly available nameserver will give you LOTS of headache! The only people I know of that do that are criminals who try to lure people to their sites.)

But domainnames aren't that costly, I pay around 10 euro / 15$ per year for a domainname.

I have configured DNS server for private IP on my machine and I want to see if I can set it for public IP. I am doing this to gain knowledge, not for any business or any criminal activity.

pingu 09-02-2012 03:47 AM

If you have your own dns server then you can use it to point any url you like to your public ip.
But only you will use it - well, of course you could ask some friends to use your dns server as their third.
You could put up a dns server accessible from outside, but as I said earlier noone will use it.
I don't know if you can get into trouble doing this. Probably not if your personal domainnames are clearly yours and do not exist in real Internet - but I don't know!
Alos legislation differs between countries.
Private dns servers are commonly used on private networks only, not publicly available.
The reason for that, and the legal problem you might run into, is because one way to steal money is to fiddle with dns & nameserver settings.

So, if you want your site available publicly: buy a domainname.
If you just want to play around & learn, set up a private network. In there you can use whatevere domainnames you like. (But beware, if you choose domainnames also used IRL, you will not be able to reach those sites.)

sunveer 09-02-2012 03:49 AM

Quote:

Originally Posted by pingu (Post 4770470)
If you have your own dns server then you can use it to point any url you like to your public ip.
But only you will use it - well, of course you could ask some friends to use your dns server as their third.
You could put up a dns server accessible from outside, but as I said earlier noone will use it.
I don't know if you can get into trouble doing this. Probably not if your personal domainnames are clearly yours and do not exist in real Internet - but I don't know!
Alos legislation differs between countries.
Private dns servers are commonly used on private networks only, not publicly available.
The reason for that, and the legal problem you might run into, is because one way to steal money is to fiddle with dns & nameserver settings.

So, if you want your site available publicly: buy a domainname.
If you just want to play around & learn, set up a private network. In there you can use whatevere domainnames you like. (But beware, if you choose domainnames also used IRL, you will not be able to reach those sites.)

Ok, I don't go in setting a public DNS.


All times are GMT -5. The time now is 08:41 AM.