Skrip Debian New

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

KONFIGURASI ROUTING

1. nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
2. nano /etc/rc.local
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
3. nano /etc/network/option
ip_forward = yes
spoofprotect = yes
syncookies = no
4. nano /etc/sysctl.conf
cari kata #net.ipv4.ip_forward=1
kemudian hilangkan tanda #
5. /etc/init.d/networking restart
6. reboot

7. ping 192.168.1.2

8. ping 192.168.10.1

KONFIGURASI DNS SERVER


1. apt-get install bind9
2. nano /etc/bind/named.conf
zone "smkn2binjai.sch.id" {
type master;
file "db.smkn2binjai.sch.id";
};
zone "192.in-addr.arpa" {
type master;
file "db.192";
};
include "/etc/bind/named.conf.local";
3. cd /etc/bind/
4. cp db.local /var/cache/bind/db.smkn2binjai.sch.id
5. nano /var/cache/bind/db.smkn2binjai.sch.id
@ IN SOA smkn2binjai.sch.id. root.smkn2binjai.sch.id. (
@ IN NS smkn2binjai.sch.id.
@ IN A 192.168.10.1
www IN A 192.168.10.1
ftp IN A 192.168.10.1
mail IN A 192.168.10.1
6. cp db.127 /var/cache/bind/db.192

7. nano /var/cache/bind/db.192
@ IN SOA smkn2binjai.sch.id. root.smkn2binjai.sch.id. (
@ IN NS smkn2binjai.sch.id.
1.10.168 IN PTR smkn2binjai.sch.id.
8. nano /etc/resolv.conf
search smkn2binjai.sch.id
nameserver 192.168.10.1
nameserver 8.8.8.8
nameserver 8.8.4.4
9. /etc/init.d/bind9 restart
10. nslookup 192.168.10.1
11. nslookup smkn2binjai.sch.id

KONFIGURASI WEB SERVER


1. apt-get install mysql-server apache2 php5 phpmyadmin
2. cd /etc/apache2/sites-available/
3. cp default web
4. nano web
<VirtualHost *:80>
ServerAdmin admin@smkn2binjai.sch.id
ServerName www.smkn2binjai.sch.id
ServerAlias smkn2binjai.sch.id
DocumentRoot /var/www/web/
5. a2dissite default
6. a2ensite web
7. cd /var/www/
8. mkdir web
9. cd web/
10. nano index.html
<html><head><title>UJIAN KOMPETENSI KEJURUAN 2017/2018</title></head>
<body bgcolor=blue>
<center>
<h1><marquee>WELCOME TO SMK NEGRI 2.SCH.ID<br></marquee>
<blink>Nama Perserta : xxxxxxxxxx | <br>
Nomor Peserta : xx
</body>
</html>
13./etc/init.d/apache2 restart
14.Buka browser di client kemudian ketikan di url di komputer client http://www.smkn2binjai.sch.id

MENAMBAH BINARY SISTEM


1. Masukkan Disk yang akan ditambah (debian disk 2)
2. apt-cdrom add
3. nano /etc/apt/sources.list
Dan beri tanda # pada bagian tulisan (tulisan yang warna warni)
deb http://security.debian.org/ lenny/updates main contrib
4. apt-get update
5. apt-get upgrade

KONFIGURASI MAIL SERVER


1. apt-get install postfix courier-imap courier-pop
General Type of Mail Configuration : Internet Site
System Mail Name : smkn2binjai.sch.id
2. maildirmake /etc/skel/Maildir
3. adduser tukiman
4. adduser tukijan
5. nano /etc/postfix/main.cf
home_mailbox = Maildir/
6. dpkg-reconfigure postfix
General Type of Mail Configuration : Internet Site
System Mail Name : smkn2binjai.sch.id
Root and postmaster mail recipient : ok
Other destination to accept... : ok
Force synchronous updates... : No
Local Networks : (spasi) 0.0.0.0/0 (tambahkan di bagian akhir)
Use Procmail for local delivery : No
Mailbox size limit (bytes) : 0
Local address extension character : +
Internet protocols to use : ipv4
7. /etc/init.d/postfix restart
8. /etc/init.d/courier-imap restart

KONFIGURASI WEBMAIL SERVER


1. apt-get install squirrelmail
2. nano /etc/apache2/apache2.conf
Include /etc/squirrelmail/apache.conf #tambahkan di baris paling bawah
3. nano /etc/squirrelmail/apache.conf
<VirtualHost *:80> #ganti menjadi port 80
DocumentRoot /usr/share/squirrelmail
ServerName mail.smkn2binjai.sch.id #domain untuk E-Mail
</VirtualHost>
4. /etc/init.d/apache2 restart
5. Buka browser komputer client dan buka url mail.smkn2binjai.sch.id

KONFIGURASI FTP SERVER


1. apt-get install proftpd
Run proftpd : standalone
2. nano /etc/proftpd/proftpd.conf
# Includes DSO modules
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off
# If set on you can experience a longer connection delay in many cases.
IdentLookups off
ServerName " smkn2binjai.sch.id"
ServerType standalone
DeferWelcome off
3./etc/init.d/proftpd restart
Stopping ftp server: proftpd.
Starting ftp server: proftpd.
4. Buka browser komputer client dan buka url ftp.smkn2binjai.sch.id

KONFIGURASI PROXY SERVER


1. apt-get install squid
2. rm /etc/squid/squid.conf
3. nano /etc/squid/squid.conf
acl all src all
acl localnet src 192.168.10.0/24
acl situs url_regex -i "/etc/squid/blokir.txt"
http_access deny situs
http_access allow localnet
http_access allow all
http_port 3128 transparent
cache_mem 8 mb
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
store_dir_select_algorithm round-robin
cache_dir aufs /cache 10000 24 256
cache_store_log none
cache_access_log /var/log/squid/access.log
cache_effective_user proxy
cache_effective_group proxy
visible_hostname www.smkn2binjai.sch.id
cache_mgr admin@smkn2binjai.sch.id
4. nano /etc/squid/blokir.txt
(ketikan situs ingin yang ingin kamu blokir contoh yang di blokir adalah)
www.facebook.com
www.youtube.com
5. mkdir /cache
6. chown R proxy:proxy /etc/squid/blokir.txt
7. chown R proxy:proxy /cache
8. /etc/init.d/squid stop
9. squid z
10. /etc/init.d/squid start
11. nano /etc/rc.local
iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 3128
12. /etc/init.d/squid restart
13. Coba buka browser dan ketikan di url situs yang di blokir pada komputer client.

KONFIGURASI NTP SERVER


1. apt-get install ntp ntpdate
2. nano /etc/ntp.conf

#. . .
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#server 0.debian.pool.ntp.org iburst
#server 1.debian.pool.ntp.org iburst
#server 2.debian.pool.ntp.org iburst
#server 3.debian.pool.ntp.org iburst
server 127.127.1.0
fudge 127.127.1.0 stratum 1
#. . . #. . .
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
restrict 192.168.10.0
mask 255.255.255.0 nomodify notrap
#...
3. /etc/init.d/ntp restart
4. ntpq -p

KONFIGURASI FILE SERVER


1. apt-get install samba
2. mkdir home
3. cd home
4. mkdir server
5. cd server
6. mkdir share
7. cd share
8. chmod 777../share/ -R
9. nano /etc/samba/smb.conf Sesuaikan baris berikut, yang lain hiraukan tidak usah di hapus
workgroup = smkn2binjai.sch.id
security = share
dan tambahkan ini
[share] comment = share file disini
path = /home/server/share
browseable = yes
writeable = yes
guest ok = yes
10. /etc/init.d/samba restart Kalau sudah di restart coba di test melalui client dengan mengetikan ini : buka
RUN dan ketikan \\smkn2binjai.sch.id atau \\192.168.10.1

KONFIGURASI DHCP SERVER


1. apt-get install isc-dhcp-server
2. nano/etc/dhcp/dhcpd.conf
Beri tanda # pada semua baris. Kecuali baris script di bawah ini. Sesuaikan alokasi ip dengan topologi
jaringan.
#. . .
# A slightly different configuration for an internal subnet.
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.100 192.168.10.200;
option domain-name-servers smkn2binjai.sch.id;
option domain-name "smkn2binjai.sch.id";
option routers 192.168.10.1;
option broadcast-address 192.168.10.254;
default-lease-time 600;
max-lease-time 7200;
}
#. . .
3. nano /etc/default/isc-dhcp-server
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"
4. /etc/init.d/isc-dhcp-server restart

KONFIGURASI FIREWALL
Buka kembalai nano /etc/rc.local. Tambahkan sebelum exit 0
#blok port SSH
iptables A INPUT p tcp dport 22 j DROP
#Blok port TELNET
iptables A INPUT p tcp dport 23 j DROP

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy