Download presentation
Presentation is loading. Please wait.
1
Linux Debian Fundamental Class
Penjelasan tentang debian server Yaniko Dimas Yogo Prasetyo
2
What Will You Get? Linux Basic DNS Server Web Server DHCP Server
Mail Server Proxy Server Membahas tentang linux basic Membahas tentang dns server
3
Objective At the end of this course, the student will:
Be familiar with Linux Debian OS and basic command of Linux Be able to configure, manage, do basic troubleshooting of Linux Debian OS Be able to build basic server services, such as DNS Server, Web Server, DHCP Server, Mail Server and Proxy Server
4
MODUL 1 Linux Basic
5
Why Debian? Unparalleled support Easy installation
Incredible amounts of software Easy upgrades Stability Fast and easy on memory Drivers for most hardware is written by GNU/Linux / GNU/kFreeBSD users, not the manufacturer. Good system security Many more…
6
Preparation DVD Source / ISO Debian 6 Server Computer (or virtual box)
Intel x86 : i386 / Intel 64 or AMD 65 : AMD64 RAM > 2GB HDD > 40 GB Internet connection > 512 mbps A cup of coffee or tea
7
Install Virtual Box
8
Configure Virtual Box Open “Oracle VM VirtualBox”
Then click “New” icon to create new virtual machine Give your Virtual Machine name, such as “My Debian” Choose “Linux” for “Type” field, then choose “Debian (32bit)” for “Version” field Then follow the Wizard
9
Configure Virtual Box And now, your Virtual Machine is almost ready
10
Configure Virtual Box Then click “Setting” icon and choose “Network” tab
11
Configure Virtual Box Choose “Bridge Adapter” for “Attached to” field
And choose the adapter which is connected to Internet (Same as your computer connected to Internet)
12
Configure Virtual Box Then choose “Storage” tab
13
Configure Virtual Box Then choose the CD icon in “Storage Tree”
Click the CD Icon in “Attribute” section and click “Choose a vitual CD/DVD disk file” And choose your Debian 6 ISO file Then click OK 1 2
14
Configure Virtual Box Then click “Start” icon and now you can start to Install you Debian
15
Install Debian 6 When you already start your virtual machine, you can find the option of installing debian
16
Install Debian 6 When you already start your virtual machine, you can find the option of installing debian And choos “Install” then press “Enter” And now you can start to follow the wizard
17
Install Debian 6 And now your Debian 6 is ready to use
18
Topology /24 Internet /24 x/25 (dhcp)
19
Basic Setup (Configure Network)
Run this script to setup your new IP Address: # nano /etc/network/interfaces Then it will show you a configuration file to configure network
20
Basic Setup (Configure Network)
At the section of “# The primary network interface” change the configuration script like below Then run this script to restart the network service # /etc/init.d/networking restart # The primary network interface auto eth0 iface eth0 inet static address netmask gateway
21
Basic Setup (Configure Network)
To check the new configuration of your netwok, run this script # ifconfig New IP Configuration
22
Basic Setup (Configure Network)
Run this script to setup DNS: # nano /etc/resolv.conf Then write the script with the following format nameserver <DNS Server IP Address> And you can add more than one DNS Server IP Address
23
Basic Setup (Configure Network)
Now you can test your configuration by doing ping test # ping google.com
24
Basic Setup (Configure APT Package Source)
Run this script to setup APT Package Source: # nano /etc/apt/sources.list Then write the script with the following format Then save the configuration, and run the script below to upgrade your package source # apt-get update
25
Basic Setup (Configure SSh Server)
Install SSh Server with the following script below # apt-get install openssh-server then you wait the installing process Now you can test the SSh Server with Remote SSh Program, such as “Putty”
26
Basic Setup (Testing SSh Server)
Enter the Server IP Address in “Host Name (or IP Address)” section and choose “SSH” for connection type Then click “Open”
27
MODUL 2 DNS Server
28
Installing DNS Server Bind9 (Berkeley Internet Name Domain Ver. 9) One of the most popular DNS Server Application in Linux, and most of Linux Distro use it for DNS Server and it’s pretty easy to be configured and understood You can install bind9 by following this script below # apt-get install bind9 And follow the wizard
29
Configuring DNS Server
There are 4 important files that we will be configured /etc/bind/named.conf file forward file reverse /etc/resolv.conf Edit and add some configuration script for “Forward” and “Reverse” in “named.conf” file
30
Configuring DNS Server
Run this script below: # nano /etc/bind/named.conf.local Then Add this following script to it zone "debiancourse.com" { //Your domain zone type master; file "db.debian"; //FORWARD file location, by default located in /var/cache/bind/ }; zone "192.in-addr.arpa" { //The first IP Address block file "db.192"; //REVERSE file location, by default located in /var/cache/bind/
31
Configuring Forward File
Run this script below: # cp /etc/bind/db.local /var/cache/bind/db.debian # nano /var/cache/bind/db.debian Then Add this following script to it $TTL @ IN SOA debiancourse.com. root.debiancourse.com. ( ; Serial ; Refresh ; Retry ; Expire ) ; Negative Cache TTL ; @ IN NS debiancourse.com ;add .dot. in every single domain you wrote @ IN A www IN A my IN A
32
Configuring Reverse File
Run this script below: # cp /etc/bind/db.127 /var/cache/bind/db.192 # nano /var/cache/bind/db.192 Then Add this following script to it $TTL @ IN SOA debiancourse.com. root.debiancourse.com. ( ; Serial ; Refresh ; Retry ; Expire ) ; Negative Cache TTL ; @ IN NS debiancourse.com. IN PTR debiancourse.com ;write the IP reversed
33
Configuring DNS Client
Run this script below: # nano /etc/resolv.conf Then Add this following script to first line Restart bind9 service: # /etc/init.d/bind9 restart search debaincourse.com Nameserver nameserver nameserver nameserver
34
Testing DNS Server From Debian 6, run this script # ping debiancourse.com From Windows First, set your primary DNS to your server IP Address Then run ping command to debiancourse.com on Command Prompt
35
MODUL 3 Web Server
36
Installing Web Server Apache 2 One of the most popular Web Server Application in Linux, and most of Linux Distro use it for Web Server and it’s pretty easy to be configured and understood also have a lot of feature inside You can install Apache2 by following this script below # apt-get install apt-get install apache2 php5 libapache2-mod-php5 And follow the wizard
37
Testing Web Server After you have finished for installing Apache, you can test your Web Server by accessing your server IP Address or Domain Access via IP Address Access via Domain
38
What is Virtual Host? Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the samehost name.
39
Configuring Virtual Host
In the DNS Modul, we have created a subdomain which is called my.debiancourse.com. Now, we will create virtual host for this subdomain Now, run this script: # nano /etc/apache2/sites-available/my.debiancourse.com Then Add this following script to first line #a2ensite my.debiancourse.com <VirtualHost *:80> ServerAdmin ServerName my.debiancourse.com DocumentRoot /var/www/my.debiancourse.com </VirtualHost>
40
Configuring Virtual Host
Now, we will make a directory for subdomain my.debiancourse.com # mkdir /var/www/my.debiancourse.com Make index page for my.debiancourse.com # nano /var/www/my.debiancourse.com/index.php Then Add this following script to first line And now restart you webserver service # /etc/init.d/apache2 restart <?php phpinfo(); ?>
41
Testing Virtual Host After you have finished to configure virtual host, you can test your Web Server by accessing your server Subdomain: my.debiancourse.com
42
MODUL 4 DHCP Server
43
What is DHCP? Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope) configured for a given network. DHCP assigns an IP address when a system is started
44
Installing DHCP Server
DHCP3-Server This is the default program of DHCP server for Linux. This program is compatible for all kinds of linux distro You can install DHCP Server by following this script below # apt-get install dhcp3-server And follow the wizard
45
Configuring DHCP Server
Now, run this script: # nano /etc/dhcp3/dhcp.conf Then Add this following script to last line And now restart the DHCP Server service # /etc/init.d/isc-dhcp-server restart # A slightly different configuration for an internal subnet. subnet netmask { range ; option domain-name-servers debiancourse.com; option domain-name “debiancourse.com"; option routers ; option broadcast-address ; default-lease-time 600; max-lease-time 7200; }
46
Testing DHCP Server It quite simple to test your DHCP Server, just connect your device directly to Server. And now, look at your network configuration detail
47
MODUL 5 Server
48
What is Server? A mail server (also known as a mail transfer agent or MTA, a mailtransport agent, a mail router or an Internet mailer) is an application that receives incoming e- mail from local users (people within the same domain) and remote senders and forwards outgoing for delivery.
49
Installing Email Server
iRedMail This program is more advance from default Server in Linux. It has simply control panel and very easy to deploy Download the latest stable release # wget Install package bzip2 # apt-get install bzip2 Extract iRedMail Package # tar xjf iRedMail tar.bz2 Change directory to iRedMail package directory # cd /root/iRedMail-0.8.5/ And now start iRedMail Installer # bash iRedMail.sh
50
Installing Email Server
After you start iRedMail Installer process, your screen will be like this Then choose “Yes” to continue the wizard installer After you choose “Yes” option, it will show a new wizard window like this Then you choose “Next”
51
Installing Email Server
On next wizard, choose “OpenLDAP” option using “Tab” button then click “Space” button to select Then press “Tab” until cursor appear on “Next” option And press “Enter” to excecute Edit LDAP suffix to dc=debiancourse,dc=com Then press “Enter”
52
Installing Email Server
Specify password for root LDAP And press “Enter” to excecute Specify password for MySQL Administrator Then press “Enter”
53
Installing Email Server
Specify first virtual domain Fill the field with debiancourse.com And press “Enter” Specify password for Domain Then press “Enter”
54
Installing Email Server
Select all optional components And press “Enter” Then it show you a confirmation to installing iRedMail Then press “y” Press “Enter” And it start to download all components
55
Configuring MX Record Your server is almost ready, now add MX Record in your DNS Forward File Open DNS forward file # nano /var/cache/bind/db.debian Add this script on the last line @ IN MX Restart bind9 service # /etc/init.d/bind9 restart
56
iRedAdmin Control Panel
iRedAdmin is control panel for your server. Now, you can easily manage your server such as managing user and domain Open iRedAdmin Control Panel by opening this url
57
iRedAdmin Control Panel
Then login to it Username : Password : <your server password> Now you have entered iRedAdmin Control Panel
58
Adding User After you enter iRedAdmin Control Panel, now select “Add” menu and click “User” Then enter your new user
59
Testing Server After you’ve created at least 2 user for server, now open iRedMail Webmail Page by opening this url Login with user that you have created
60
Testing Server Then you compose an to another user that you have created before In another kind of browser, open IRedMail Webmail. Then login to second user that you have created. And you can find a message that you have sent from first user account
61
MODUL 6 Proxy Server
62
What is Proxy Server? In computer networks, a proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients seeking resources from other servers.
63
Installing Proxy Server
Squid A proxy server and web cache daemon. It has a wide variety of uses, from speeding up a web server by caching repeated requests; to caching web, DNS and other computer network lookups for a group of people sharing network resources; to aiding security by filtering traffic. Install Squid Proxy Server # apt-get install squid
64
Configuring Proxy Server
Open Squid configuration file # nano /etc/squid/squid.conf Delete command sign (#) in front of this script below and edit if it necessary For access list, add script below to ACL section #. . . http_port 3128 transparent #add “transparent” cache_mem 16 MB cache_mgr visible_hostname proxy.debiancourse.com acl url dstdomain “/etc/squid/url” #blocked domains acl key url_regex –i “/etc/squid/key” #blocked words http_access deny url http_access deny key acl lan src / #local IP Address http_access allow lan http_access allow all
65
Configuring Proxy Server
Make a blocked site list # nano /etc/squid/url And enter the site that you will be blocked and save it detik.com kaskus.co.id Make a blocked words list # nano /etc/squid/key And enter the site that you will be blocked and save it sex porn And start # squid -z
66
Testing Proxy Server Point your browser proxy setting to your proxy IP Address
67
Testing Proxy Server Point your browser proxy setting to your proxy IP Address
68
Testing Proxy Server And now open site url that you have blocked before
69
Additional If you use your Proxy Server, you make as a Gateway Server other than as Proxy Server. You can make a Transparent Proxy with it. Transparent proxy will force every single package to pass through the proxy before it go to Internet How? Just add this IPTABLES to your server # iptables –t nat –A PREROUTING –s /24 –p tcp --dport 80 –j REDIRECT --to-port 3128 # iptables-save > /etc/iptables
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.