Menilik Kesiapan PON 2012 di Riau

Posted in Uncategorized | Leave a comment

* FTP SERVER *

Build FTP server to transfer files. Install and configure vsftpd for it.

[1] Install vsftpd
www:~#
aptitude -y install vsftpd

Reading package lists… Done
Building dependency tree… Done
Reading extended state information
Initializing package states… Done
Reading task descriptions… Done
Building tag database… Done
The following NEW packages will be installed:
vsftpd
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 114kB of archives. After unpacking 418kB will be used.
Writing extended state information… Done
Get:1 http://ftp.jp.debian.org etch/main vsftpd 2.0.5-2 [114kB]
Fetched 114kB in 0s (149kB/s)
Selecting previously deselected package vsftpd.
(Reading database … 20870 files and directories currently installed.)
Unpacking vsftpd (from …/vsftpd_2.0.5-2_i386.deb) …
Setting up vsftpd (2.0.5-2) …
Adding system user `ftp’ (UID 105) …
Adding new user `ftp’ (UID 105) with group `nogroup’ …
Not creating home directory `/home/ftp’.
Starting FTP server: vsftpd.

www:~#
vi /etc/vsftpd.conf

anonymous_enable=
NO
// line 23: No anonymous

local_enable=YES
// line 26: make valid

write_enable=YES
// line 29: make valid

ascii_upload_enable=YES
// line 90,91: make valid

ascii_download_enable=YES
(permit ascii mode)

chroot_local_user=YES
// line 105: make valid(enable chroot)

chroot_list_enable=YES
// line 110: make valid(enable chroot list)

chroot_list_file=/etc/vsftpd.chroot_list
// line 112: make valid(chroot list file)

ls_recurse_enable=YES
// line 118: make valid

local_root=public_html
// bottom: specify user’s /

use_localtime=YES
// use local time

www:~#
vi /etc/vsftpd.chroot_list

debian
// add user you permit to move to above

www:~#
/etc/init.d/vsftpd restart

Restarting FTP server: vsftpd.

Posted in Tugas'na Pak Rokib | Leave a comment

‘ WEB SERVER ‘

[1] Install Apache2, and in addition to it, Install PHP too.
www:~#

aptitude -y install apache2 php5 libapache2-mod-php5 php5-common php-pear

www:~#

ln -s /usr/bin/perl /usr/local/bin/perl
[2] Configuration Apache2
www:~#

vi /etc/apache2/apache2.conf

ServerTokens

Prod
// line 214: change

ServerSignature

Off
// line 224: change

AddHandler cgi-script .cgi

.pl
// line 512: add type for CGI
DirectoryIndex index.html index.cgi index.php

// bottom: add file type

www:~#

a2dissite default

Site default disabled; run /etc/init.d/apache2 reload to fully disable.
www:~#

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/debian

www:~#

vi /etc/apache2/sites-available/debian

ServerAdmin

webmaster@server-linux.info
// line 3: change address

DocumentRoot

/var/www/html/
// line 5: change document root

<Directory

/var/www/html/

>

// line 10: change

Options

FollowSymLinks ExecCGI
// line 11: change

AllowOverride

All
// line 12: change
#

RedirectMatch ^/$ /apache2-default/

// line 17: make it comment

ServerSignature

Off
// line 35: change

www:~#

mkdir /var/www/html

www:~#

a2ensite debian

Site debian installed; run /etc/init.d/apache2 reload to enable.
www:~#

/etc/init.d/apache2 restart

Forcing reload of web server (apache2)….

[3] Make HTML test page and make sure apache is working normally. It’s OK if following screen is shown.
www:~#

vi /var/www/html/index.html
<html>
<body>
<div style=”width:100%;font-size:40px;font-weight:bold;text-align:center”>
Test Page
</div>
</body>
</html>

[4] Make CGI test page and make sure apache is working normally. It’s OK if following screen is shown.
www:~#

vi /var/www/html/index.cgi
#!/usr/local/bin/perl
print “Content-type: text/html\n\n”;
print <<“EOM”;
<html>
<body>
<div style=”width:100%;font-size:40px;font-weight:bold;text-align:center”>
CGI Test Page
</div>
</body>
</html>
EOM
exit;

