Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New web server on CentOS 4.4... DNS Problem??? 2

Status
Not open for further replies.

brokenhalo

IS-IT--Management
Feb 24, 2008
169
0
0
US
Hey guys,
I built a new server and installed Apache and bind and made a basic website. The machine has one nic with a virtual IP to create 2 IP addresses (to be used as ns1 and ns2.mydomain.com. I registered mydomain.com and registered dns for mydomain.com to point to the IP address and the virtual IP address on my machine. I screwed around with dns a little so the domain would resolve and I still can't get it to resolve. I can connect to the website using both IP addresses, but it just doesn't resolve using mydomain.com. Any help would be appreciated in how I am actually supposed to set up DNS. I have read all over the internet and can't seem to figure out what I'm doing wrong. Thanks!

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
get it to resolve
I assume that by this you mean from the local machine itself, not some remote client.

My guess is that you need to update /etc/resolve.conf to point to 127.0.0.1 for name resolution.
A while ago, RedHat magazine published a basic dns server 'howto' Part 1 Part 2 that might be helpful.
 
By resolve I mean from anywhere on the internet... doesn't resolve.

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
This server needs to be publicly accessible, I'm sorry if I was a little vague on the description... Thanks!

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
Check here Is this server behind a router or NAT device? Are the IP addresses that you've "registered" actually public IP addresses? Are they A records?
 
To answer your questions... For right now the machine is not behind a router or firewall. IPTables is installed on the machine with rules allowing access to the machine through www, ftp, ssh and mail (but iptables is currently disabled for testing purposes). The addresses I registered ARE public. I did make them A records as well, but I just copied a template of a zone file and filled the blanks with my info. I understand how windows DNS is configured but I am extremely new to the linux world... But I think I'm picking up pace extremely fast because my new job is maintaining 8 web servers... The reason I built this server is for practice :) Thanks for the help guys, keep the suggestions rolling!

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
Where I'm headed is: It might not matter if DNS is running on your server. The link I posted above should determine which direction to head in. Any client will query whatever DNS server it's set to use (which probably isn't your DNS server). So, if the client's DNS server doesn't already know the IP address for your site, it will contact the root server and follow the trail. Your domain registrar may have set default name servers. Is your DNS server the primary name server & is it operating correctly? If the registrar's same servers are the primary for your domain, it won't matter what you do with your own dns server, remote clients won't be using it.

Also FWIW, this conversation would be better suited to forum950
 
OK, i'm sorry for the incorrect posting location. Because the server itself is just for testing purposes, I don't care giving out the addresses. The website address is bradlaszlo.com the nameservers that I registered through my registrar are ns1.bradlaszlo.com (75.147.245.114) and ns2.bradlaszlo.com (75.147.245.115). intodns gave me many errors. If it's any help, I followed a set of instructions on to configure dns and apache and now cannot start apache... Thanks!!!

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
Well it looks like your nameserver is running, but not aswering. Check the logs for errors: more -f /var/log/messages | grep named
 
Below is the log from so far today (queries from today I would assume are from smah testing it). I really have no idea what the log means. Also, my web server will no longer start now... This is becoming a thorn in my side.


Aug 14 01:38:10 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 01:38:10 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 01:38:10 bradlaszlo kernel: audit(1218692290.533:50): avc: denied { name_bind } for pid=3388 comm="named" src=15394 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 01:38:10 bradlaszlo kernel: audit(1218692290.534:51): avc: denied { name_bind } for pid=3387 comm="named" src=10203 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 02:06:33 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 02:06:33 bradlaszlo kernel: audit(1218693993.508:52): avc: denied { name_bind } for pid=3388 comm="named" src=12161 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 02:06:33 bradlaszlo kernel: audit(1218693993.743:53): avc: denied { name_bind } for pid=3388 comm="named" src=22739 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 02:06:33 bradlaszlo kernel: audit(1218693993.994:54): avc: denied { name_bind } for pid=3388 comm="named" src=8108 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 02:06:34 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 02:06:34 bradlaszlo kernel: audit(1218693994.225:55): avc: denied { name_bind } for pid=3387 comm="named" src=22071 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 02:06:34 bradlaszlo kernel: audit(1218693994.262:56): avc: denied { name_bind } for pid=3388 comm="named" src=31270 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:03 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 04:02:03 bradlaszlo kernel: audit(1218700923.423:57): avc: denied { name_bind } for pid=3387 comm="named" src=31175 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:03 bradlaszlo kernel: audit(1218700923.538:58): avc: denied { name_bind } for pid=3387 comm="named" src=3336 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:03 bradlaszlo kernel: audit(1218700923.642:59): avc: denied { name_bind } for pid=3387 comm="named" src=14916 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:03 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 04:02:03 bradlaszlo kernel: audit(1218700923.718:60): avc: denied { name_bind } for pid=3387 comm="named" src=13171 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:03 bradlaszlo kernel: audit(1218700923.792:61): avc: denied { name_bind } for pid=3388 comm="named" src=3073 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.125:62): avc: denied { name_bind } for pid=3387 comm="named" src=30038 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 04:02:34 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 04:02:34 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 04:02:34 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 04:02:34 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.375:63): avc: denied { name_bind } for pid=3387 comm="named" src=9597 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.454:64): avc: denied { name_bind } for pid=3388 comm="named" src=26948 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.533:65): avc: denied { name_bind } for pid=3388 comm="named" src=27693 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.611:66): avc: denied { name_bind } for pid=3388 comm="named" src=2628 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.691:67): avc: denied { name_bind } for pid=3388 comm="named" src=25650 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.771:68): avc: denied { name_bind } for pid=3388 comm="named" src=16428 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.854:69): avc: denied { name_bind } for pid=3388 comm="named" src=19102 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:34 bradlaszlo kernel: audit(1218700954.930:70): avc: denied { name_bind } for pid=3388 comm="named" src=64498 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.015:71): avc: denied { name_bind } for pid=3388 comm="named" src=4958 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com.bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.100:72): avc: denied { name_bind } for pid=3387 comm="named" src=20945 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.175:73): avc: denied { name_bind } for pid=3388 comm="named" src=64408 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.260:74): avc: denied { name_bind } for pid=3388 comm="named" src=63408 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.335:75): avc: denied { name_bind } for pid=3388 comm="named" src=27901 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.421:76): avc: denied { name_bind } for pid=3388 comm="named" src=17268 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.512:77): avc: denied { name_bind } for pid=3387 comm="named" src=1070 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.590:78): avc: denied { name_bind } for pid=3387 comm="named" src=10201 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.672:79): avc: denied { name_bind } for pid=3387 comm="named" src=64720 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com.bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.751:80): avc: denied { name_bind } for pid=3387 comm="named" src=2752 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.828:81): avc: denied { name_bind } for pid=3387 comm="named" src=29658 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com.bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.914:82): avc: denied { name_bind } for pid=3387 comm="named" src=27332 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 04:02:35 bradlaszlo kernel: audit(1218700955.998:83): avc: denied { name_bind } for pid=3388 comm="named" src=16464 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 07:35:25 bradlaszlo kernel: audit(1218713725.689:84): avc: denied { name_bind } for pid=3388 comm="named" src=8087 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 07:35:25 bradlaszlo kernel: audit(1218713725.690:85): avc: denied { name_bind } for pid=3387 comm="named" src=12131 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 07:35:25 bradlaszlo kernel: audit(1218713725.691:86): avc: denied { name_bind } for pid=3388 comm="named" src=27200 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 07:35:25 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 07:35:25 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.115#53
Aug 14 07:35:25 bradlaszlo named[3386]: lame server resolving 'bradlaszlo.com' (in 'bradlaszlo.com'?): 75.147.245.114#53
Aug 14 07:35:25 bradlaszlo kernel: audit(1218713725.692:87): avc: denied { name_bind } for pid=3387 comm="named" src=13422 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
Aug 14 07:35:25 bradlaszlo kernel: audit(1218713725.692:88): avc: denied { name_bind } for pid=3388 comm="named" src=10251 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
[root@bradlaszlo ~]#


Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
It's not me. But anyway, are you using SELinux on this system? I'm guessing that this is a SELinux deny event.
Aug 14 07:35:25 bradlaszlo kernel: audit(1218713725.692:88): avc: denied { name_bind } for pid=3388 comm="named" src=10251 scontext=root:system_r:named_t tcontext=system_u:eek:bject_r:port_t tclass=udp_socket
 
