CTIS486 Midterm Solution 23/07/2012 - Akgül



Similar documents
CTIS486 Midterm I 20/11/ Akgül

Installing an SSL certificate on the InfoVaultz Cloud Appliance

Host your websites. The process to host a single website is different from having multiple sites.

Apache and Virtual Hosts Exercises

How to Configure the Windows DNS Server

Setup Local Mail Server Using Postfix, Dovecot And Squirrelmail On CentOS 6.5/6.4

Setup a Virtual Host/Website

Technical specification

Installing and Setting up Microsoft DNS Server

Virtual Host Continue

Using Webmin and Bind9 to Setup DNS Sever on Linux

Talk-101 User Guide. DNSGate

DNS. Computer Networks. Seminar 12

ViMP 3.0. SSL Configuration in Apache 2.2. Author: ViMP GmbH

Copyright

Virtual Host (Web Server)

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

How to set up the Integrated DNS Server for Inbound Load Balancing

Linux Administrator (Advance)

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

WebBridge LR Integration Guide

CO Web Server Administration and Security. By: Szymon Machajewski

The only skill required really is to locate and edit text-files with a text-editor like Notepad.

Configure a Mail Server

Configuring a Domain to work with your Server

User s guide. APACHE SSL Linux. Using non-qualified certificates with APACHE SSL Linux. version 1.3 UNIZETO TECHNOLOGIES S.A.

SIMIAN systems. Setting up a Sitellite development environment on Mac OS X. Sitellite Content Management System

GL254 - RED HAT ENTERPRISE LINUX SYSTEMS ADMINISTRATION III

Installing Apache Software

How To Guide Edge Network Appliance How To Guide:

Redmine Installation on Debian. v1.1

GL-275: Red Hat Linux Network Services. Course Outline. Course Length: 5 days

Configuring the BIND name server (named) Configuring the BIND resolver Constructing the name server database files

Created by : Ashish Shah, J.M. PATEL COLLEGE UNIT-5 CHAP-1 CONFIGURING WEB SERVER

Greenstone Documentation

Installing Rails 2.3 Under CentOS/RHEL 5 and Apache 2.2

ENTERPRISE LINUX NETWORKING SERVICES

HTG XROADS NETWORKS. Network Appliance How To Guide: EdgeDNS. How To Guide

GL275 - ENTERPRISE LINUX NETWORKING SERVICES

A Beginner's Guide to Setting Up A Web Hosting System (Or, the design and implementation of a system for the worldwide distribution of pictures of

Setting up an Apache Web Server for Greenstone 2 Walkthrough

Inbound Load Balance. User Manual

Monitoring a Linux Mail Server

Web Server: Principles and Configuration Web Programming 8) Web Server

Creating a master/slave DNS server combination for your Grid Infrastructure

Implementing a SPAM and virus scanning mail server using RedHat Linux 8.0

Installing Rails 2.3 Under Windows XP and Apache 2.2

Integrating SAP BusinessObjects with Hadoop. Using a multi-node Hadoop Cluster

How to: Install an SSL certificate

Zimbra :: The Leader in Open Source Collaboration. Administrator's PowerTip #3: June 21, 2007 Zimbra Forums - Zimbra wiki - Zimbra Blog

Web Server using Apache. Heng Sovannarith

ENTERPRISE LINUX NETWORKING SERVICES

- Domain Name System -

To enable https for appliance

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

AXIGEN Mail Server. Quick Installation and Configuration Guide. Product version: 6.1 Document version: 1.0

Implementing a SPAM and virus scanning mail server using RedHat Linux 8.0

Step-by-Step guide to setup an IBM WebSphere Portal and IBM Web Content Manager V8.5 Cluster From Zero to Hero (Part 2.)

Apache HTTP Server. Implementation Guide. (Version 5.7) Copyright 2013 Deepnet Security Limited

Parallels Plesk Automation

SQL Injection Attack Lab

EZcast Installation guide

