Tampilkan postingan dengan label konfigurasi server debian. Tampilkan semua postingan
Tampilkan postingan dengan label konfigurasi server debian. Tampilkan semua postingan

Jumat, 02 September 2011

Konfigurasi - FTP Server Debian

Kali ini saya akan memposting tentang konfigurasi Ftp server di Debian, saya postingkan ini supaya bermanfaat bagi pembelajaran anda sekalian. langsung saja ikuti langkah - langkah berikut :

Fungsi: Melayani client untuk proses upload dan download file
Langkah Membuat:

1. Memberikan ip untuk server FTP
#vim /etc/network/interfaces
address 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0


2. Menginstall packet (vsftpd /Very Secure FTP Daemond)
#apt-get install vsftpd

3. Mengkonfigurasi FTP Server
#vim /etc/vsftpd.conf

anonymous_enable=NO (mendisable user anonymous)

#Uncomment this to enable any form of FTP write command.

local_enable=YES (mengaktifkan user lokal_
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd’s)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages – messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using “root” for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command “SIZE /big/file” in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES

4. Menjalankan vsftpd
#/etc/init.d/vsftpd restart

5. Menguji server ftp
#telnet localhost 21
kelau pesan yang muncul conected to localhost —> server sudah jalan
Kalau pesan conection refused ——> server tidak jalan


6. Mencoba upload/download file
#ftp localhost atau #ftp nomor_ip komputer
masukkan user
masukkan password
untuk upload —>put atau mput
untuk download —>get atau mget
untuk pindah direktori —-> cd
untuk melihat isi direktor —>ls
Kalau di windows pakai filezilla atau wsftp


Letak file
login user system maka letak file di /home/user
login anonymous maka letak file di /home/ftp


selamat mencoba… semoga bermanfaat… amien…

Rabu, 31 Agustus 2011

Konfigurasi - MailServer di Debian


Kali ini saya akan memposting tentang Konfigurasi MailServer di Debian. Saya Share kan ini supaya bermanfaat bagi pembelajaran kalian, langsung saja kita mulai. ikuti langkah - langkah berikut ini :

1). Install packages yang diperlukan untuk membangun “Mail Server” :

# mustankk@debian:~$ apt-get install postfix
# mustankk@debian:~$ apt-get install squirrelmail
# mustankk@debian:~$ apt-get install courier-imap
# mustankk@debian:~$ apt-get install courier-pop
# mustankk@debian:~$ apt-get install php4-imap


2). Edit file konfigurasi Mail Server :

# mustankk@debian:~$ pico /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA’s job.
append_dot_mydomain = no
# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
# TLS parameters

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache


# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mustankk.com
mydomain = mustankk.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = mustankk.com, mustankk, localhost.localdomain, localhost
home_mailbox = Maildir/
relayhost =
mynetworks = 127.0.0.0/8 192.168.13.0/24
#mailbox_command = procmail -a “$EXTENSION”
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all


3). Edit juga file konfigurasi yang lain :

# mustankk@debian:~$ pico /etc/apache2/sites-available/default

NameVirtualHost 192.168.13.13
NameVirtualHost 192.168.2.1

ServerAdmin webmaster@localhost
DocumentRoot /var/www/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

# This directive allows us to have apache2’s default start page
# in /apache2-default/, but still have / go to the right place

RedirectMatch ^/$ /apache2-default/

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/error.log


# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.

LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /mail/ “/usr/share/squirrelmail/”

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all



DocumentRoot /home/www
ServerName mustankk.net


4). Membuat folder Maildir di user tertentu :

# mustankk@debian:~$ cd /home/mustankk
# mustankk@debian:~$ maildirmake Maildir

5). Ubah hak akses pemilik Maildir :

# mustankk@debian:~$ chown mustankk.mustankk Maildir -Rf

6). Membuat folder Maildir otomatis ketika create user :

# cd /etc/skel
# maildirmake Maildir

7). Jalankan Mail Server :

# mustankk@debian:~$ /etc/init.d/postfix restart
# mustankk@debian:~$ /etc/init.d/squirrelmail restart
# mustankk@debian:~$ /etc/init.d/courier-imap restart
# mustankk@debian:~$ /etc/init.d/courier-pop restart
# mustankk@debian:~$ /etc/init.d/cuorier-authdaemon restart


Konfigurasi - DHCP server Debian

Kali ini saya akan memposting tentang Konfigurasi DHCP server di Debian . semoga apa yang saya sharekan ini bisa bermanfaat bagi pembelajaran anda sekalian. langsung saja ikuti langkah - langkah berikut :

1. Install paket dhcp server

# apt-get install dhcp3-server

2. Konfigurasi dhcp server

# vim /etc/dhcp3/dhcp.conf

Konfigurasi utama DHCP Server terletak pada /etc/dhcp3/dhcpd.conf.

optiondomain-name-servers 192.168.254.1;
subnet 192.168.254.0 netmask 255.255.255.0 {
range 192.168.254.1 192.168.254.10;
optiondomain-name-servers 192.168.254.1;
option domain-name “testing.com”;
option routers 192.168.254.1;
option broadcast-address 192.168.252.15;
default-lease-time 3600;
max-lease-time 7200;
}


