Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.8)

DHCP (Dynamic Configuration Protocol) adalah layanan yang secara otomatis memberikan nomor IP kepada komputer yang memintanya. Komputer yang memberikan nomor IP disebut sebagai DHCP server, sedangkan komputer yang meminta nomor IP disebut sebagai DHCP Client. Dengan demikian administrator tidak perlu lagi harus memberikan nomor IP secara manual pada saat konfigurasi TCP/IP, tapi cukup dengan memberikan referensi kepada DHCP Server.

Pada saat kedua DHCP client dihidupkan , maka komputer tersebut melakukan request ke DHCP-Server untuk mendapatkan nomor IP. DHCP menjawab dengan memberikan nomor IP yang ada di database DHCP. DHCP Server setelah memberikan nomor IP, maka server meminjamkan (lease) nomor IP yang ada ke DHCP-Client dan mencoret nomor IP tersebut dari daftar pool. Nomor IP diberikan bersama dengan subnet mask dan default gateway. Jika tidak ada lagi nomor IP yang dapat diberikan, maka client tidak dapat menginisialisasi TCP/IP, dengan sendirinya tidak dapat tersambung pada jaringan tersebut.

Setelah periode waktu tertentu, maka pemakaian DHCP Client tersebut dinyatakan selesai dan client tidak memperbaharui permintaan kembali, maka nomor IP tersebut dikembalikan kepada DHCP Server, dan server dapat memberikan nomor IP tersebut kepada Client yang membutuhkan. Lama periode ini dapat ditentukan dalam menit, jam, bulan atau selamanya. Jangka waktu disebut leased period.

NAT kependekan dari (Network Address Translation), berfungsi untuk menerjemahkan atau mentranslasikan IP address Private ke IP address Public. Kenapa harus di translasikan ke IP Public? Kita tahu, ada dua jenis IP address yaitu IP Private dan IP Public. IP yang di kenal oleh
internet atau yang bisa berinternet adalah IP Public. Kalo hanya ada satu IP Public tapi ada banyak PC yang ingin terkoneksi internet, bagaimana solusinya? Maka dari itu NAT dibutuhkan.

Setting DHCP Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Buat dan setting file dhcpd.conf
#vi /etc/dhcpd.conf
ddns-update-style ad-hoc;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name "suspensi.net";
option domain-name-servers 192.168.1.1;
range dynamic-bootp 192.168.1.70 192.168.1.77;
default-lease-time 21600;
max-lease-time 43200;
option broadcast-address 192.168.1.255;
}
2. Restart service dhcp
#service dhcpd restart
3. Buat agar service dhcp dapat dijalankan saat pertama booting
#chkconfig dhcpd on

Setting NAT Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. #iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
2. #iptables -t nat –L
3. #echo 1 > /proc/sys/net/ipv4/ip_forward
4. simpan ip tables
#service iptables save
5. Jalankan service iptables:
#service iptables start

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.7)

Mail server digunakan untuk mentransfer e-mail pada jaringan TCP / IP atau bisa juga disebut sebagai Perangkat lunak program yang mendistribusikan file atau informasi sebagai respons atas permintaan yang dikirim via email, juga digunakan pada bitnet untuk menyediakan layanan serupa FTP.Mail server merupakan perangkat terpenting dalam pembuatan webmail yang menjadi tempat dari database mail dalam jaringan untuk melakukan resource sharing, dan dapat dimanfaatkan untuk memfasilitasi Perusahaan dalam pembuatan webmail. Dari banyaknya kemajuan teknologi informasi dan komunikasi email merupakan sarana yang cukup bermanfaat di kalangan masyasrakat di seluruh dunia, dengan email kita dapat melakukan interaksi dan pertukaran informasi satu sama lainnya. Disamping itu kita juga memerlukan mail server yang dapat kita istilahkan sebagai kantor pos yang mengatur proses pengiriman dan penerimaan pesan juga penyimpanan pesan yang menggunakan sistem basis data.

