-1

When I put in url bar ns1.mydomain.com (my nameserver), it serves default Apache home page. or in another words it responded to http request. Is this behavior normal? If not how can I hinder it?

4 Answers 4

0

Assuming that you want apache running on your server, and you have multiple IPs on the server, edit your apache config to listen only on the desired IP(s). It is probably listening on 0.0.0.0 (all IPs) now.

Assuming you don't want apache, uninstall it.

Assuming you do want apache and you only have 1 IP on the server, then people will always be able to hit that IP on port 80, so you will need to do as Hagen suggested above and reconfigure apache to only server content for configured hostnames.

2

Even if you do want to run a webserver on the same box, you may want to reconfigure Apache to serve content only for configured hostnames. Of course, this would merely replace the default page with a http error (because the host name is transmitted only after the connection is already established), but may be cleaer and slightly better equipped against attacks/exploits of the webserver.

1
  • That's a good suggestion.
    – dsh
    Feb 27, 2013 at 2:35
2

No it's not normal - it demonstrates that the system administrator has not taken the time to configure the system properly - and given the security implications of a badly configured HTTP server or DNS server this is really bad news for all of us (but good news for anyone looking for a system to abuse).

How you "hinder" it is to learn how to configure your server properly and apply that knowledge - but an answer to that goes way beyond the scope of a post here.

2

It's normal enough in a variety of configurations. For example, as I recall, RedHat would install apache by default. Debian and Ubuntu do not install apache by default.

Some choices for changing this:

  • uninstall apache from the machine (I recommend this if you don't intend it to be a web server)
  • configure the local firewall to drop incoming packets for TCP and UDP ports on which you don't intend to provide any service (I recommend this as well)

Not the answer you're looking for? Browse other questions tagged .