all in one ( ssh,samba,router,dns,web & mail server )

Upload: san-haji

Post on 07-Aug-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    1/17

    Install SSH

    sudo apt-get install openssh-server 

    Install samba

    apt-get install samba

    chmod -R 777 sharing public

    nano /etc/samba/smb.conf 

     [sharing]

    Path = /home/sharing

    Comment = Ubuntu ile !haring

    Public = "es

    Read #nl" = "es

    $ro%seable = "es

     [public]

    Path = /home/public

    Comment = Ubuntu ile !haring

    Public = "es

    Read #nl" = no

    $ro%seable = "es

     /etc/init.d/smbd restart 

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    2/17

    Install Router

    Membuat IP forward

    root&Router-'(cat /proc/s"s/net/ipv)/ip*for%ard 

     Jika yang tampil adalah angka "0" maka ip forward belum aktif.ktifkan dengan !ara berikut

    root&Router-'(echo + , /proc/s"s/net/ipv)/ip*for%ard 

    lalu edit le sys!tl.!onf 

    root&Router-'(pico /etc/s"sctl.conf,

    hilangkan tanda "#" yang ada di depan tulisan "net.ip$%.!onf.default.forwarding&'"

    lalu e(it dan sa$e

    Membuat )able Routing

    ketikan perintah di bawah ini

    root&Router-'(iptables -t nat - P#!R#U01 -s

    +23.+45.+6.6/3) - 8!9U:R;:

    '*+.',-.0.0+% adalah IP /etwork dan /etmask dari IP Pri$ate yang akan digunakan di

     aringan lo!al. gar table routing yang sudah kita buat tadi tidak hilang ketika router di

    restart maka masukkan perintah routing di atas tadi pada le "r!.lo!al" dengan !ara 1

    root&Router-'(pico /etc/init.d/rc.local 

    tambahakan perintah routing yang kita ketik di atas tadi pada bagian le paling bawah.

    2ntuk memeriksa table routing yang kita buat tadi ketikkan

    root&Router-'(iptables -t nat -nv<

    maka akan mun!ul ip network yg kita masukkan.

    lalu restart kembali network anda

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    3/17

    Install 3/S Ser$er

    sudo apt-get install bind9

    4ongurasi 3/S Ser$er

    cd /etc/bindsudo nano named.conf.local

     )ambahkan pada baris paling bawah

    zone "mawi-server.com" {

     type master;

     file "/etc/bind/db.mawi-server";

    };

     

    zone "5.!.!9#.in-addr.arpa" {

     type master;

     notify no;

     file "/etc/bind/db.5";

    };

    5opy le !ontoh kongurasi domain

    sudo cp db.local db.mawi-server

    sudo cp db.!#$ db.5

    6dit le db.mawi7ser$er

    sudo nano db.mawi-server

    Hasilnya

    ;

    ; %&'( data file for local loopbac) interface

    ;

    *++,

    &' 012 mawi-server.com. root.mawi-server.com. 3

      # ; 0erial

      ; 4efres

      ; 4etry

      #!9# ; 67pire

      8 ; 'egative ace ++,

    ;

    &' '0 mawi-server.com.

    &' 2 !9#.!.5.#

    ns &' 2 !9#.!.5.#

    www &' 2 !9#.!.5.#

    mail &' 2 !9#.!.5.#

    sudo nano db.5

    Hasilnya

    ;

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    4/17

    ; %&'( reverse data file for local loopbac) interface

    ;

    *++,

    &' 012 mawi-server.com. root.mawi-server.com. 3

      ! ; 0erial

      ; 4efres

      ; 4etry  #!9# ; 67pire

      8 ; 'egative ace ++,

    ;

    &' '0 mawi-server.com.

    # &' :+4 mawi-server.com.

    ns &' :+4 !9#.!.5.#

    www &' :+4 !9#.!.5.#

    mail &' :+4 !9#.!.5.#

    6dit le et!resol$.!onf 

    sudo nano /etc/resolv.conf )ambahkan

    nameserver !9#.!.5.#

    searc mawi-server.com

    Restart ser$i!e 3/S

    sudo /etc/init.d/bind9 restart

    Penguian domain

    nsloo)up mawi-server.com

     

    0erver !9#.!.5.#

    2ddress !9#.!.5.#

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    5/17

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    6/17

    Pilih Internet Site: 94 

    Pilih 94 

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    7/17

    System mail name & mawi7ser$er.!om

    sudo install courier-imap courier-pop

    Pilih 94 

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    8/17

    Pilih /9

    Set Maildir

    sudo maildirma)e.courier /etc/s)el/Jaildir

     )ambah + user yang akan digunakan sebagai a!!ount email

    Saya menambahkan user rms dan linus

    sudo adduser rms

    2dding user LrmsM ...

    2dding new group LrmsM 3!!8 ...

    2dding new user LrmsM 3!!8 wit group LrmsM ...

    reating ome directory L/ome/rmsM ...

    opying files from L/etc/s)elM ...

    6nter new D'&N password

    4etype new D'&N password

    passwd password updated successfully

    anging te user information for rms

    6nter te new valueF or press 6'+64 for te default

      Oull 'ame PQ 4J0

      4oom 'umber PQ

      Hor) :one PQ

      Bome :one PQ

      1ter PQ

    &s te information correctR PE/nQ y

    4ongurasi ulang post(

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    9/17

    sudo dp)g-reconfigure postfi7

    4osongkan saa: 94 

     )ambahkan mail.mawi7ser$er.!om

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    10/17

    Pilih /9

     )idak usah diubah: 94 

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    11/17

    ;imit mailbo(: 0 & unlimit. 94 

    Isinya

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    12/17

    Pilih IP$%: 94 

    Set alamat Mailbo(

    sudo nano /etc/postfi7/main.cf

     )ambahkan pada baris paling bawah

    omeSmailbo7 T Jaildir/

    Restart ser$i!e mail ser$er

    sudo /etc/init.d/postfi7 restart

    sudo /etc/init.d/courier-pop restart

    sudo /etc/init.d/courier-imap restart

    Install aplikasi web mail S=uirrelmail

    sudo apt-get install sGuirrelmail

    4oneksikan pa!he dan S=uirrelmail

    sudo nano /etc/apace#/apace#.conf

    5ari baris kode di bawah ini

    < &nclude module configuration

    &nclude mods-enabled/U.load

    &nclude mods-enabled/U.conf

     )ambahkan

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    13/17

    &nclude /etc/sGuirrelmail/apace.conf

    6dit apa!he.!onf pada s=uirrelmail

    sudo nano /etc/sGuirrelmail/apace.conf

    5ari baris kode

    >/(irectory?

     )ambahkan di bawahnya

    >IirtualBost !9#.!.5.#?

      (ocument4oot /usr/sare/sGuirrelmail

      0erver'ame mail.mawi-server.com

    >/IirtualBost?

    Restart web ser$er

    sudo /etc/init.d/apace# restart

    Penguian mail ser$er: login ke s=uirrelmail dan lakukan pengiriman email

    Memblokir 8ebsite 3engan S=uid 3i 2buntu

    '. Install s=uid>

    1?# apt7get install s=uid>

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    14/17

    +. Setelah selesai install buka kongurasi s=uid dengan te(t editor

     1?# nano et!s=uid>s=uid.!onf 

    >. 5ari kata a!l !onne!t dan tambahkan kongurasi ini dibawahnya. 2ntuk men!ari gunakan

    5trlblokB

    http@a!!ess deny blok

    http@a!!ess allow all

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

    &&&&&&&&&&&&&&&&&

    4et 1

    a!l blok url@rege( 7iAet!s=uid>blokB dan http@a!!ess deny blok adalah untuk memblokir

    kata yang di!ari di browser

    %. Setelah itu: !ari kata http@port >'+- dan tambahkan kata transparent di belakangnya

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    15/17

    C. Duat le untuk list website yang ingin di blokir

    1?# nano et!s=uid>[email protected](t

    4etik 2R; yang ingin di blokir: disini saya !ontohkan website kaskus: dan youtube yang ingin

    diblokir

    ;akukan lagi seperti itu dengan !ommand

    1?# nano et!s=uid>[email protected](t

    2ntuk memblokir kata

    ,. Setelah selesai re!ongure E restart s=uid>

    s=uid> 7k re!ongure

    et!init.ds=uid> restart

    F. 2ntuk bisa menge!ek di komputer sendiri masuk ke settingan refo( G 4lik tab d$an!ed

    G klik

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    16/17

      tab /etwork G klik setting G pilih manual pro(y !onguration G isi http pro(y dengan

    lo!alhost

      dan isi port dengan port s=uid yaitu >'+-

    4et1Itu adalah untuk refo( tapi sepertinya browser yang lain tidak auh beda

    -. )ampilan defaultnya seperti ini

    *. pabila ingin mengganti nama administrator dan kata Aby lo!alhostB tambahkan

    kongurasi ini dibawah

      !ong yang tadi

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

    &&&&&&&&&&&&&&&&&

    !a!he@mgr yudhismkts.!om

    $isible@hostname pro(y.smkts.!om

    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

    &&&&&&&&&&&&&&&&&

    mailto:[email protected]:[email protected]

  • 8/20/2019 All in One ( Ssh,Samba,Router,DNS,Web & Mail Server )

    17/17

    4et1

    kata yudhismkts.!om dan pro(y.smkts.!om bisa dirubah sesuka hati

    '0. Setelah mengedit kongurasi angan lup re!ongure E restart

    Iptables t nat PR6R92)I/ I eth' p t!p dport -0 3/) to '*+.',-.'0.'1>'+-

    mailto:[email protected]:[email protected]