Setting Mail Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file main.cf
#vi /etc/postfix/main.cf
Tambahkan baris:
soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
default_privs = nobody
mydomain = suspensi.net
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, $mydomain
mynetworks_style = class
mynetworks = 192.168.1.0/24, 127.0.0.0/8
relay_domain = $mydestination

2. Setting file imap
#vi /etc/xinetd.d/imap
# default: off
# description: The IMAP service allows remote users to access their mail using \
# an IMAP client such as Mutt, Pine, fetchmail, or Netscape \
# Communicator.
service imap
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/imapd
log_on_success += HOST DURATION
log_on_failure += HOST
disable = no
}

3. Setting file ipop3
#vi /etc/xinetd.d/ipop3
# default: off
# description: The POP3 service allows remote users to access their mail \
# using an POP3 client such as Netscape Communicator, mutt, \
# or fetchmail.
service pop3
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += HOST DURATION
log_on_failure += HOST
disable = no
}

4. Restart service xinetd dan postfix
#service xinetd restart
#service postfix restart

Setting Web Mail Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Jalankan file conf.pl
#cd /usr/share/squirrelmail/config
#./conf.pl
Pilih menu 2 (server setting)
Ubah konfigurasi:
SquirrelMail Configuration : Read: config.php (1.2.0)
---------------------------------------------------------
Server Settings
1. Domain : suspensi.net
2. IMAP Server : suspensi.net
3. IMAP Port : 143
4. Use Sendmail/SMTP : SMTP
6. SMTP Server : suspensi.net
7. SMTP Port : 25
8. Authenticated SMTP : false
9. POP Before SMTP : false
10. Server : cyrus
11. Invert Time : false
12. Delimiter : detect

2. Matikan sendmail
#killall sendmail

3. Restart service xinetd dan postfix
#service xinetd restart
#service postfix restart

4. Cek dari client




Login ke SquirrelMail




Tampilan SquirellMail

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.6)

Proxy Server bertindak sebagai gateway terhadap dunia Internet untuk setiap komputer klien. Proxy server tidak terlihat oleh komputer klien : seorang pengguna yang berinteraksi dengan Internet melalui sebuah proxy server tidak akan mengetahui bahwa sebuah proxy server sedang menangani request yang dilakukannya. Web server yang menerima request dari proxy server akan menginterpretasikan request-request tersebut seolah-olah request itu datang secara langsung dari komputer klien, bukan dari proxy server.

Proxy server juga dapat digunakan untuk mengamankan jaringan pribadi yang dihubungkan ke sebuah jaringan publik (seperti halnya Internet). Proxy server memiliki lebih banyak fungsi daripada router yang memiliki fitur packet filtering karena memang proxy server beroperasi pada level yang lebih tinggi dan memiliki kontrol yang lebih menyeluruh terhadap akses jaringan. Proxy server yang berfungsi sebagai sebuah "agen keamanan" untuk sebuah jaringan pribadi, umumnya dikenal sebagai firewall.

Setting Proxy Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file squid.conf
#vi /etc/squid/squid.conf
Tambahkan baris berikut:
http_port 3128
icp_port 3130
udp_incoming_address 0.0.0.0
udp_outgoing_address 255.255.255.255
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 1024 KB
minimum_object_size 0 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/run/squid.pid
debug_options ALL,1
client_netmask 255.255.255.0
dns_nameservers 219.124.30.219
diskd_program /usr/lib/squid/diskd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
client_lifetime 1 day
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl network src 192.168.0.0/255.255.255.0
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl blok dstdomain “/etc/squid/blok.txt” #blocking website
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access deny blok
http_access allow localhost
http_access allow network
http_access allow all
http_reply_access allow all
http_reply_access allow network
icp_access allow all
cache_effective_user squid
cache_effective_group squid
visible_hostname suspensi.net
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_single_host on
httpd_accel_uses_host_header on
logfile_rotate 10
forwarded_for on
coredump_dir /var/spool/squid

