206 Part II . Running (Web design tools) the Show It
206 Part II . Running the Show It is not necessary (or even possible) to list every single address that may connect to your computer. The hosts.allow and hosts.deny files enable you to specify entire subnets and groups of addresses. You can even use the keyword ALL to specify all possible addresses. You can also restrict specific entries in these files so they only apply to specific network services. Take a look at an example of a typical pair of hosts.allow and hosts.deny files. Here s the /etc/hosts.allow file: # # hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided # by the /usr/sbin/tcpd server. # cups-lpd: 199.170.177. in.telnetd: 199.170.177., .linuxtoys.net vsftpd: ALL Here s the /etc/hosts.deny file: # # hosts.deny This file describes the names of the hosts which are # *not* allowed to use the local INET services, as # decided by the /usr/sbin/tcpd server. # ALL: ALL This example is a rather restrictive configuration. It allows connections to the cupslpd and telnet services from certain hosts, but then denies all other connections. It also allows connections to the FTP service (vsftp) to all hosts. Let s examine the files in detail. As usual, lines beginning with a # character are comments and are ignored by xinetd when it parses the file. Each noncomment line consists of a comma-separated list of daemons followed by a colon (:) character and then a comma-separated list of client addresses to check (for example, tftpd,fingerd: .linuxtoys.net, .fedora trouble.com.) In this context, a client is any computer that attempts to access a network service on your system. A client entry can be a numeric IP address (such as 199.170.177.25) or a host name (such as jukebox.linuxtoys.net) but is more often a wildcard variation that specifies an entire range of addresses. A client entry can take four different forms. The online manual page for the hosts.allow file describes them as follows: . A string that begins with a dot character (.). A host name is matched if the last components of its name match the specified pattern. For example, the pattern .tue.nl matches the host name wzv.win.tue.nl. . A string that ends with a dot character (.). A host address is matched if its first numeric fields match the given string. For example, the pattern 131.155.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.