Implementing HTTPS in CONTENTdm 6 September 5, 2012

How to Configure Split DNS

Running Multiple Shibboleth IdP Instances on a Single Host

KAREL UCAP DNS AND DHCP CONCEPTS MANUAL MADE BY: KAREL ELEKTRONIK SANAYI ve TICARET A.S. Organize Sanayi Gazneliler Caddesi 10

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

How to Configure DNS Zones

Cloud Server powered by Mac OS X. Getting Started Guide. Cloud Server. powered by Mac OS X. AKJZNAzsqknsxxkjnsjx Getting Started Guide Page 1

Apache 2.2 on QNX Neutrino 6.4.x OS Step-by-step installation manual

The Use of DNS Resource Records

DNS. Computer networks - Administration 1DV202. fredag 30 mars 12

HTG XROADS NETWORKS. Network Appliance How To Guide: DNS Delegation. How To Guide

Parallels Plesk Panel User Guide

Section 1 Overview Section 2 Home... 5

Redatam+SP REtrieval of DATa for Small Areas by Microcomputer

Rapid Access Cloud: Se1ng up a Proxy Host

Ubuntu Sever Administration

Solaris Networking Guide. Stewart Watkiss. Volume. New User To Technical Expert Solaris Bookshelf. This document is currently under construction

Apache Usage. Apache is used to serve static and dynamic content

Domain Name System :49:44 UTC Citrix Systems, Inc. All rights reserved. Terms of Use Trademarks Privacy Statement

Internet Security [1] VU Engin Kirda

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

DNS and Interface User Guide

Switching Your DNS WiredTree

Glossary of Technical Terms Related to IPv6

SMTP Settings. Magento Extension User Guide. Official extension page: SMTP Settings. User Guide: SMTP Settings

How to Configure edgebox as a Web Server


C:\www\apache2214\conf\httpd.conf Freitag, 16. Dezember :50

Device Log Export ENGLISH

CDN SERVICE ICSS ROUTE MANAGED DNS DEUTSCHE TELEKOM AG INTERNATIONAL CARRIER SALES AND SOLUTIONS (ICSS)


How to Add Domains and DNS Records

How to setup HTTP & HTTPS Load balancer for Mediator

Transcription:

