ICT 213 Exam, Semester 1, 2009

  1. (25 marks)

    A web server receives requests for resources (HML documents, images, etc). If it can send them it includes a success code 200. But if it can't find the resource, it sends a "404 not found" message. Each request and its status is recorded in the log file. A typical 404 message line is
 - - [31/May/2009:05:55:08 +1000] "GET /java/tut/tut2.sgml-109.html HTTP/1.0" 404 308 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)"
    which includes the requesting IP address, the date, the HTTP request, the protocol version, "404" and information about the requesting agent. In the example, the resource that cannot be found is the seventh field /java/tut/tut2.sgml-109.html.

    Any 404 error either represents a fault on the Web site, or an attack trying to probe the site for potential weak points. Write

    1. a shell script to list the resources which cannot be found
    2. A shell script which lists the IP addresses of failed requests, listed by frequency of fails by the IP address

  2. (25 marks)

    Two computers need to be set up to provide a DMZ (demilitarised zone) for your network. The first "exterior firewall" connects directly to the internet. The second "interior firewall" acts as the gateway for the internal network. In the DMZ are computers running services which shoud be visible from the outside and inside, such as HTTP and email.
    (Figure from www.oracle.com)

    The external world should only be able to see the servers in the DMZ. The internal world should be able to see these servers too, but also be able to connect to servers in the outside world.

    Describe the firewall setup on the interior and exterior firewall machines to allow this visibility. Give simple english forms of the rules on each firewall.

  3. (25 marks)

    You have multiple users on your computer. There are a number of local programs which are all in the directory /usr/local/bin. All the users need to get access to all the programs in this directory, so that when they try to execute a command it will be looked for in that directory.

    1. What file permissions need to be set on the directory /usrs/local/bin?
    2. What file permissions need to be set on each program in /usrs/local/bin?
    3. What shell variable needs to be set so that a user can find these commands and how should it be set?
    4. In which startup file should this shell variable be set?

  4. (25 marks)

    The minimal space for a Linux system is currently about 4Gb but gets bigger with each new version. Swap space is usually set to the same size as RAM. Files such as log files that grow are kept in /var/log. These are usually less than 1Gb in total. Local system files are kept in /usr/local. They can use the same size as the Linux system itself, at maximum. The rest of the space can be given to user files in /home.

    You have a system with 2Gb RAM and 500Gb hard disk. You will be running HTTP and email servers.

    1. What partitions would you choose for the disk and what sizes will you choose?
    2. What directories get mounted on which partitions?
    3. Explain your choices.