Keterangan:
Pada baris pertama merupakan subnet dan netmask, baris kedua adalah range ip address yang kita alokasikan untuk klien, baris ketiga pemberian DNS untuk klien, baris keempat adalah name buat klien, baris kelima merupakan router ip, baris keenam merupakan broadcast ip, baris ketujuh adalah default waktu sewa dan baris terakhir maksimum waktu sewa.

3. Konfigurasi interface default

# vim /etc/default/dhcp

Konfigurasi utama DHCP server terletak pada /etc/default/dhcp

INTERFACE=”eth0″

(interface yang digubakan sbg dhcp server)

Restart DHCP server

$ /etc/init.d/dhcp3-server restart jika tidak ada error, berarti konfigurasi telah benar

4. Konfigurasi interface card

auto eth0
iface eth0 inet static
address 192.168.254.1
netmask 255.255.255.0
network 192.168.254.0
broadcast 192.168.254.255
gateway 192.168.254.1

5. Client konfigurasi

Rubah file berikut

# nano /etc/network/interfaces

masukkan konfigurasi:

auto eth0
iface eth0 inet dhcp


kemudian restart service networking

# /etc/init.d/networking restart

kemudian cek IP address

# ifconfig

Konfigurasi - DNS server Debian

kali ini saya akan menposting konfigurasi DNS server di debian, supaya postingan ini bermanfaat bagi pembelajaran kalian... langsung saja ikuti langkah - langkah berikut sebelum instalasi DNS server kita harus terlebih dahulu menginstal BIND9 dahulu, dengan cara :

• masukan root

• ketik cd /

• install bind 9 dengan perintah apt-get install bind9

• dengan masukan cd debian 1 dan 4 (cd yang diminta)

• lalu cd etc/bind/

• lalu edit file named.conf dengan perintah pico named.conf atau vi named.conf

• cari tulisan

zone"127.in-addr-arpa"{
type master ;
file "/etc/bind/db.127";
};


• maka tambahkan dibawahnya

zone "mustankk.com"{
type master;
file "/var/cache/bind/db.debian";
};


zone "192.in-addr.arpa"{
type master;
file "/var/cache/bind db.192";
};


• kemudian save dengan tekan ctrl+x, pilih yes dengan tekan y.

• Lalu copy file db.127 dan db.local pada directory yang sama dan kita pindahkan pada directory /var/cache/bind

• Kemudian kita ganti nama menjadi

db.127 ==> db.192

dengan perintah = cp db.127 /etc/bind/db.192
db.local ==> db.debian
dengan perintah = cp db.local /etc/bind/db.debian

• setelah itu pindah db.192 & db. debian ke direktory /var/cache/bin , dengan perintah :
db.192
dengan perintah = mv db.192 /var/cache/bin
db.debian
dengan perintah = mv db.debian /var/cache/bin

• masuk cd /var/cache/bin
• Setelah itu edit file db.192 ,misal sebagai berikut pada:

@ IN NS mustankk.com
1.12.168 IN PTR mustankk.com
www IN PTR mustankk.com


• Begitu juga dengan db.debian:

@ IN NS mustankk.com
@ IN A 192.168.12.1
www IN A 192.168.12.1


• Save dengan tekan ctrl+x , pilih yes dengan ketik y

• lalu restart /etc/init.d/bind9 restart

Senin, 29 Agustus 2011

Konfigurasi - Proxy di Linux Debian

Kali ini saya akan memposting tentang konfigurasi proxy di debian. Langsung saja kita mulai, mula mula masukan cd debian revo. lalu ketikan dan ikuti langkah langkah di bawah ini...

> Install squid

# apt-get install squid

> Matikan squid dahulu :

# /etc/init.d/squid stop

> Edit squid :

#pico /etc/squid/squid.conf

cari dan tambahkan : ( hilangkan tanda # )
http_port 3128 transparent -> port default proxy
cache_mem 16 mb
cache_dir ufs /var/spool/squid 500 16 256
cache_mgr admin@pephy.com
visible_hostname proxy.tkj.com -> nama visible hostname kamu
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off


> Kemudian cari tulisan : acl CONNECT method CONNECT, dan tambahkan

acl situs url_regex -i “/etc/situsterlarang.txt” -> u/ blokir setiap situs
http_access deny situs
acl lan src 192.168.1.0/24
http_access allow lan
http_access allow all


> lalu save .


> Konfigurasi interfacenya :
# pico /etc/network/interface

iface lo inet loopback

iface eth0 inet static
address 192.168.123.13
netmask 255.255.255.0
gateway 192.168.123.1

iface eth2 inet static
address 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0

auto eth0 eth2

auto lo


> Lalu buat file untuk mengeblok situsnya :
# mcedit /etc/situsterlarang.txt

facebook
friendster
yahoo


> Dan save.

> Buat swap :
# squid -z

> Kemudian aktifkan ip_forwading dan tabel routing dg perintah :

# echo 1 > /proc/sys/net/ipv4/ip_forwad
# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE

> Lalu kita REDIRECT port 80 ke port 3128 dg perintah :

# iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p tcp –dport 80 -j REDIRECT –to-ports 3128
# iptables-save

> Lalu restart squid ;
# /etc/init.d/squid restart

> Cek situs yg telah di blok / dipindahkan portnya …

Catatan :
Untuk menyetting/menambahkan setting waktu, ketikkan:
acl waktu time MTWHFA 01:00-12:00
acl jam time MTWHFA 12:30-24:00
http_access deny waktu
http_access deny jam


Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Hosted Desktop