KONSEP JARINGAN
Jaringan komputer adalah kumpulan dua atau lebih komputer yang terhubung (media kabel,
wireless dll) satu sama lain. Perangkat jaringan komputer terdiri dari:
• LAN (Local Area Network), adalah jaringan komputer yang jumlah dan jangkauan komputer
relatif lebih sedikit, misalnya jaringan komputer dalam satu gedung atau kampus.
• WAN (Wide Area Network), adalah jaringan komputer yang meliputi jumlah dan jangkauan
komputer relatif lebih luas, misalnya jaringan komputer antar kota auatu daerah.
• Internet, adalah jaringan komputer yang lebih luas dan bersifat global.
• Network Interface Layer, bertanggung jawab dalam pengiriman dan penerimaan data dari dan
ke media fisik, media fisik dapat berupa kabel, serat optik, atau gelombang radio.
• Interner Layer, bertanggung jawab dalam proses pengiriman data ke alamat yang tepat.
• Transpot Layer, bertanggung jawab untuk mengadakan komunikasi antara dua host/komputer.
• Aplication Layer, pada layer ini terdapat semua aplikasi yang menggunakan protokol TCP/IP.
1. Client A
Aan:
A. Set Ip Address
]# ping 192.168.2.3
Rohmad:
A. Set Ip Address
]# ifconfig eth0 192.168.2.3 (bersifat temporer) atau
]# echo "ifconfig eth0 192.168.2.3" >> /etc/rc.local (bersifat permanen & diaktifkan dengan
reboot)
]# ping 192.168.2.2
A. Set Ip Address
E. Masukkan Ip Forward
A. Set Ip Address
]# ifconfig eth0 192.168.13.1 (bersifat temporer) atau
]# echo "ifconfig eth0 192.168.13.1" >> /etc/rc.local (bersifat permanen & diaktifkan dengan
reboot)
D. Masukkan Ip Forward
1. ]# kppp
>>KPPP
1a.Setup/Configure
1b.Accounts
2b.New
3a.Dialog Setup/Manual Setup
4a.Dial
4b.Connection Name: (misal telkom)
4c.Add Phone Number : (misal 080989999)
4d.OK
5a.Modems
5b.New
6a.Device
7a.Modem Device : /dev/ttyS0
7b.Flow Control : Hardware [CRTSCTS]
7c.Line Termination : CR
7d.Connection Speed : 57600
7e.OK
>>KPPP
Connect to : telkom
login ID : telkomnet@instan
Password : telkom
Connect
Client
Konfigurasi DNS
A. Client
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "aan.depok.ok" IN {
type master;
file "aan.depok.ok.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
SEBELUM DIRUBAH
TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
1D IN A 127.0.0.1
~
SETELAH DIRUBAH
$TTL 86400
$ORIGIN aan.depok.ok.
@ 1D IN SOA ns.aan.depok.ok. root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ 1D IN NS ns.aan.depok.ok.
@ 1D IN MX 10 mail.aan.depok.ok.
web 1D IN A 192.168.2.2
mail 1D IN A 192.168.2.2
www 1D IN A 192.168.2.2
~
;; AUTHORITY SECTION:
aan.depok.ok. 86400 IN NS ns.aan.depok.ok.
B. Server
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "aan.depok.ok" IN {
type master;
file "aan.depok.ok.zone";
allow-update { none; };
};
zone "depok.ok" IN {
type master;
file "depok.ok.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
SEBELUM DIRUBAH
TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
1D IN A 127.0.0.1
~
SETELAH DIRUBAH
$TTL 86400
$ORIGIN depok.ok.
@ 1D IN SOA ns.depok.ok. root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ 1D IN NS ns.depok.ok.
@ 1D IN MX 10 mail.depok.ok.
web 1D IN A 192.168.13.1
mail 1D IN A 192.168.13.1
www 1D IN A 192.168.13.1
aan 1D IN NS ns.aan.depok.ok.
ns.aan 1D IN A 192.168.2.2
dian 1D IN NS ns.dian.depok.ok.
ns.dian 1D IN A 192.168.3.2
samrodin 1D IN NS ns.samrodin.depok.ok.
ns.samrodin 1D IN A 192.168.6.2
bambang 1D IN NS ns.bambang.depok.ok.
ns.bambang 1D IN A 192.168.8.2
rohmad 1D IN NS ns.rohmad.depok.ok.
ns.rohmad 1D IN A 192.168.2.3
~
~
;; ANSWER SECTION:
www.depok.ok. 86400 IN A 192.168.13.1
;; AUTHORITY SECTION:
depok.ok. 86400 IN NS ns.depok.ok.
WEB SERVER
1. root]# vi /etc/httpd/conf/httpd.conf
SEBELUM DIRUBAH
# DocumentRoot: The directory . . .
#
DocumentRoot "/var/www/html"
#
# Each directory to which Apache . . .
#
# First, we configure the . . .
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#
# Note that from this point forward . . .
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for . . .
#
# The Options directive . . .
#
Options Indexes FollowSymLinks
#
# AllowOverride controls . . .
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
SETELAH DIRUBAH
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/var/www/html"
DocumentRoot "/var/aan"
#
# Each directory to which Apache . . .
#
# First, we configure the . . .
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#
# Note that from this point forward . . .
#
#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/var/www/html">
<Directory "/var/aan">
#
# Possible values for . . .
#
# The Options directive . . .
#
Options Indexes FollowSymLinks
#
# AllowOverride controls . . .
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
2. root]# mkdir /var/aan
3. root]# cd /var/aan
4. aan]# vi index.html
1. root]# vi /etc/httpd/conf/httpd.conf
SEBELUM DIRUBAH
<IfModule mod_userdir.c>
#
# UserDir is disabled . . .
#
#UserDir disable
#
# To enable requests to /~user/ . . .
#
#UserDir public_html
</IfModule>
SETELAH DIRUBAH
<IfModule mod_userdir.c>
#
# UserDir is disabled . . .
#
#UserDir disable
#
# To enable requests to /~user/ . . .
#
#UserDir public_html
UserDir aan_banget
</IfModule>
Changing password for user ansori. New password: BAD PASSWORD: it is based on a
dictionary word Retype new password: passwd: all authentication tokens updated successfully.
Virtual Host
1. root]# vi /etc/httpd/conf/httpd.conf
SEBELUM DIRUBAH
### Section 3: Virtual Hosts
#
# VirtualHost: . . .
#
#NameVirtualHost *
# VirtualHost . . .
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
SETELAH DIRUBAH
### Section 3: Virtual Hosts
#
# VirtualHost: . . .
#
#NameVirtualHost *
# VirtualHost . . .
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost 192.168.1.127>
ServerAdmin aan@lpknf.aan.banget
DocumentRoot /var/aan
ServerName www.lpknf.aan.banget
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
2. root]# vi /etc/hosts
SEBELUM DIRUBAH
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
SETELAH DIRUBAH
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.127 www.lpknf.aan.banget
CGI
1. root]# vi /etc/httpd/conf/httpd.conf
<IfModule mod_cgid.c>
#
# Additional . . .
Scriptsock run/httpd.cgid
</IfModule>
#
# "/var/www/cgi-bin" . . .
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
2. root]# cd /var/www/cgi-bin/
3. cgi-bin]# vi aan
#!/bin/sh
echo Content-type: text/plain
echo
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
#default_privs = nobody
myhostname = mail.ansori.batman.return
mydomain = ansori.batman.return
#myorigin = $myhostname
myorigin = $mydomain
inet_interfaces = all
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
#mynetworks = 192.168.1.158
mynetworks = 192.168.1.0/24, 127.0.0.0/8
#mynetworks =
9. root]# ps -axf
10. root]# service sendmail stop
11. root]# service postfix restart
12. root]# netstat -tanp |grep 25
nb. Di dalam file pop3s, ipop2, ipop3, imap & imaps, ubah disable=no
27. Untuk Mengetahui Apakah Email Kita Telah Terkirim Melalui Terminal
1. root]# vi /etc/squid/squid.conf
#Default:
# cache_mgr root
cache_mgr ansori@lpknf.or.id
#Default:
cache_mem 64 MB
#Default:
cache_effective_user squid
cache_effective_group squid
#Default:
# none
visible_hostname localhost
#Default:
cache_dir ufs /etc/squid/cache 100 16 256
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
http_access deny cara1
http_access deny cara2
http_access deny cara3
http_access deny cara4
http_access deny cara5
http_access allow bebasporno
# Exampe rule allowing access from your local networks. Adapt
# to list your (internal) IP networks from where browsing should
# be allowed
#acl our_networks src 192.168.1.0/24 192.168.2.0/24
#http_access allow our_networks
7. root]# squid -z
8. root]# service squid restart
9. Tampilan Ketika Web Yang Kita Block Di Buka
root]# vi /etc/squid/errors/ERR_ACCESS_DENIED
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-
1">
<TITLE>ERROR: The requeste URL could not be retrieved</TITLE>
<STYLE type="text/css">
</HEAD><BODY>
<H1>MAMNUAK</H1>
<H2>ANDA MENGAKSES SITUS TERLARANG</H2>
<HR noshade size="5px">
<P>
While trying to retrieve the URL:
<A HREF="%U">%U
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
AWAS AJING GILA
</STRONG>
<P>
Access control configuration prevents your request from
being allowed at this time. Please contact your service provider if
you feel this is incorrect.
</UL>
<P>ANSORY <A HREF="mailto:%w">%w.
//untuk memforward
<html><head><body>FORWARD</body><script language="javascript">
window.location="http://eramuslim.com"</script>
</head></html>
NB:
Untuk Mengetahui Ip yang Memakai Akses-akses yang terlah di block:
root]# tail /var/log/squid/acces.log