www:~#

chmod 705 /var/www/html/index.cgi

[5] Make PHP test page and make sure apache is working normally. It’s OK if following screen is shown.
www:~#

vi /var/www/html/index.php
<html>
<body>
<div style=”width:100%;font-size:40px;font-weight:bold;text-align:center”>
<?php

print Date(“Y/m/d”);

?>
</div>
</body>
</html>

Posted in Uncategorized | Leave a comment

SETTING INTERFACES

[1] Change network settings because networking is set for DHCP now as the default setting.
ns:~#

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0

#

iface eth0 inet dhcp

// make it comment
// add these lines
iface eth0 inet static
address 192.168.0.17

// IP address

network 192.168.0.0

// network address

netmask 255.255.255.0

// subnet mask

broadcast 192.168.0.255

// broadcast address

gateway 192.168.0.1

// default gateway

auto eth0

ns:~#

/etc/init.d/networking restart

Reconfiguring network interfaces…done.

Posted in Uncategorized | Leave a comment

‘ SQUID SERVER ‘

Build proxy server and make web browzing fast. Install squid for it.
[1] Install and configure squid
lan:~#

aptitude -y install squid

Reading package lists… Done
Building dependency tree… Done
Reading extended state information
Initializing package states… Done
Reading task descriptions… Done
Building tag database… Done
The following NEW packages will be automatically installed:
squid-common
The following NEW packages will be installed:
squid squid-common
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1093kB of archives. After unpacking 6607kB will be used.
Writing extended state information… Done
Get:1 http://ftp.jp.debian.org etch/main squid-common 2.6.5-6 [438kB]
Get:2 http://ftp.jp.debian.org etch/main squid 2.6.5-6 [654kB]
Fetched 1093kB in 1s (695kB/s)
Preconfiguring packages …
Selecting previously deselected package squid-common.
(Reading database … 21856 files and directories currently installed.)
Unpacking squid-common (from …/squid-common_2.6.5-6_all.deb) …
Selecting previously deselected package squid.
Unpacking squid (from …/squid_2.6.5-6_i386.deb) …
Setting up squid-common (2.6.5-6) …
Setting up squid (2.6.5-6) …
Creating squid spool directory structure
2007/07/15 02:28:12| Creating Swap Directories
Restarting Squid HTTP proxy: squid.

lan:~#

vi /etc/squid/squid.conf

http_port

8080
// line 73: change

acl CONNECT method CONNECT

acl lan src 192.168.0.0/255.255.255.0
// line 2449: add (permit only LAN)
http_access allow lan
// line 2551: add (permit only LAN)

http_access deny all

// line 2552: make valid
visible_hostname lan.server-linux.info
// line 2885: add (specify hostname)

# forwarded_for on

forwarded_for off
// line 3162: add (hide IP address)
header_access Referer deny all

// line 3482: add

header_access X-Forwarded-For deny all
header_access Via deny all
header_access Cache-Control deny all

lan:~#

/etc/init.d/squid restart

Restarting Squid HTTP proxy: squid.

Posted in Uncategorized | Leave a comment

” DNS SERVER “

Pertama kali yang harus kita lakukan adalah menginstall BIND9 dulu, caranya : Ketik apt-get install bind9

Setelah instalasi kita masuk ke directory etc (cd etc/bind). Pada dir bind kita melakukan konfigurasi, yang kita edit adalah file named.conf. Kita hanya menambahkan perintah pada line yang bercetak tebal saja, seperti dibawah ini :

/ / This Lo 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.option”;

/ / 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 “localhost” {
type master;
file “/etc/bind/db.local”;
};

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

zone “tkj.com.” { => Nama Server
type master;
file “/var/cache/bind/db.debian”; File disimpan
};

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

zone “0.in-addr.arpa” {
type master;
file “/etc/bind/db.0”;
};

zone “255.in-addr.arpa” {
type master;
file “/etc/bind/db.255”;
};

