DNS / Virtual Host Problem
I can't seem to find much information that explains what you need to do to as far as DNS to host multiple domains in a VPS environment and make it appear as an independent server. I did see the DNS stuff on the Linode Library, but I'm still having issues as it didn't answer all of my questions.
Q1) Do I need to use the Linode DNS manager at all if I run BIND? I am running an authoritative name server with recursion disabled (is that wrong?). I deleted all my DNS records from the Linode panel because I was under the impression this was not needed when I run my own DNS server.
Q2a) Do I need to do anything special for my domains at my registrar? After creating NS records and waiting some time (about 12 hours) my registrar still claimed that they were not valid name servers. Maybe I needed to wait longer, but all previous DNS changes on Linode's DNS manager seemed to propagate in about 15 minutes.
Q2b) I added the NS1. & NS2. sub-domains in my registrar panel under a section called 'hosts'. These are mapped to my server IP. After that it let me use them as name-servers for my domains, but it's still not working.
I am pretty sure my local bind config is valid, but at this point I can't even reach my server via the domain name. My problem is that I'm not sure if I need DNS records in Linode's DNS manager still or what I need to do on my registrar.
Some background: this server for me to host personal project of myself, friends, and other worthy projects in need of hosting. I have a good bit of experience with high traffic / high performance mail servers, web servers, and Linux in general… but DNS is something I've never had to learn much about and I am a bit overwhelmed and confused still, haha.
The main reason I need this sort of setup is that I want sites I host to NOT obviously be hosted with Linode (no offense) and I want to automate everything with bash / python scripts that I can use on other servers (as opposed to Linode's API, which is pretty damn cool, none the less).
Any help or pointing me in a better direction will be so appreciated!
Thanks,
-Adam
5 Replies
@AdamGaskins:
First off, my only real problem here is, admittedly, a lack of understanding. I'm pretty sure of that.
Then, unless this is specifically a learning experience, you should probably use Linode's name servers. There are few reasons to host your DNS yourself rather than relying on Linodes' (none of which seem to apply in your case), and many reasons to use professional DNS hosting (reliability, MTTF, performance, ease of use, less likely to misconfigure, etc).
> The main reason I need this sort of setup is that I want sites I host to NOT obviously be hosted with Linode (no offense) and I want to automate everything with bash / python scripts that I can use on other servers (as opposed to Linode's API, which is pretty damn cool, none the less).
A little late for that! It takes less effort/knowledge to traceroute your site and see it passing onto Linode's network than it does to look up your name servers. You're trying to close the barn door after the horse has bolted, if this is your only reason.
@Guspaz:
A little late for that! It takes less effort/knowledge to traceroute your site and see it passing onto Linode's network than it does to look up your name servers. You're trying to close the barn door after the horse has bolted, if this is your only reason.
$ whois 72.14.179.xxx
NetRange: 72.14.176.0 - 72.14.191.255
CIDR: 72.14.176.0/20
OriginAS:
NetName: LINODE-US
NetHandle: NET-72-14-176-0-1
Parent: NET-72-0-0-0-0
NetType: Direct Allocation
NameServer: NS4.LINODE.COM
NameServer: NS1.LINODE.COM
NameServer: NS2.LINODE.COM
NameServer: NS5.LINODE.COM
NameServer: NS3.LINODE.COM
Comment: This block is used for static customer allocations.
RegDate: 2008-05-21
Updated: 2010-07-27
Ref: http://whois.arin.net/rest/net/NET-72-14-176-0-1
OrgName: Linode
OrgId: LINOD
Address: 329 E. Jimmie Leeds Road
Address: Suite A
City: Galloway
StateProv: NJ
PostalCode: 08205
Country: US
RegDate: 2008-04-24
Updated: 2010-08-31
Comment: http://www.linode.com
Ref: http://whois.arin.net/rest/org/LINOD
OrgTechHandle: LNO21-ARIN
OrgTechName: Linode Network Operations
OrgTechPhone: +1-609-593-7103
OrgTechEmail: support@linode.com
OrgTechRef: http://whois.arin.net/rest/poc/LNO21-ARIN
OrgAbuseHandle: LAS12-ARIN
OrgAbuseName: Linode Abuse Support
OrgAbusePhone: +1-609-593-7103
OrgAbuseEmail: abuse@linode.com
OrgAbuseRef: http://whois.arin.net/rest/poc/LAS12-ARIN
OrgNOCHandle: LNO21-ARIN
OrgNOCName: Linode Network Operations
OrgNOCPhone: +1-609-593-7103
OrgNOCEmail: support@linode.com
OrgNOCRef: http://whois.arin.net/rest/poc/LNO21-ARIN
RAbuseHandle: LAS12-ARIN
RAbuseName: Linode Abuse Support
RAbusePhone: +1-609-593-7103
RAbuseEmail: abuse@linode.com
RAbuseRef: http://whois.arin.net/rest/poc/LAS12-ARIN
RTechHandle: LNO21-ARIN
RTechName: Linode Network Operations
RTechPhone: +1-609-593-7103
RTechEmail: support@linode.com
RTechRef: http://whois.arin.net/rest/poc/LNO21-ARIN
RNOCHandle: LNO21-ARIN
RNOCName: Linode Network Operations
RNOCPhone: +1-609-593-7103
RNOCEmail: support@linode.com
RNOCRef: http://whois.arin.net/rest/poc/LNO21-ARIN
If it weren't for those NameServer entries, nobody would ever guess that my IP address is hosted by linode
@Guspaz:
Then, unless this is specifically a learning experience, you should probably use Linode's name servers.
Thanks for replying Guspaz.
It actually is about 50% fun/learning. I have another old shared host I'm still using until I get this one right.
I guess what I really want is:
1) for mydomain.com, and hosted sites to use ns1.mydomain.com rather than the obvious linode name servers. Not to necessarily protect it from people who want to dig deeper.
2) To not cause spamhaus to deny me access for connecting to their site with several IPs. I read in the article below that this can get you blocked from their service and that is what first prompted me to set up DNS services.
> The other reason has to do with spamhaus.org's DSNBLs. If you use someone else's (your ISP's) DNS server, all the queries from that DNS server are counted toward the total number of connections to the spamhaus servers, which may result in you loosing that free service.
Is there an easier way to accomplish this?
I know…. I know…. ha. I just didn't explain myself thoroughly enough earlier. I realize people will find out I'm on Linode if they want to, I just don't want it to be obvious when I tell someone what name servers to use.
@AdamGaskins:
2) To not cause spamhaus to deny me access for connecting to their site with several IPs. I read in the article below that this can get you blocked from their service and that is what first prompted me to set up DNS services.
http://www200.pair.com/mecham/spam/virtual2p1.html#bind
> The other reason has to do with spamhaus.org's DSNBLs. If you use someone else's (your ISP's) DNS server, all the queries from that DNS server are counted toward the total number of connections to the spamhaus servers, which may result in you loosing that free service.Is there an easier way to accomplish this?
To achieve this goal you'll need a recursive nameserver running on your linode. Running BIND for your authoritative DNS isn't really connected to this, and in fact if you've disabled recursion you'll still need to use linode's recursive nameservers anyway.