2. Jalankan proxy dan restart service squid
#squid –z
#service squid restart

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.5)

File Transfer Protocol (FTP) adalah suatu protokol yang berfungsi untuk tukar-menukar file dalam suatu network yang menggunakan TCP koneksi bukan UDP. Dua hal yang penting dalam FTP adalah FTP Server dan FTP Client.

FTP server adalah suatu server yang menjalankan software yang berfungsi untuk memberikan layanan tukar menukar file dimana server tersebut selalu siap memberikan layanan FTP apabila mendapat permintaan (request) dari FTP client.

FTP client adalah computer yang merequest koneksi ke FTP server untuk tujuan tukar menukar file. Setelah terhubung dengan FTP server, maka client dapat men-download, meng-upload, merename, men-delete, dll sesuai dengan permission yang diberikan oleh FTP server.

FTP sebenarnya cara yang tidak aman dalam mentransfer suatu file karena file dikirimkan tanpa di-enkripsi terlebih dahulu tetapi melalui clear text. Mode text yang dipakai untuk transfer data adalah format ASCII atau format binary. Secara default, FTP menggunakan mode ASCII dalam transfer data. Karena pengirimannya tanpa enkripsi, username, password, data yang di transfer, maupun perintah yang dikirim dapat di sniffing oleh orang dengan menggunakan protocol analyzer (sniffer). Solusi yang digunakan adalah dengan menggunakan SFTP (SSH FTP) yaitu FTP yang berbasis pada SSH atau menggunakan FTPS (FTP over SSL) sehingga data yang dikirim terlebih dahulu di enkripsi.

Setting FTP Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file vsftpd.conf
#vi /etc/vsftpd/vsftpd.conf
Tambahkan baris berikut:
anonymous_enable = NO
local_enable = YES
write_enable = YES
local_umask = 022
dirmessage_enable = YES
xferlog_enable = YES
connect_from_port_20 = YES
xferlog_std_format = YES
pam_service_name = vsftpd
userlist_enable = YES
listen = YES
tcp_wrappers = YES

2. Restart service vsftpd
#restart service vsftpd

3. Cek dari client




FTP Site Manager




Cek server FTP dari client

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.4)

Pada dasarnya Samba diciptakan untuk menjembatani protokol yang berbeda antara Linux dengan Windows ketika membangun sebuah jaringan. Kebanyakan sistem operasi berbasis UNIX, termasuk Linux, menggunakan protokol TCP/IP dalam membangun jaringan. Windows sendiri juga mendukung penggunaan protokol TCP/IP. Namun dalam membangun jaringan sesama Windows untuk keperluan sharing data atau printer, Windows menggunakan protokol lain yang disebut Server Message Block atau disingkat SMB.

Protokol SMB menggunakan antarmuka jaringan yang disebut dengan Network Basic Input Output System (NetBIOS). NetBIOS memungkinkan pengguna Windows untuk mengakses media penyimpanan atau printer pada komputer lain seolah-olah perangkat tersebut ada pada komputernya sendiri.

Setting Samba Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file smb.conf
#vi /etc/samba/smb.conf
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = SUSPENSI

# server string is the equivalent of the NT Description field
server string = Samba Server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 192.168.1. 127.

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user

# Use password server option only with security = server
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
; password server =


# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
password level = 8
username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

# The following is needed to keep smbclient from spouting spurious errors
# when Samba is built with support for SSL.
; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt

# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.

pam password change = yes

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /etc/samba/smb.conf.%m

# This parameter will control whether or not Samba should obey PAM's
# account and session management directives. The default behavior is
# to use PAM for clear text authentication only and to ignore any
# account or session management. Note that Samba always ignores PAM
# for authentication in the case of encrypt passwords = yes

obey pam restrictions = yes

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
interfaces = 192.168.0.1/24 219.124.30.219/29

# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
; remote announce = 192.168.1.255 192.168.2.44
# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
local master = yes
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
os level = 33
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
domain master = yes
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes
# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat
# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
# dns proxy = no
# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# If you want users samba doesn't recognize to be mapped to a guest user
; map to guest = bad user
# Un-comment the following and create the netlogon directory for Domain Logons
[netlogon]
comment = Network Logon Service
path = /usr/local/samba/lib/netlogon
guest ok = yes
writable = no
share modes = no
# the default is to use the user's home directory
[Suspensi]
path = /home/user1/
browseable = yes
writeable = yes
readonly = no
public = yes

2. Restart service smb
#service smb restart

3. Cek dari client




Login ke server samba




Cek server samba dari client

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.3)

Web Server adalah sebuah perangkat lunak server yang berfungsi menerima permintaan HTTP atau HTTPS dari klien yang dikenal dengan web browser dan mengirimkan kembali hasilnya dalam bentuk halaman-halaman web yang umumnya berbentuk dokumen HTML.

Salah satu server web yang terkenal di linux adalah Apache. Apache merupakan server web antar platform yang dapat berjalan di beberapa platform seperti linux dan windows. Web Server juga merupakan sebuah komputer yang menyediakan layanan untuk internet. Server disebut juga dengan host. Agar anda dapat memasukkan web yang anda rancang ke dalam internet, maka anda harus memiliki ruangan terlebih dahulu dalam internet, dan ruangan ini disediakan oleh server.

Cara kerja web server :
  1. Web server merupakan mesin dimana tempat aplikasi atau software beroperasi dalam medistribusikan web page ke user, tentu saja sesuai dengan permintaan user.
  2. Hubungan antara Web Server dan Browser Internet merupakan gabungan atau jaringan Komputer yg ada di seluruh dunia. Setelah terhubung secara fisik, Protocol TCP/IP (networking protocol) yg memungkinkan semua komputer dapat berkomunikasi satu dengan yg lainnya. Pada saat browser meminta data web page ke server maka instruksi permintaan data oleh browser tersebut di kemas di dalam TCP yg merupakan protocol transport dan dikirim ke alamat yg dalam hal ini merupakan protocol berikutnya yaitu Hyper Text Transfer Protocol (HTTP). HTTP ini merupakan protocol yg digunakan dalam World Wide Web (WWW) antar komputer yg terhubung dalam jaringan di dunia ini. Untuk mengenal protocol ini jelas sangan mudah sekali dimana setiap kali anda mengetik http://… anda telah menggunakannya, dan membawa anda ke dunia internet. Data yg di passing dari browser ke Web server disebut sebagai HTTP request yg meminta web page dan kemudian web server akan mencari data HTML yg ada dan di kemas dalam TCP protocol dan di kirim kembali ke browser. Data yg dikirim dari server ke browser disebut sebagai HTTP response. Jika data yg diminta oleh browser tidak ditemukan oleh si Web server maka akan meninbulkan error yg sering anda lihat di web page yaitu Error : 404 Page Not Found.
Setting Web Server
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file httpd.conf
#vi /etc/httpd/conf/httpd.conf
Tambahkan konfigurasi berikut pada akhir baris:
NameVirtualHost 219.124.30.219

ServerAdmin root@suspensi.net
DocumentRoot /home/admin
ServerName www.suspensi.net

ServerAdmin root@suspensi.net
DocumentRoot /usr/share/squirrelmail/
ServerName mail.suspensi.net

2. Membuat user:
#adduser admin
#passwd admin
Masukkan password: admin

3. Memberikan hak akses user:
#chmod 755 /home/admin

4. Restart service httpd
#service httpd restart

5. Restart service vsftpd
#service vsftpd restart

6. Cek dari client




Cek space www dari client




Cek space sub domain user1 dari client




Cek space sub domain user2 dari client

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.2)