/ / zone “com” { type delegation-only; };
/ / zone “net” { type delegation-only; };

/ / From the release notes:
/ / Because use many of our users are uncomfortable receiving undelegated

/ / from root or top level domains, other than a few for whom that
behavion
/ / has been trusted and expected _____ name length of time, we have
now
/ / introduced the “root-delegations-only” feature which applies
delegation-only
/ / Logic to all top level domains, and to the root domain. An
exception list
/ / should be specified, including “MUSEUM” and “DE”, and any other top
level
/ / domains from whom undelegated responses are expected and trusted.
/ / root-delegatin-only exclude { “DE”; “MUSEUM”; };

include “/etc/bind/named.conf.local”;

Setelah selesai edit dan menambahkan file kemudian save filenya.
Copy file db.127 dan db.local pada directory yang sama dan kita pindahkan pada directory /var/cache/bind dengan cara cp nama file yang dicopy/tempat directory yg nantinya akan ditempati lalu nama penggantinya misal [cp db.local/var/cache/bind/db.debian], kemudian kita ganti namanya menjadi :
Db.127 menjadi db.192
Db.local menjadi db.debian

Sekarang kita edit file db.192 menjadi :

$TTL 604800 @ IN SOA tkj.com. root.tkj.com.
1 ; serial
604800 ; refresh
86400 ; retry
2419200 ; expire
604800 ; negative cache TTL

:
@ IN NS tkj.com.
1.1.168 IN PTR tkj.com.
www IN PTR tkj.com.

Pada file db.debian kita juga edit filenya :

$TTL 604800 @ IN SOA tkj.com. root.tkj.com.
2 ; serial
604800 ; refresh
86400 ; retry
2419200 ; expire
604800 ; negative cache TTL

:
@ IN NS tkj.com.
@ IN A 192.168.1.1
www IN A 192.168.1.1

Setelah mengedit kedua file tadi. Yang harus kita lakukan selanjutnya adalah restart bind9 dengan menggunakan perintah : /etc/init.d/bind9 restart
Pastikan tidak ada kata failed ya, kalo ada berarti kemungkinan ada file yang keliru waktu mengedit.

Untuk pengecekan, kita ping, dengan cara mengetik : ping http://www.tkj.com
Jika ada jawaban reply maka DNS server berhasil.

sELaMat MeNcOba………..

Posted in Uncategorized | Leave a comment

” DHCP SERVER “

Pertama kali yang harus kita lakukan adalah menginstall dhcp3-server dulu dengan cara : Ketik apt-get install dhcp3-server

Setelah instalasi kita masuk pada dir etc dan edit file dhcpd.conf, seperti dibawah ini :
• Ketik kan cd /etc/dhcp-3 [enter] ;
• Lalu masuk pada configurasi yaitu pico dhcpd.conf [enter] ;
• Setelah itu mulai lah edit configurasi yg seperti dibawah ini :

#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-update-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-updated-style none;

# option definitions common to all supported network . . .
#option domain-name “example.org”;
#option domain-name-servers nsl.example.org, ns2.example.org;

#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 message 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.254 {
# 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 client 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.139.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.25.0 netmask 255.255.255.0 {
range 192.168.25.2 192.169.25.10;
option domain-name-servers http://www.debian.com;
# option domain-name “internal.example.org”;
option routers 192.168.25.1;
option broadcast-address 192.168.25.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.fufue.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
# BOOT or DHCP. Host 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.ufue.com;
#}

# You can ceclare 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.244/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;
# }
• Perlu anda perhatikan yang di edit adalah perintah yang bergaris bawah saja ;
• Kemudian save file yang sudah kita edit.

• Terus kita restart dengan cara mengetikkan : /etc/initd/dhcp3-server restart;

Untuk pengecekan, pada client windows pertama kita harus mengubah pengelamatan IP secara Automatically. Setelah itu kita ping pada alamat server kita yaitu 192.168.1.1. Jika ada jawaban dan tidak muncul failed maka dhcp server berhasil.

sELaMaT mEncObA ……..

Posted in Uncategorized | Leave a comment