I'm quite new to setting up webservers without a control panel. I've looked around answered questions on the site, but with no luck. With that said I've experimented a little to resolve my problem.
Basically I'm running bind9 on ubuntu 12.04 and I'm trying to bind a domain name I got from namecheap to the server. rDNS has been set up as are the nameservers with namecheap. I can obviously connect to my server with the IP which is 199.168.141.44. The domain I'm trying to get to work is www.aria-roleplay.com with nameservers ns1.aria-roleplay.com and ns2.aria-roleplay.com.
My httpd.conf file looks like this:
<VirtualHost *:80>
ServerAdmin admin#localhost
DocumentRoot "/var/www/"
ServerName www.aria-roleplay.com
</VirtualHost>
/etc/bind/db.linux_rocks
;
;BIND data file for local loopback interface
;
$TTL 604800
# IN SOA V-7848.linux.rocks. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 : Expire
604800 ) ; Negative Cache TTL
;
# IN NS V-7848.linux.rocks.
# IN A 127.0.0.1
# IN AAAA ::1
; Below are A Record Addresses
www.aria-roleplay.com IN A 199.168.141.44
dig aria-roleplay.com
; <<>> DiG 9.8.1-P1 <<>> aria-roleplay.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34790
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;aria-roleplay.com. IN A
;; Query time: 4348 msec
;; SERVER: 199.168.141.44#53(199.168.141.44)
;; WHEN: Tue Aug 6 14:26:50 2013
;; MSG SIZE rcvd: 35
How am I going to get this to work?
If all you're trying to do is point a domain name to your server the easier way to do it is to just use your registrar's DNS servers (I know namecheap has some) and set up the A records to point to your server's IP address. This is pretty much the same as doing it your way however you're taking out the pain of running your own DNS server.
You can still host multiple sites on your machine, just create separate vhosts for each site and create the relevant A records for each domain in your namecheap account.
Related
My domain (ecokrypt.com) is with godaddy
Yesterday I tried making some changes, after that my DNS has stopped resolving to IP address. I get below error:
This site can’t be reached
ecokrypt.com’s server IP address could not be found.
Search Google for ecokrypt
ERR_NAME_NOT_RESOLVED
My current setting is as per attached image.
Tried clearing my browser history
Power off my router box
I event tried changing it to route 53 name servers, but I always get above error.
If I use direct IP - I do see my website (partially as without DNS name it will give me error)
Tried pinging ecokrypt.com from my local machine, I get unknown host
I am just unable to understand what is wrong.
UPDATES# Tried dig command as suggested below and it seems ok. So looks like I have to wait till upstream cache gets cleared.
; <<>> DiG 9.10.6 <<>> #8.8.8.8 ecokrypt.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1812
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;ecokrypt.com. IN A
;; ANSWER SECTION:
ecokrypt.com. 3599 IN A 13.232.131.162
;; Query time: 406 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Jan 16 07:37:36 IST 2019
;; MSG SIZE rcvd: 57
You probably need to clear your DNS cache. DNS results (including not found results) can persist in cache for some time. What's worse, is that those results can be cached by upstream DNS servers, so even if you clear your local cache it might take anywhere from an hour to a day for the changes to propagate across the network.
A good way to test your DNS config is to force resolution using a well-behaved DNS server.
If you're using dig on a *nix box, it'd be something like:
dig #8.8.8.8 foo.com
8.8.8.8 is the google DNS resolution service.
You can also use your resolution service directly:
dig #ns67.domaincontrol.com foo.com
I have bind9 setup on my old DO droplet (Debian 7.11) and everything was working great. I decided to setup a new droplet (Debian 8.7) and configure bind9 today.
On the old Debian 7 droplet I had it configured to be authoritative name server with the following names, ns1.example.com and ns2.example.com.
I registered the example.com domainname through GoDaddy, and set it point to my external name servers ns1.example.com ns2.example.com using their web interface.
However, DNS does not appear to be working on the Debian 8.7 droplet when I tried to set it up.
named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
// 107.170.40.252 <= public IP v4
zone "example.com" {
type master;
file "/etc/bind/zones/master/db.example.com";
};
zone "252.40.170.107.in-addr.arpa" {
type master;
file "/etc/bind/zones/master/db.107.170.40";
};
db.example.com
;
; BIND data file for example.com
;
$TTL 86400
# IN SOA ns1.example.com. chris.example.com. (
1 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 day
;
# IN NS ns1.example.com.
# IN NS ns2.example.com.
example.com. IN MX 10 mail.example.com.
example.com. IN A 107.170.40.252
ns1 IN A 107.170.40.252
ns2 IN A 107.170.40.252
www IN CNAME example.com.
db.107.170.40
;
; Addresses and other host information
;
$TTL 86400
# IN SOA example.local. hostmaster.example.local. (
2013090501 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000) ; Minimum
40.170.107.in-addr.arpa. IN NS dns.example.local.
252 IN PTR mail.example.local.
252 IN PTR ns1.example.local.
252 IN PTR ns2.example.local.
Any help on this matter would greatly be appreciated.
It ended up being a setting in the GoDaddy web interface.
I have 2 debian 7 VPS both running a few services, with ISPConfig running on one of them to manage both.
If I log into my primary server (ns1.example.com) and I do:
DiG #ns1.example.com any example.com
DiG #ns2.example.com any example.com
ns1 responds fine with all of my records, but NS2 does not:
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> #ns2.example.com any example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 45647
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
However, if I log into my secondary server (ns2), and run the same 2 commands, both return the correct DNS records
I am extremely new to BIND, so I'm struggling a bit with this, but I'm guessing it's just something to do with the network/bind config, as both servers look like they have all the records, ns2 just isn't passing them to other servers?
edit: not sure if this would be better on serverfault now that i've posted it..
The answer is that ns2 is configured differently to ns1.
Ns1 is refusing your request.
I've been trying to set up the DNS for a couple of apps using the same domain.
I want www.playfade.com and playfade.com to redirect to playfade.herokuapp.com, so set up a CNAME and ALIAS respectively to point to the Heroku app. This works fine.
I also want beta.playfade.com to point at soundedout.herokuapp.com. To do this, I set up a CNAME for beta.playfade.com to soundedout.herokuapp.com. This, however, doesn't work. When I access beta.playfade.com, I'm redirected to www.playfade.com.
I used MXToolbox to check beta.playfade.com and was given a few errors:
Bad Glue Detected
Parent server gave glue for beta.playfade.com to be soundedout.herokuapp.com but we resolve that hostname to 176.34.187.173
At least one name server failed to respond in a timely manner
Failure detail: 176.34.187.173
Local NS list does not match Parent NS list
50.31.242.53 was reported by the parent, but not locally
198.241.11.53 was reported by the parent, but not locally
198.241.10.53 was reported by the parent, but not locally
50.31.243.53 was reported by the parent, but not locally
176.34.187.173 was reported locally, but not by the parent
Serial numbers do not match
I've set up the domains correctly in the heroku dashboard as well.
Any help would be appreciated.
➜ ~ dig beta.playfade.com
; <<>> DiG 9.8.3-P1 <<>> beta.playfade.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 64369
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;beta.playfade.com. IN A
;; AUTHORITY SECTION:
playfade.com. 296 IN SOA ns1.dnsimple.com. admin.dnsimple.com. 2014110501 86400 7200 604800 300
;; Query time: 668 msec
;; SERVER: 85.37.17.16#53(85.37.17.16)
;; WHEN: Thu Nov 6 10:29:27 2014
;; MSG SIZE rcvd: 90
There is no CNAME configured for the hostname beta.playfade.com. Make sure to properly configure it, and make sure you have no redirect configuration inside the app (or if you have it, tweak it accordingly).
I want to create dns server on my VPS and add a domain to it from another provider. Domain is set in provider's panel to VPS as dns1 and sdns2.ovh.net as dns2. I'm getting SERVFAIL from dig over and over again and since I'm new to this I'm out of moves. What is wrong?
my zone file for domain.com:
$TTL 604800
# IN SOA ns1.domain.com. root.ns1.domain.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
# IN NS ns1.domain.com.
# IN NS ns2.domain.com.
# IN A 176.31.189.10
ns1 IN A 176.31.189.10
ns2 IN A 213.251.188.141
named-checkzone shows OK
named.conf entry:
zone "domain.com" {
type master;
file "db.domain.com";
};
named.conf.options:
options {
directory "/var/cache/bind";
dnssec-validation auto;
auth-nxdomain no;
listen-on-v6 port 53 {
any;
};
listen-on port 53 {
any;
};
};
Port 53 is allowed by firewall in/out. Bind service is active.
I'm getting dig SERVFAIL all the time.
My dns2 provider requires "ownercheck" but i cant do it since it looks like the zone file is not being read anyhow.
Please help.
problem solved
server was failing to load zone file - lack of full address
What helped in my case was to ensure that /etc/bind was actually writable by the bind user, since bind tries to place a compiled *.jnl file of the zone file there.
Also, enabling full logging helps to spot newbie errors like this easily... :)