LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2005, 09:33 PM   #1
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
Post Web server Debian "Sarge"


Hello Everybody!
Can some one help me and probably teach me or point me out?
I have a 256kbps broadband connection and a static IP from my ISP that is also my external IP (85.x.x.x). I also have all the other IPs for the 2 dns servers from my ISP, gateway, subnetmask. The domain is, lets say x.y.ro. I think my hostname is paul.manole? I also have a mail address that looks like paul.manole@x.y.ro. I wonder: can i set up Apache on my Debian box for a site like paul.manole.x.y.ro? How do I setup? Can someone point me to a good easy guide to understanding DNS or setingup bind or what to do after buying a domain? I'm total newbie to DNS but i'm very interested!
 
Old 08-06-2005, 10:36 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
This should get you started;
http://www.aboutdebian.com/contents.htm
First get your hostname and domainname set up,then use whoever you buy the name from to direct your domain to your static address.
 
Old 08-06-2005, 10:48 PM   #3
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Talking Thanks!

Ok I know the domain, it's tulcea.astral.ro and my hostname must be paul.manole!
Ok so if I buy a domain i have to redirect it to my static ip right? Thanks!
After I buy a domain how do i set it up? I get a password and username right? But how do i manage it?
So i I buy a domain i don't have to worry about a thing, i have total control right?
So lets say i buy a domain subcm.net, my hostname should be subcm and domain net for a address like "http://subcm.net"?
And if i want something like "http://www.subcm.net" then my hostaname will be www and domain subcm.net?
Then if i buy the domain i will have to set up bind to control the domain subcm.net and other hosts that I could put on the domain(how should it look for both modes?)?
Thanks very much but could someone point me out or explain things to me basically about domain name servers and system?
 
Old 08-06-2005, 11:09 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
If the domain is tulcea.astral.ro
and the hostname is paul.manole
then your FQDN is paul.manole.tulcea.astral.ro
my hostname is abbottdavid and my domain is no-ip.info(a free one)
so my FQDN(fully qualified domain name) is
abbottdavid.no-ip.info
my /etc/hosts
Code:
# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1	localhost.localdomain          localhost
192.168.0.2	tux.no-ip.info			tux
192.168.1.96	abbottdavid.no-ip.info		abbottdavid
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Now to get the WAN to be able to see the server I had to do 2 things. First forwarded all requests to port 80 of my static address to 192.168.1.96 on the LAN and then told no-ip.info my static address so when you go to abbottdavid.no-ip.info first it goes to no-ip.info's dns server then to my isps dns server then to my dsl modem and then to 192.168.1.96.I think that is how it works.Yours may be a little different.Also you need to get port 80 open if it is a web server, or you can use 8080 .There is alot of ways to do it.It can get confusing for me at times.Sorry that I'm not very clear.

Last edited by comprookie2000; 08-06-2005 at 11:18 PM.
 
Old 08-06-2005, 11:29 PM   #5
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Your hostname I think is tulcea
and your domanname is astral.ro
tulcea.astral.ro
If you want to buy lets say;
paulmanole.org
your hostname is paulmanole and the domainname is org
now lets say you set it up as a mail server and your username is paul your emain would be;
paul@paulmanole.org
 
Old 08-07-2005, 03:34 AM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Quote:
If you want to buy lets say;
paulmanole.org
your hostname is paulmanole and the domainname is org
That is totally wrong. paulmanole.org is a domain. If you bought paulmanole.org, you can name your computer homedesktop, and that is a hostname. Hostnames are more or less irrevalent. You can point DNS at FQDNs if you want to. Some.random.string.of.crap.at.mydomain.com can be directed at any IP you want, and wether it is a FQDN or hostname/domainname isn't clear to the outside world.

Back to the original poster, you can set up your website to be paul.manole.x.y.ro, but you will have some problems doing so, unless you have control over the domain x.y.ro. DNS delegates down, and paul.manole.x.y.ro would be a subdomain of x.y.ro. For that address to work, you either have to have an entry for paul.manole.x.y.ro added to the DNS of x.y.ro, or the people at x.y.ro have to give you control of the subdomain paul.manole.x.y.ro. I don't see ISP's here in the US delegating subdomains to their clients, but it could happen. Regardless of the DNS situation, it doesn't matter if your computers hostname is localhost, paul, paul.manole, or ihatehostnames.