Surname, Name: Section: Student No: Closed Book, closed note exam. Show your work! we must follow your reasoning. You are required to write down commands with necessary arguments and options. Give the best result that you can give! Each question worths 8 points unless otherwise stated. Over 100 points is bonus. Read the instructions carefully listed below and sign the box: SIGNATURE.......... Time of Submission: 1. On machine elif.abc.net.tr you are running bind and want to be master server abc.net.tr, aliveli.com.tr and slave server buyuk.net with masters 101.102.103.104, 200.210.220.250 and tiny.com.tr with masters 15.25.25.45 and 195.205.210.200, 140.150.160.100. Write a piece code for named.conf or named.conf.local \* named.conf */ zone "abc.net.tr" { type master; file db.abc-net-tr; zone "aliveli.com.tr" { type master; file db.aliveli; zone "buyuk.net { type slave; file "SEC.buyuk"; masters { 101.102.103.104; 200.210.220.250; zone "tiny.com.tr { type slave; file "SEC.tiny"; masters { 15.25.25.45; 195.205.210.200; 240.150.160.110; 23/July/2012 CTIS486 Midterm Solution 1

2. Write zone file for aliveli.com.tr which will be on elif.abc.net.tr with name servers elif.abc.net.tr, ayse.buyuk.net, and fatma.aliveli.com.tr. MX server will ve fatma.aliveli.com.tr, ahmet.aliveli.com.tr with lowest rank and ayse.buyuk.net next level. fatma will serve as aliveli.com.tr and www.aliveli.com.tr and wiki will be served by ayse.buyuk.net and blog will be served by elif.abc.net.tr. aliveli.com.tr has network 200.210.220.0/28, and ahmet and mehmet has IP 5 and 10. And fatma has IP 11 within the segment. Any machine on the network will be able to send mail for aliveli.com.tr. Also ar-ge sub domain will be served ayse.buyuk.net and mehmet.aliveli.com.tr. Use CNAME as much as possible. 12 pts ; zone file for aliveli.com.tr ; assume fatma has IP 200.210.220.11 $TTL 86400 @ IN SOA elif.abc.net.tr. hostmaster@aliveli.com.tr. ( 2012072300 12H 3H 2W 1H ) IN A 200.210.2210.11 IN NS elif.abc.net.tr. IN NS fatma IN NS ayse.buyuk.net. IN MX 10 ahmet IN MX 10 fatma IN MX 20 ayse.buyuk.net. IN TXT "v=spf1 ipv4:200.210.220.0/28" fatma IN A 200.210.220.11 ahmet IN A 200.210.220.5 mehmet IN A 200.210.220.10 www IN CNAME fatma ;www IN A 200.210.220.11 wiki IN CNAME ayse.buyuk.net. blog IN CNAME elif.abc.net.tr. ar-ge IN NS ayse.buyuk.net. IN NS mehmet.aliveli.com.tr. 23/July/2012 CTIS486 Midterm Solution 2

3. Write down apache configuration (minimal and complete: directory, index, VirtualHost, Log and webmaster directives) for fatma machine. Web will be on /var/www # part of apache configuration <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ServerName fatma.aliveli.com.tr DocumentRoot /var/www ServerAdmin webmaster@aliveli.com.tr ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/fatma-access.log combined NameVirtualHost * <VirtualHost *> ServerName aliveli.com.tr ServerAlias www.aliveli.com.tr DocumentRoot /var/www </VirtualHost> 4. fatma will server /usr/share directory under the name /Share/ to only users with IP of aliveli.com.tr # part of apache configuration Alias /Share/ "/usr/share/" <Directory "/usr/share/"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order deny,allow Deny from all Allow from 200.210.220.0/28 </Directory> 23/July/2012 CTIS486 Midterm Solution 3

5. mail for info will be distributed to info-group, manager, boss. And a copy is saved to file /usr/local/logs/info.txt and the program /usr/local/bin/infoack will send an acknowledgment mail to sender of each mail to info. info-group contains ali, elif, ayse, filiz, busra, doga. Write necessary statements in mail configuration. Give the name of the file in which you put these statements. #/etc/aliases or /etc/postfix/aliases info: info-group, manager, boss, /usr/local/logs/info.txt, " /usr/local/bin/infoack" info-group: ali, elif, ayse, filiz, busra, doga 6. Assume you have postfix running on fatma.aliveli.com.tr. You want all mail to leave as aliveli.com.tr, and accept mail aliveli.com.tr and fatma.aliveli.com.tr, mehmet.aliveli.com.tr, ftp.aliveli.com.tr, www.aliveli.com.tr, localhost, localhost.localdomain. fatma must relay all mail from aliveli.com.tr network. Write minimal configuration #/etc/postfix/main.cf myhostname = fatma.aliveli.com.tr mydomain = aliveli.com.tr myorigin = $mydomain mydestination = $mydomain $myhostname mehmet.aliveli.com.tr ftp.aliveli.com.tr, www.aliveli.com.tr localhost localhost.localdomain mynetworks = 200.210.220.0/28, 127.0.0.0/8 7. Assume in addition, fatma.aliveli.com.tr will server as mail server for abc.com.tr xyz.info.tr, abc.tv.tr. All mail for abc.tv.tr will be delivered abc-tv user, and only mail for webmaster@abc.com.tr will be accepted and delivered to abccom, and similarly webmaster@xyz.info.tr will be delivered user xyz-info. Write necessary statements. Identify files carefully. /etc/postfix/main.cf: virtual_alias_domains = abc.com.tr xyz.info.tr virtual_alias_maps = hash:/etc/postfix/virtual abc.tv.tr /etc/postfix/virtual @abc.tv.tr abc-tv webmaster@abc.com.tr webmaster@xyz.info.tr abc-com xyz-info 23/July/2012 CTIS486 Midterm Solution 4

8. Given a a text file, say abc.txt, which contains in each line an e-mail address grade and Full Name, write a bash script which will send an -email for each person in abc.txt which will say: Dear Full Name Your grade for course XYZ will be grade Thank you for your cooperation The XYZ Course Management. Subject line should read Your XYZ Grade. You can use mailx command. You can use a here document construct. 10 pts while read adres grade isim do mailx -s "Your XYZ grade" $adres <<END Dear $isim Your XYZ course grade for XYZ will be $grade Thank you for your cooperation XYZ Management END done < abc.txt 9. You want to export /usr/share on machines elif.xyz.net to network 139.179.33.0/24 Describe as root what should be done on elif, and on client 139.179.33.15 to mount under /mnt #on elif.xy<.net in file /etc/exports /usr/share 139.139.33.0/24(ro,sync,no_subtree_check) #then as root run exportfs -a # on client 139.179.33.15 issue mount elif.xyz.net:/usr/share /mnt 10. suppose you have an account on a linux machine 140.160.170.200 which is located in US. you want to bypass restrictions in Turkey. How would you setup a VPN using ssh to view webs (port 80). Describe how would you view a web, say, xyz.net. ssh -L 8000:localhost:80 user@140.160.170.200 # set your browser for proxy at port 8000 11. Write conditions for being a free software (özgür yazilim), Be precise as much as possible. - to run without any restriction - to study and modify foe own needs - to distribute with or without money - to distribute changes/changed versions 23/July/2012 CTIS486 Midterm Solution 5

12. You have accounts on pardus and liste machines, with home as /home/ctisx. You have Project directory at both machines. The Project directories were identical, but you have added some files, changed some, and deleted some files on pardus machine. How can you make them identical with a single command? # on pardus machine at /home/ctisx rsync -av --delete Project ctisx@liste:/home/ctisx 13. Given text files Notesx.txt in which each line contains student Name(as a single word), and her average as an integer between 0-99. A student with 85-99 will get A, 75-84 will get B, 65-74 will get C, 55-64 will get D and 64 and below will get F. Determine grade for each student; print name and grade pair for each student, count number A, B, etc; and at the end, print these numbers and averages of input numbers and grade average of the class. Use Awk. 10 pts #!/bin/awk $2 <= 54 {sum=sum+$2; gradef=gradef+1; print $1 " got F" } ( 55 <= $2 ) && ( $2 <= 64 ) { sum=sum+$2; graded=graded+1; print $1 " got D " } ( 65 <= $2 ) && ( $2 <= 74 ) { sum=sum+$2; gradec=gradec+1; print $1, " got C" } ( 75 <= $2 ) && ( $2 <= 84 ) {sum=sum+$2; gradeb=gradeb+1; print $1, " got B " } 85 <= $2 { sum=sum+$2; gradea=gradea+1; print $1, " got A " } END{ total=4 * gradea + 3 * gradeb+ 3 * gradec+graded; print " Number of A: " gradea " Number of B: " gradeb print "Number of C: " gradec " Number of D: " graded " number of F: " gradef print "Number of students: " NR " input ave:" sum/nr " grade ave: " total/nr } 23/July/2012 CTIS486 Midterm Solution 6

14. write a bash script which will take an arbitrary number of integers as arguments, sum the terms, 2, 5, 8, 11, 14,... at end it will print, number of arguments, number of terms entering into summation, and total sum. It will finish with sentence That s all folks #!/bin/bash sum=0 sayi=0 toplam=$# while [ $# -ge 2 ] do sum=$(( sum + $2 )) let sayi=sayi+1 if [ $# -lt 3 ] then break fi shift 3 done echo " total number of arguments: $toplam " echo "some of selected $sayi terms: $sum" echo "That s All Folks!" exit 0 23/July/2012 CTIS486 Midterm Solution 7