Domain Name System (DNS) adalah distribute database system yang digunakan untuk pencarian nama komputer (name resolution) di jaringan yang mengunakan TCP/IP (Transmission Control Protocol/Internet Protocol). DNS biasa digunakan pada aplikasi yang terhubung ke Internet seperti web browser atau e-mail, dimana DNS membantu memetakan host name sebuah komputer ke IP address. Selain digunakan di Internet, DNS juga dapat di implementasikan ke private network atau intranet.

Fungsi dari DNS adalah menerjemahkan nama komputer ke IP address (memetakan). Client DNS disebut dengan resolvers dan DNS server disebut dengan name servers. Resolvers atau client mengirimkan permintaan ke name server berupa queries. Name server akan memproses dengan cara mencek ke local database DNS, menghubungi name server lainnya atau akan mengirimkan message failure jika ternyata permintaan dari client tidak ditemukan. Proses tersebut disebut dengan Forward Lookup Query, yaitu permintaan dari client dengan cara memetakan nama komputer (host) ke IP address.

Cara kerja DNS :
a) Resolvers mengirimkan queries ke name server
b) Name server mencek ke local database, atau menghubungi name server lainnya, jika ditemukan akan diberitahukan ke resolvers jika tidak akan mengirimkan failure message
c) Resolvers menghubungi host yang dituju dengan menggunakan IP address yang diberikan name server

Setting DNS Server :
Adapun langkah – langkahnya adalah sebagai berikut :
1. Setting file named.conf
#vi /etc/named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
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 "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "suspensi.net" IN {
type master;
file "suspensi.zone";
allow-update { none; };
};

zone "30.124.219.in-addr.arpa" IN {
type master;
file "suspensi.local";
allow-update { none; };
};

include "/etc/rndc.key";

2. Copy-kan file localhost.zone menjadi file suspensi.zone
#cd /var/named/
#cp localhost.zone suspensi.zone

3. Copy-kan file named.local menjadi file suspensi.local
#cd /var/named/
#cp named.local suspensi.local

4. Setting file suspensi.zone
#vi /var/named/suspensi.zone
$TTL 86400
$ORIGIN suspensi.net.
@ 1D IN SOA suspensi.net. root.suspensi.net. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

1D IN NS suspensi.net.
1D IN A 219.124.30.219
www IN A 219.124.30.219
ftp IN A 219.124.30.219
mail IN A 219.124.30.219

5. Setting file suspensi.local
#vi /var/named/suspensi.local
$TTL 86400
@ IN SOA suspensi.net. root.suspensi.net. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS suspensi.net.

219 IN PTR suspensi.net.
219 IN PTR www.suspensi.net.
219 IN PTR ftp.suspensi.net.

6. Setting file hosts
#vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
219.124.30.219 suspensi.net server

7. Setting file resolv.conf
#vi /etc/resolv.conf
nameserver 219.124.30.219
nameserver 202.134.1.10
nameserver 202.134.0.155
search suspensi.net
domain suspensi.net

8. Restart service namcd
#service named restart

9. Cek DNS
#nslookup –sil
> suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53

Name: suspensi.net
Address: 219.124.30.219
> www.suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53

Name: www.suspensi.net
Address: 219.124.30.219
> ftp.suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53

Name: ftp.suspensi.net
Address: 219.124.30.219

> mail.suspensi.net
Server: 219.124.30.219
Address: 219.124.30.219#53

Name: mail.suspensi.net
Address: 219.124.30.219

Read More..

Konfigurasi Server menggunakan Linux Red Hat 9.0 (bag.1)

Terima kasih buat teman-teman yang sudah meluangkan waktunya buat sekedar membaca blog saya ini. Di thread pertama, saya akan membagi ilmu tentang meng-konfigurasi server menggunakan sistem operasi Linux Red Hat 9.0. Sebenarnya dalam hal konfigurasi server menggunakan berbagai macam jenis Linux, mayoritas cara settingnya hampir sama, hanya terdapat sedikit perbedaan yang tidak terlalu signifikan.