The easiest thing to do with your setup would be to buy paulmanole.org, set up a DNS box (ns1.paulmanole.org) at one of your static addresses, and make it authoritative for the paulmanole.org domain. Have the DNS box point to the IP address of the paulmanole.org webserver. It could even be the same box. To creaete your own DNS, you have to have 2 servers, so if you don't have access to 2 static addresses, that won't work.

Peace,
JImBass
 
Old 08-07-2005, 04:05 AM   #7
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Smile Thanks!

JimBass thanks! Looks like you know DNS very well.
Quote:
The easiest thing to do with your setup would be to buy paulmanole.org, set up a DNS box (ns1.paulmanole.org) at one of your static addresses, and make it authoritative for the paulmanole.org domain. Have the DNS box point to the IP address of the paulmanole.org webserver. It could even be the same box. To creaete your own DNS, you have to have 2 servers, so if you don't have access to 2 static addresses, that won't work.
What does making authoritative mean? What do you mean by having the DNS box point to theIP address of paulmanole.org webserver? The name server controls paulmanole.org, right? But its hostanem is ns1, right? So the web server hostname could be www or just paulmanole? So when someone accesses "http://paulmanole.org" or "http://www.paulmanole.org" will acces ns1 that wil redirect them to the ip of paulmanole or www? Anybody know a good DNS tutorial (like tho one win2k used to have, that I didn't read 'cause i got rid of 2k)?
comprookie2000, My hostamane is not tulcea because its the name of the city I live in, its a subdomain of astral.ro, my ISP(http://www.astral.ro).
But if my email addres is paul.manole@tulcea.astral.ro does that mean my hostname is paul.manole?
When I was using Fedora after performing DHCP (my ISP has DHCP but my IP is static) it told me something like manole_paul is not a registered hostname or something like that and that i should enter it in etc/hosts and I did and It didn't bother me anymore. It provided me with a hostname i didn't enter manole_paul by myself. But manole_paul is not a valid hostname because of the "_" (i tried to enter it in win and mandrake and it didn't let me).
 
Old 08-07-2005, 09:49 AM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
It seems that you don't quite understand how DNS works. All computers have numeric addresses, which are IP addresses. When you type a name into your machine, like yahoo.com, google.com or some.subdomain.of.google.com, your computer has no idea what the IP address of that site is. Your computer asks its DNS server, and the DNS server will look for the DNS server that is authoritative for the domain. Authoritative means that the registrar (site/corporation you buy your domain from) says that anyone looking for info about your domain should ask the nameserver you list when you register the domain name. That is the only location that can provide the answer to "what is the IP address of paulmanole.org". The DNS server can return any valid IP address for your site, and then the browser or program looking for paulmanole.org has a numeric address to find it at.

Hostname means absolutely NOTHING. ns1.paulmanole.org, ns2.paulmanole.org, and paulmanole.org could all be on the same box (as long as it has at least 2 different IP addresses, because of the nameservers), and the hostname of that box has no impact at all on the domain name. paul.manole@tulcea.astral.ro is an email address only, and it can be checked from any machine in the world, the hostname has no association with email adresses. Your ISP doesn't assign you a hostname, you'll never be asked for a hostname, and it has no impact on anything.The issue you had with hostnames and fedora was it tried to authenticate you with the domain by hostname. I don't think any ISPs do that anymore, but again, I'm unfortunately US centric, so it may still be done in other parts of the world. It returned a failure notice because it couldn't get paul_manole verified by .x.y.ro. It probably couldn't get any hostname to authenticate, as nobody does that. Just set a hostname when you install, and you'll never have to think about it again.

This book would help clear up your understanding of DNS functionality - http://www.oreilly.com/catalog/dns4/

Peace,
JimBass
 
Old 08-07-2005, 03:21 PM   #9
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Wink Thank you very much for teaching me!

JimBass I want to thank you for teaching me and pointing me out.
You've been a great help to me! Thanks man!
Quote:
Your computer asks its DNS server, and the DNS server will look for the DNS server that is authoritative for the domain. Authoritative means that the registrar (site/corporation you buy your domain from) says that anyone looking for info about your domain should ask the nameserver you list when you register the domain name. That is the only location that can provide the answer to "what is the IP address of paulmanole.org". The DNS server can return any valid IP address for your site, and then the browser or program looking for paulmanole.org has a numeric address to find it at.
Let me get this straight!
1.My computer asks my DNS server(the ISP's) for the IP
2.The ISP's DNS asks other DNS's to find the authoritative DNS server which is the DNS that holds the IP of the site I'm trying to reach
3.The nameserver i list when i register the domain is MY DNS server that holds all the info(IP's) about MY DOMAIN like every host on it and every subdomain(that are other hosts runing a nameserver) so actually when i buy a domain my nameserver gets registered on a root nameserver or on the rigistrers namesever?
4.So finally i have to have two IP's to set up a site, one for the nameserver and one for the site(which can both be on the same computer but I need 2 IP's). Can I for example have only one IP and when someone tries to reach my site would get the IP of My nameserver that would hold the site too?
Quote:
Your ISP doesn't assign you a hostname, you'll never be asked for a hostname, and it has no impact on anything.The issue you had with hostnames and fedora was it tried to authenticate you with the domain by hostname. I don't think any ISPs do that anymore, but again, I'm unfortunately US centric, so it may still be done in other parts of the world. It returned a failure notice because it couldn't get paul_manole verified by .x.y.ro. It probably couldn't get any hostname to authenticate, as nobody does that. Just set a hostname when you install, and you'll never have to think about it again.
About the manole_paul hostname: I didn't assign it. It tried to authenticate alone. I didn't give it any name so how did it find my name???
So if ISP's don't authenticate users by hostaname anymore how do they authenticate then, by MAC?
If I want to join the domain x.y.ro and i would now the hostname I still need an administrator password to join, right?
 
Old 08-07-2005, 04:45 PM   #10
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
The 2 IP address issue is only beacuse you have to have at least 2 names servers when you register a domain name. Your name server can be at the same IP address as your site, but you need 2 seperate addresses for the 2 DNS servers. If you don't have 2 static addresses through your connection, you'll need to have someone else do your DNS. That is forced redundency, that way if one DNS box goes down, there still is another that can provide answers to any machine looking for them. Of course in the practical world, if you have 2 addresses, and your connection goes down, both your DNS addresses and your webserver won't be reachable. That is also why most registrars suggest you have your DNS server on seperate class C addresses (a class C is 256 addresses), and also in different geographic locations.

What you have in 1, 2, and 3 is basically correct. I left out the info about caching, which is where a DNS server is asked by another server, "what is the address of google.com", the google DNS will say, "address X.Y.Z.A, use that answer for 10 minutes". That way the name server that makes the request will give that answer out for 10 minutes. If they actually had to look up the domain name everytime it was requested, it would be extremely difficult on the name servers. For a small site like your own, caching doesn't become an issue.

Comment 4 would be like this, if you have only 1 address. You would set up the zone paulmanole.org, and create a few entries. You would have to put an entry for paulmanole.org, www.paulmanole.org, ns1.paulmanole.org, and any other hosts you want defined by names. They all can point to the same IP address, but again, you need at least 2 nameservers, so you will have to have 2 addresses to get that to happen. I would not put hostnames in your DNS that you don't want to be seen on the open internet. There is no need for yourlaptop.paulmanole.org to have a static IP that is publicly accessible. There is no practical limit to the number of subdomains you list, but why bother adding something that only needs to be reached internally on your LAN?

Most ISPs that authenticate users do it by several different methods. Some use sign in name and passwords, some record MAC addresses, but not of network cards, because those are always subject to change. They will take MAC addresses of cable modems, and routers. Many places like DSL and cable modem providers don't bother with authentication, because you need the cable that feeds you cable modem or the DSL line, so that fact that you have the hardware strongly suggests you are a legit customer.

You're welcome for the help!

Peace,
JimBass
 
Old 08-07-2005, 09:15 PM   #11
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Original Poster
Rep: Reputation: 31
1.Separate class C addresses? (I know there are IP classes but what do you mean by separate: like a.b.c.e and a.b.d.e or like a.b.c.d and a.b.e.f?)
2.Why does the DNS give the answer it gets from the google DNS for 10 min? Is it because the google site could be on different web servers that are mirrors? If so by what algorithm does the google DNS give the requesting DNS server the google site IP(s)?
Quote:
Comment 4 would be like this, if you have only 1 address. You would set up the zone paulmanole.org, and create a few entries. You would have to put an entry for paulmanole.org, www.paulmanole.org, ns1.paulmanole.org, and any other hosts you want defined by names. They all can point to the same IP address, but again, you need at least 2 nameservers, so you will have to have 2 addresses to get that to happen. I would not put hostnames in your DNS that you don't want to be seen on the open internet. There is no need for yourlaptop.paulmanole.org to have a static IP that is publicly accessible. There is no practical limit to the number of subdomains you list, but why bother adding something that only needs to be reached internally on your LAN?
3.How do i set up the zone manolepaul.org? Do i set it up on my 2 DNS's?
4.www.paulmanole is the web server?(that could also be one of the DNS's)
5.ns1.paulmanoleorg would be one of the dns's?
6.For 3-5 they all can point to the same ip? A server that has multiple hostnames and runs multiple services(dns, www, ftp, mail)?
7.Lets say 4-5 was one dns , the other one would be setup to point to the first dns for caching (ns1.paulmanole,org) and for web page (www.paulmanole,org) and for ftp (ftp://paulmanole.org)?
8.How many external ips can there be??? If i want two dns servers and one web server i need three visible ips (class C only? my ip is in the form 85.186.x.y)? Aren't there allready too many dns servers and web/ftp/mail servers out ther? how many ips can there be?
9.What does actually the subnet mask mean (mine: 255.255.255.128)
Looks like i have a lot to learn! I have a flash version of the cisco networking academy semester 1 and 2, i didn't gave it too much attention but i'm gonna read it!
Do you know an easy way to learn this? Like newbie friendly material?

Thanks Again!
 
Old 08-07-2005, 10:31 PM   #12
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
You should really take your questions to google, all you have asked is published on the web in many places.

1.Seperate class C addresses would be A.B.C.D and A.B.E.F, as long as C is not equal to E. That isn't a requirement, just a suggestion.
2. Google may not change answers at 10 minutes, I just made that up for my example. Any DNS entry has a TTL value, which is total time to live. Once that DNS info is obtained, the same server won't ask again until the TTL has expired. I don't know google's network topology, but I have heard they have as many as 100,000 servers, and also have heard they all run *nix. They have many different public IP addresses, and each of those many addresses is probably a load balancer, which is something you'll have no need for at present. The round robin algorythm is built into bind, it just cycles a list if multiple addresses are give to the same record, ie if google.com has 20 addresses, it will give out the first address to the first query, the second to the second, and so on.
3. There are thousands of examples of zone files on the net. Look some up, it will take you less time to find one than it would take me to post one.
4. www. is usually a webserver. ns1 is usually a nameserver. It can be the same box and same IP address, just different names by which thay can be reached.
5. Yes.
6. Yes.
7. No. Cacheing is not done by authoritative servers for the zones they are authoritative for. Your second DNS box, ns2 would be a slave, and ns1 the master. Ns2 will have the exact same info as ns1, anything in ns1's paulmanole.org zonefile will be copied to ns2.
8. There can be 255^4 addresses, or 4228250625 unique addresses. There aren't quite that many, I think anything where the first octet is above 240 are all for testing, and addresses lke 0.0.0.0, 127.0, 192.168, 172. and such are not publicly routeable. You need at least 2 addresses, as I have been telling you all along. A unique address for each name server. The web, mail, ftp, fredflintstone, and anything else you think of can all be on the same box as either nameserver, at the same address. There can be more servers at least as many servers as there are addresses. Tere could be more, as multiple servers can share public addresses through load balancers.
9. 255.255.255.127 means you have half of a class C address block, or 128 addresses. The lowest is not available for a host as that is the networks addresses itself, and the highest is not as that is the address that the network will communicate at. With that subnet, you have 126 useable addresses, so you're in fine shape for you DNS boxes. I haven't read any books on this, my knowledge has mostly come from on the job experiences. I'm not suggesting that you not use books, as they have been tremendously helpful when I need to know something, but I already suggested the DNS book for you, so check it out, read the cisco stuff, and use google and the search feature here. I would be without looking there are at least 100 "how to setup a linux DNS server" postings that google will find for you.

Good luck, and post back when you have actual linux problems, as opposed to theoretical problems!

Peace,
JimBass
 
Old 08-08-2005, 06:41 AM   #13
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Lightbulb Right!

Right! Thanks JimBass for the patience! In the meantime I did do some search on Google! Now all I have to do is read all that stuff I downloaded!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't "make config" whilst attempting wifi card install on Debian Sarge. Keychain Linux - Hardware 3 09-19-2008 12:24 PM
trouble with forcedeth driver (have nvidia nforce chipset) under debian "sarge" baldy1324 Linux - Networking 1 10-17-2005 09:06 AM
"Skin not found" problem from installing Mplayer in Debian/Sarge !!! Blue Jacket Linux - Software 2 10-05-2005 02:58 AM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 02:30 PM
Problem getting XFree86 4.3.0.1 running, debian "sarge" 2.6.6 kernel Motivez Linux - Software 9 06-08-2004 03:45 PM


All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration