BIND - What A Record I Should Add...

Hi All,

I have a website hosted at some web hosting company. Let me call it ' http://www.example.com '.

I have installed bind9 in one of the local server (private IP), called ' ns.example.com '. I have named zone as ' example.com ', same as my website.

Following is a forward zone file for ' example.com ' in box with hostname ' ns.example.com '
Code:
$ cat db.example.com 

$TTL 86400 ; (1 day)
$ORIGIN example.com.

@ IN SOA ns.example.com. admin.example.com. (
    2015042601 ; serial YYYYMMDDnn
    14400      ; refresh (4 hours)
    1800       ; retry   (30 minutes)
    1209600    ; expire  (2 weeks)
    3600 )     ; minimum (1 hour)

@  IN NS ns.example.com.
ns IN A 192.168.1.7

localhost IN A 127.0.0.1
sql       IN A 192.168.1.100
ftp       IN A 192.168.1.101

Following is a reverse zone file for ' example.com ' in box with hostname ' ns.example.com '
Code:
$ cat db.192.168.1 

$TTL 86400 ; (1 day)
$ORIGIN 1.168.192.in-addr.arpa.

@ IN SOA ns.example.com. admin.example.com. (
    2015042601 ; serial YYYYMMDDnn
    14400      ; refresh (4 hours)
    1800       ; retry   (30 minutes)
    1209600    ; expire  (2 weeks)
    3600 )     ; minimum (1 hour)

@ IN NS  ns.example.com.
7 IN PTR ns.example.com.

100 IN PTR sql.example.com.
101 IN PTR ftp.example.com.

resolve.conf
Code:
$ cat /etc/resolv.conf

search example.com
nameserver 192.168.1.7

Everything works perfectly fine. Only problem is, this bind server is unable to resolve http://www.example.com, which is my actual website.

Code:
$ nslookup linuxquestions.org
Server:		192.168.1.7
Address:	192.168.1.7#53

Non-authoritative answer:
Name:	linuxquestions.org
Address: 75.126.162.205

$ nslookup example.com
Server:		192.168.1.7
Address:	192.168.1.7#53

*** Can't find example.com: No answer

My bind server is recursive, and I dont want to use other public dns servers. Also my root hints are latest.

How do I resolve my website IP address?

Thanks

NOTE: my actual website name is different. I have used example.com just for illustration only. My bind server will resolve real www.example.com.
Code:
$ nslookup example.com
Server:		192.168.1.7
Address:	192.168.1.7#53

Non-authoritative answer:
Name:	example.com
Address: 93.184.216.34



Similar Content



Trying To Change The IP Address And The Hostname

I have two servers, “ServerA” and “ServerB”. Using SLES SP3.

ServerA is the main server with LTSP running

I have used DD to image the drives from ServerA to ServerB. ServerB now boots and is identical to ServerA,and all is well. I want to use ServerB as a backup server, so if ServerA goes down I can bring server online. Obviously in order to put them both on the same network (to keep the user files updated on a daily basis) I need to change the IP address and the host name of serverB (currently is the same as ServerA).

I have done the following (copied from my notes):
Code:
  The following file, binds the ethernet MAC address to ETH0 or ETH1 etc..  We need to delete this file so that a new one is automatically created during reboot with the correct MAC address bound to ETH0
  Delete this file:
      /etc/udev/rules.d/70-persistent-net.rules

  make sure to change the static IP address in the following files
    /etc/dhcp.d
    /etc/hosts
    /etc/sysconfig/network/ifcfg-eth0
    /opt/ltsp/i386/etc/ltsp.conf

  give the system a different host name in:
    /etc/HOSTNAME

Reboot the system

When I change the HOSTNAME, the server will boot, bring me to a log in screen and then after I log in it will just sit there with the green background and a cursor. What files am I forgetting to change..

Help On Rndc. Want To Control Remote Bind Server, But Cant....

Hi All,

Please help me. I'm following the book - ' DNS and BIND, 5th Ed By Paul Albitz, Cricket Liu '. This RNDC is driving me crazy. I spent all day trying to configure rndc. Tried every possible combination in config files, but I just cant control remote server. Tried many tutorials from google, nothing helped. LQ is my last hope.

So, my story goes like this...

MASTER BIND SERVER:
Host: toystory.movie.edu
IP: 10.249.249.3/24
OS: CentOS 7.1

SLAVE BIND SERVER:
Host: wormhole.movie.edu
IP: 10.249.249.2/24
OS: CentOS 6.6

MASTER SERVER (toystory) CONFIGURATION FILES:
Code:
[root@toystory ~]# cat /etc/rndc.conf
key "toystory-key" {
	algorithm hmac-md5;
	secret "K9qBsQwusP6430cykS2AeA==";
};
options {
	default-key "toystory-key";
	default-server 127.0.0.1;
	default-port 953;
};

[root@toystory ~]# cat /etc/named.conf
key "toystory-key" {
	algorithm hmac-md5;
	secret "K9qBsQwusP6430cykS2AeA==";
};
controls {
	inet 127.0.0.1 port 953
		allow { 127.0.0.1; } keys { "toystory-key"; };
};
key "wormhole-key" {
	algorithm hmac-md5;
	secret "7PvoY3oysQz8DyASiUTlNA==";
};
controls {
	inet 10.249.249.3 port 953
		allow { 10.249.249.2; } keys { "wormhole-key"; };
};

SLAVE SERVER (wormhole) CONFIGURATION FILES:
Code:
[root@wormhole ~]# cat /etc/rndc.conf
key "wormhole-key" {
	algorithm hmac-md5;
	secret "7PvoY3oysQz8DyASiUTlNA==";
};
options {
	default-key "wormhole-key";
	default-server 127.0.0.1;
	default-port 953;
};

[root@wormhole ~]# cat /etc/named.conf
key "wormhole-key" {
	algorithm hmac-md5;
	secret "7PvoY3oysQz8DyASiUTlNA==";
};
controls {
	inet 127.0.0.1 port 953
		allow { 127.0.0.1; } keys { "wormhole-key"; };
};
server 10.249.249.3 {
  keys { "wormhole-key"; };
};

TESTING:

MASTER (toystory):
Code:
[root@toystory ~]# rndc status
version: 9.9.4-RedHat-9.9.4-18.el7_1.1 <id:8f9657aa>
CPUs found: 1
worker threads: 1
UDP listeners per interface: 1
number of zones: 104
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

[root@toystory ~]# rndc -s wormhole.movie.edu status
rndc: connect failed: 10.249.249.2#953: connection refused

SLAVE (wormhole):
Code:
[root@wormhole ~]# rndc status
version: 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.2
CPUs found: 1
worker threads: 1
number of zones: 22
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

What I'm doing wrong? Please Help!!!

Thanks

Can't Set Repos In RHEL6.0, Unable To Install Packages

Hi all.
RHEL 6.0 in Virtual Box, network is ok, it can resolve all repos (f.e. dl.fedoraproject.org, nginx.org),
but when I'm trying
Code:
# rpm -Uvh http://nginx.org/packages/rhel/6/noarch/RPMS/nginx-release-rhel-6-0.el6.ngx.noarch.rpm

I get:
Code:
curl: (6) Couldn't resolve host

When I'm trying with ip instead name:
Code:
curl: (22) The requested URL returned error: 404

Only rpmforge repo enabled, but it can't find any packets for install/update.

What can I do?
Thanks.

The Vncserver Doesn't Work After Debian 7 Update

Hello,

I updated my debian 7 wheezy few days ago, and now vnc server is not working.
Code:
http://prntscr.com/6glfu8


Log File:
Code:
http://paste.ubuntu.com/10596182/

The Web Proxy Server Has Detected A Problem In Clear Os?

My web server displayed the following error to the website i log to the web browser.

Details:
Website address: http://exampleweb.com
Warning message: connection failed
Ip address: 182.x.x.x
internet connection status: connected.

Why Should I Always Use Chmod When Not As A Root User

System Info:

I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).

I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.

The OS is installed in VmWare, so the system is all mine.

Problem:

Now I create a file with touch file.sh and put a command in it, but when I want to run it with Code:
sudo ./file.sh

, an error is shown that the command Code:
./file.sh

does not exist. But if I Code:
 sudo chmod 777 ./file.sh

then it gets run. My question is that, why should I use Code:
chmod 777

when I myself have created the file, and I am in sudoers.

Can anyone explain me why shuold I still use Code:
sudo chmod 777

when the creator of the file is me.

Can Not Use Phpmyadmin

I have installed phpmyadmin , when access http://192.1010.118.0/phpmyadmin ,it pops the error

Code:
Forbidden

You don't have permission to access /phpmyadmin on this server.

I check the phpmyadmin.conf , I have released "allow all" to all directory .