Dalam mempraktekkan konfigurasi server ini, yang dibutuhkan 2 buah komputer yang terhubung dalam suatu jaringan, salah satu sebagai server dan yang lain adalah client.
Konfigurasi server ini saya bagi menjadi 8 bagian :
1. Konfigurasi NIC
2. Konfigurasi DNS Server
3. Konfigurasi Web Server
4. Konfigurasi Samba Server
5. Konfigurasi FTP Server
6. Konfigurasi Proxy Server
7. Konfigurasi Mail Server dan Web Mail Server
8. Konfigurasi DHCP Server dan NAT Server

Dalam suatu jaringan komputer terdapat komputer-komputer yang saling berhubungan, server sebagai pusatnya dan client sebagai user / klien. Agar sebuah komputer dapat dijadikan sebuah mesin server maka perlu melakukan konfigurasi. Pertama NIC yang dimiliki oleh client harus dikonfigurasi. Hal ini dilakukan agar mesin server ini dapat melakukan koneksi dengan client-nya.

Untuk dapat melakukan konfigurasi terhadap mesin server ini harus melakukan login sebagai root. Setelah login menjadi root, bila dalam mesin server ini mempunyai lebih dari satu NIC, maka mesin ini akan mempunyai beberapa file ifcfg-eth, masing-masing memiliki nomor yang berbeda pada akhir nama file. Karena setiap peralatan memiliki file konfigurasi masing-masing.
Untuk mengedit sebuah file, dalam hal ini digunakan program editor vi, yaitu dengan mengetikkan perintah tersebut pada terminal (seperti Command Prompt pada Windows), dengan perintah :

vi /direktori_file_berada/nama_file

Berikut ini adalah konfigurasi file ifcfg-eth0 yang terletak pada direktori /etc/sysconfig/network-scripts/ dan edit isi dari file tersebut menjadi :

DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 219.124.30.219
NETMASK = 255.255.255.248

Berikut ini adalah konfigurasi file ifcfg-eth1 yang terletak pada direktori /etc/sysconfig/network-scripts/ dan edit isi dari file tersebut menjadi :

DEVICE = eth1
ONBOOT = yes
BOOTPROTO = static
IPADDR = 192.168.1.1
NETMASK = 255.255.255.0

Konfigurasi file di atas menunjukkan bahwa mesin server ini mempunyai IP address 219.124.30.219 dengan subnet mask 255.255.255.248 dan IP address 192.168.1.1 dengan subnet mask 255.255.255.0, karena nilai ONBOOT = yes, maka konfigurasi file akan diaktifkan pada saat mesin Linux ini melakukan boot.

Berikut ini adalah konfigurasi gateway yang terletak pada direktori /etc/sysconfig/network dan edit isi dari file tersebut menjadi :
NETWORKING=yes
HOSTNAME=Server
GATEWAY=222.124.30.217

Setelah mengkonfigrasi file tersebut mengkonfigurasi file /etc/hosts

127.0.0.1 localhost.localdomain localhost
219.124.30.219 suspensi.net server

Konfigurasi file /etc/hosts mendaftarkan semua host name dan IP address mesin server yang digunakan. Jika IP address dan nama server tersebut dihilangkan, koneksi masih tetap bisa berjalan. Sedangkan nama server tersebut untuk memudahkan saat koneksi berdasarkan nama yang dibuat, sehingga sistem operasi akan melakukan penerjemahan host name ke IP address kemudian membangun koneksi dengan IP address yang diperoleh.
Setelah semua file telah terkonfigurasi kemudian me-restart service network-nya agar konfigurasi tersebut dapat berjalan seperti yang diingnkan, dengan cara mengetikkan :

service network restart

Setelah merestart konfigurasi tersebut, lakukan pengecekkan pada komputer tersebut dengan perintah :

ping –c3 219.124.30.219

nb : ip dan nama domain yang digunakan hanya sebuah contoh saja.

Read More..