1.Mengubah range DHCP menjadi 192.168.5.15 - 192.168.5.17
Masuk kedirectory /etc/dhcp3/dhcpd.conf
# A slightly different configuration for an internal
subnet 192.168.5.0 netmask 255.255.255.0
range 192.168.5.15 192.168.5.17;
option domain-name-servers 192.168.5.1;
option domain-name "angga.net";
option routers 192.168.5.1;
option broadcast-address 192.168.5.255;
default-lease-time 600;
max-lease-time 7200;
}
2.range DHCP 192.168.5.15 - 192.168.5.17,tetapi salah satu client mendapatkan range IP berbeda yaitu 192.168.5.30
Masuk kedirectory /etc/dhcp3/dhcpd.conf
{
host rated (disesuaikan dengan nama host client tersebut)
hardware ethernet 00:26:2d:5e:ea:cc; (disesuikan dengan MAC address ethernet PC tersebut)
fixed-address 192.168.37.30; (IP yang di inginkan)
}
3.Mengubah nama version squirrelmail
Buka directory /usr/share/squirrelmail/src/ buka login.php,kemudian edit :
sprintf (_("AnggaMail version %s"), $version) . '
$ ' ' . _("By the anggaMail Project Team") . '
' . "\n"$ html_tag( 'table',
html_tag( 'tr',
html_tag( 'td', '' . sprintf (_("%s Login"), $org_name) . "\n",
'center', $color[0] )
) .
html_tag( 'tr',
4.Setting samba server,bisa di rename,di copy,di edit.
[global]
workgroup = WORKGROUP
netbios name = angga
security = share
wins support = no
[data] path = /home/seven/angga1
read only = no
comment = ini data
read only = no
browseable = yes
public = yes
force user = seven force group = seven
available = yes
writable = yes
5.Tugas FTP
Membuat 3 user,user 1,user 2,user 3,
Ø
user 1 tidak bisa membaca user2 dan3,dan bisa membaca root
Ø user 2 tidak bisa membaca user1 dan3,dan bisa membaca root
Ø user 3 tidak bisa membaca user1 dan 2,tetapi tidak bisa membaca root
cara :
#Masuk ke directory /home
debian:~# cd /home/
debian:~# chown user3:user1 user1
debian:~# chmod 770 user1
debian:~# chown user3:user2 user2
ebian:~# chmod 770 user2
#Masuk ke directory root
debian:~# chown user3:user3 root
debian:~# chmod 007 root/
Jumat, 10 Desember 2010
Tugas test server
Selasa, 24 Agustus 2010
WEB server
Install apache dengan perintah :
# apt-get install apache2
Edit file untuk tampilan webNya :
# nano /var/www/apache-default/index.html
Edit susai dengan Web yang anda inginkan
Simpan konfigurasi tersebut.
Restart apache dengan perintah :
# /etc/init.d/apache2 restart
Setting Mail server
Install postfix :
# apt-get install postfix
Intall imap :
# apt-get install courier-imap
Install pop :
# apt-get install courier-pop
Install squirrelmail :
# apt-get install squirrelmail
courier-authdaemon :
# apt-get install courier-authdaemon
Edit file default,Tambahkan script pada file default :
# nano /etc/apache2/sites-available/default
Alias /mail “/usr/share/squirrelmail/”
Options Indexes Multiviews FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all
Allow from all
Simpan konfigurasi tersebut ;
Setelah itu Edit file main.cf,tambahkan script seperti file dibawah ini ;
# nano /etc/postfix/main.cf
myhostname = angga.net
mydomain = angga.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = angga.net, angga, localhost.localdomain, localhost.localdomain, localhost
home_mailbox = Maildir/
relayhost =
mynetworks = 127.0.0.0/8 192.168.1.2/24
#mailbox_command = procmail –a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
Simpan konfigurasi tersebut ;
Setelah itu Konfigurasi squirrelmail
# squirrelmail-configure
Ketik 2,server setting
Ketik A,Imap
Server software, ganti dengan courier
Membuat folder Maildir dengan cara ;
# cd /home/angga
# maildirmake Maildir
#chown angga.angga Maildir/ -Rf
Restart semua aplikasi nya;
# /etc/init.d/postfix restart
# /etc/init.d/courier-imap restart
# /etc/init.d/courier-pop restart
# /etc/init.d/courier-authdaemon restart
# /etc/init.d/squirrelmail restart
Lanjut membaca.. “Setting Mail server” »»
Setting samba server
Install samba dengan perintah
# apt-get install samba
masukkan cd sesuai yang diminta
kemudian masuk pada nano /etc/smb.conf
Tambahkan file berikut ;
[global]
workgroup = debian
netbios name = angga
security = share
[angga]
comment = angga
path = /home/angga/
public = yes
read only = yes
write list = yes
valid users = nobody
4.Restart Samba server :
# /etc/init.d/samba restart
Tambahan buat konfigurasi samba server ;
[angga] —> menentukan nama filesharing
security = user—> hanya untuk user yang terdaftar.
path = /media/repo/—> path tempat folder dishare
guest ol = no—> akses guest ditolak, untuk menghidupkan ganti dengan yes
browseable = yes—> bisa dibrowsing
read-only = no—> read-only memiliki opsi yes atau no
valid-users = yodi, root—-> list user yang memiliki akses
writeable = yes—> bisa ditulis.
create mask = 700—-> hak membuat file
directory mask = 700—-> hak membuat direktori
Setting FTP server
Install ftp dengan perintah
# apt-get install proftpd
masukkan cd sesuai yang diminta
Setelah itu, kita konfigurasikan sesuai dengan file dibawah ini :
Buat dulu folder untuk Proftp /home/angga directory :
cd /home
sudo mkdir angga
Untuk membuat user dan password, masukkan perintah ini di command:
Code:
sudo useradd userftp -p your_password -d /home/angga -s /bin/false
sudo passwd userftp
ket: userftp (contoh nama user), your_password (contoh password)
Di dalam folder angga, buat lagi folder untuk download dan upload:
cd /home/angga/
sudo mkdir download
sudo mkdir upload
Sekarang saatnya untuk setting hak akses untuk pengguna (user), ikuti perintah command yang dibawah:
cd /homesudo chmod 755 angga
cd angga
sudo chmod 755 download
sudo chmod 777 upload
#Konfigurasi File proftpd
nano /etc/proftpd.conf
# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on # Choose here the user alias you want !!!!
UserAlias sauron userftp
ServerName “melodic”
ServerType standalone
DeferWelcome on
MultilineRFC2228 on
DefaultServer on
ShowSymlinks off
TimeoutNoTransfer 600
TimeoutStalled 100
TimeoutIdle 2200
DisplayChdir .message
ListOptions “-l”
RequireValidShell off
TimeoutLogin 20
RootLogin off
# It’s better for debug to create log files
ExtendedLog /var/log/ftp.log
TransferLog /var/log/xferlog
SystemLog /var/log/syslog.log
#DenyFilter \*.*/
# I don’t choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)
UseFtpUsers off
# Allow to restart a download
AllowStoreRestart on
# Port 21 is the standard FTP port, so you may prefer to use another port for security reasons (choose here the port you want)
Port 2010
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 8
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
PersistentPasswd off
MaxClients 8
MaxClientsPerHost 8
MaxClientsPerUser 8
MaxHostsPerUser 8
# Display a message after a successful login
AccessGrantMsg “welcome !!!”
# This message is displayed for each access good or not
ServerIdent on “Welcome Bro”
# Set /home/FTP-shared directory as home directory
DefaultRoot /home/FTP-gue
# Lock all the users in home directory, ***** really important *****
DefaultRoot ~
MaxLoginAttempts 5
#VALID LOGINS
AllowUser userftp
DenyALL
Umask 022 022
AllowOverwrite off
DenyAll
Umask 022 022
AllowOverwrite off
DenyAll
Umask 022 022
AllowOverwrite on
DenyAll
AllowAll
Restart Proftpd
/etc/init.d/proftpd restart
Login Ke FTP server menggunakan User FTP n Password yg telah dibuat..
ftp://ip-address:port
user : user ftp
pwd : pswd
perintah lain :
sudo /etc/init.d/proftpd start
sudo /etc/init.d/proftpd stop
Lanjut membaca.. “Setting FTP server” »»
Setting DNS server
Install bind9 dengan perintah
# apt-get install bind9
masukkan cd sesuai yang diminta
Masuk pada direktori /etc/bind9,
Setelah itu, kita copy file db.127, file db.local, dan file named.conf Dengan cara sebagai berikut :
# cp db.127 db.192
# cp db.local db.angga
# cp named.conf named.conf.backup
Edit file nano db.192 seperti konfigurasi dibawah ini:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA angga.net. root. angga.net.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS angga.net.
1.17.168 IN PTR angga.net.
www IN PTR angga.net.
Edit file pico named.conf seperti konfigurasi dibawah ini yang bercetak tebal :
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include “/etc/bind/named.conf.options”;
// prime the server with knowledge of the root servers
zone “.” {
type hint;
file “/etc/bind/db.root”;
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone ” angga.net ” {
type master;
file “/etc/bind/db. angga″;
};
zone “192.in-addr.arpa” {
type master;
file “/etc/bind/db.192″;
};
zone “0.in-addr.arpa” {
type master;
file “/etc/bind/db.0″;
};
Edit file nano db. angga seperti konfigurasi dibawah ini :
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA angga.net. root. angga.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS angga.net.
@ IN A 192.168.1.2
www IN A 192.168.1.2
Restart bind9,
/etc/init.d/bind9 restart
Ping www.angga.net apabila reply, DNS sudah berhasil
Lanjut membaca.. “Setting DNS server” »»Install DHCP server
Install dhcp3-server dengan perintah :
#apt-get install dhcp3-server
masukkan cd sesuai yang diminta,
Konfigurasi file dhcpd.conf,
Masuk pada direktori cd /etc/dhcp3,
#nano dhcp.conf
Edit file dhcp.conf seperti konfigurasi dibawah ini yang bercetak tebal :
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages (‘none’, since DHCP v2 didn’t
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks…
option domain-name angga.net “;
option domain-name-servers angga.net, 192.168.1.2;
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
#subnet 10.152.187.0 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.
#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}
# This declaration allows BOOTP clients to get dynamic addresses,
# which we don’t really recommend.
#subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}
# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.4 192.168.1.10;
# option domain-name-servers angga.net;
# option domain-name ” angga.net “;
option routers 192.168.1.2;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.
#host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename “vmunix.passacaglia”;
# server-name “toccata.fugue.com”;
#}
# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}
# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.
#class “foo” {
# match if substring (option vendor-class-identifier, 0, 4) = “SUNW”;
#}
#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of “foo”;
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of “foo”;
# range 10.0.29.10 10.0.29.230;
# }
#}
Simpan konfigurasi tersebut.
Restart dhcp3-server:
# /etc/init.d/dhcp3-server restart
Jika tidak keluar failed, maka dhcp3-server sudah berhasil