I also check the /var/log/httpd/error_log, it have the following error , I tried change all files permission to 777 but still not work , would advise what is wrong in my server ? thanks

Code:
[authz_co error] [pid 2525] [client 192.1010.118.0:51878] AH01630: client denied by server configuration: /usr/share/phpMyAdmin

Centos 6.6 /etc/init.d/rc.local Doesn't Run The Command After Restart

Hi

I am using shinx and i have on instructions to execute a command after server restart from rc.local so i do this:

Code:
nano /etc/init.d/rc.local


end i add the command there save and exit:

Code:
/usr/local/bin/searchd --config /sphinxconfig/sphinx.conf

But when i restart is not running and it was fine on Centos 6.5

Then i run it manualy from ssh and all are fine ....

Any ideas why?

Thanks

Sending Mail From Command Line

I searched the forums for my title and I am not finding exactly what I am looking for. I am not using a program to send mail, such as Thunderbird or whatever. I simply want to be able to send mail from my Ubuntu 14.04 DESKTOP version for logging. I use a program called Logwatch (used alot in RHEL or CentOS) to monitor the server itself. The program sends mail to the root user account on the machine, which I can check and see, and within the program conf file, I can add an external email address, but it never sends.

I'm familiar with the SMTP concept of sending mail, outgoing mail server authentication, etc. I don't care to run this box as an SMTP server, but I understand that I need some sort of SMTP or MTA program to send mail into the real world. I tried Postfix but couldn't get that to work, and the Logwatch program wants to use sendmail, so I installed that but I am having the same issue. I am sure it is a step I am missing.

I also can't figure out how to get the 'mail' cmd from Terminal to work. I use this command:
Code:
mail -s "test" | /usr/sbin/mail myemail@domain.com

it follows through the subject, CC, body, but when I try to hit either . or CTRL-D, it never sends the email, in fact is does nothing.

I also tried sendmail with this command:
Code:
sendmail -v my@email.com < /dev/null

I was just trying to send a test email. It logs into my SMTP mail server, which I already configured, and it tells me to type out the mail, then end with a "." by itself on a single line. I try this and it just sits there.

I am missing SOMETHING when trying to actually send the mail. I can get it written with subject and body, connected, but it never sends and I am probably missing a / or something.

I did find and follow these instructions, but it still isn't working with sendmail. If I need to go back to Postfix, I can do that, I don't honestly care what I use, I just want some programs such as Logwatch to be able to email me.
http://stackoverflow.com/questions/1...mail-on-ubuntu

Issues With RAID- Creating As /dev/md127 Instead Of What's In The Config

Hi,
Recently, I decided to change my partition scheme for my home server. I had a RAID0 that previously spanned three disks and now I only want it to span two. Getting rid of the old one was easy. But getting the new one to work has been a real pain.

It's running Debian Jessie.

For starters, here's my /etc/mdadm/mdadm.conf:
Code:
root@maples-server:~# cat /etc/mdadm/mdadm.conf 
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers
DEVICE /dev/sdb1 /dev/sdc1

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

ARRAY /dev/md0 metadata=1.2 UUID=032e4ab2:53ac5db8:98806abd:420716a5 devices=/dev/sdb1,/dev/sdc1

As you can see, I have it specified to setup the RAID as /dev/md0. But every time I reboot, my /proc/mdstat shows:
Code:
root@maples-server:~# cat /proc/mdstat 
Personalities : [raid0] 
md127 : active raid0 sdc1[1] sdb1[0]
      488016896 blocks super 1.2 512k chunks
      
unused devices: <none>

I can confirm that it's actually md127 by looking at /dev:
Code:
root@maples-server:~# ls -l /dev/md*
brw-rw---- 1 root disk 9, 127 May  2 20:17 /dev/md127

/dev/md:
total 0
lrwxrwxrwx 1 root root 8 May  2 20:17 maples-server:0 -> ../md127

And here's a bit more info:
Code:
root@maples-server:~# mdadm --detail --scan
ARRAY /dev/md/maples-server:0 metadata=1.2 name=maples-server:0 UUID=032e4ab2:53ac5db8:98806abd:420716a5

I've tried adding all sorts of options to /etc/mdadm/mdadm.conf, ranging from just the output of the above command (only changing "/dev/md/maples-server:0" to "/dev/md0") to what you see at the top. Nothing seems to be making a difference.

Does anyone have any ideas?