I'm sorry for my ignorance, but is SELinux a distro of linux? If so then the answer is no, I am using CentOS 4.4 and thinking of upgrading to 5

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
SELinux stands for "Security Enhanced Linux" and it is primarily used to say which users can do what with which services and applications on a *nix machine (10,000 foot view). It is frequently part of RedHat-based distributions (CentOS is one, btw) and it is probably on by default, at least it is on Fedora.
 
No, it's Security Enhanced Linux and is included with many RH based distros. It's a security system that monitors (and allows or denys) things that certain processes do. For example, if the apache web server tried to access a file outside of where it should be, SE Linux would deny access to the httpd process.

I believe with Gnome in CentOS it's in the 'security' section along with the firewall settings.
 
Okay, now that I know what it is, how do I find out if it is running and if it is and it's causing a problem, how to do I disable it?

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
WOW... I just built a new machine and installed Windows Server 03 Enterprise, setup the web server, ftp, dns, smtp and pop3 in about 2 hours and got it to resolve with no problems... I would really like to get this CentOS server going, and more importantly, I would like to LEARN how to do it and learn anything else I can pick up along the way. I have tried all of the suggestions here... I am going to re-install CentOS from scratch and try this again, maybe I cna get it to work this time. Any more help/suggestions on basic ways to set it up and get it running would help immensely. Thanks again!

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
During the install, you'll be asked what state you want selinux and the firewall to be in. Set the services you will be using for the firewall and set selinux to passive. This is a security level you will want once you learn how it works. It stops a lot of things from working though until it is setup so for now it is better to just log what it would deny. If you miss that part during the install, you can edit the config file maually in /etc/selinux. You might also want to check out the Linux (server) forum.

----------------------

Will work for stars ;-)
 
As I recall, I remember about the firewall during the install, but nothing of selinux. I will try to edit that config file later today when I can SSH into it. Thanks!

Brad L. - MCP

"If the doctors told me I had 5 minutes to live, I would type faster.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top