Tampilkan postingan dengan label server. Tampilkan semua postingan
Tampilkan postingan dengan label server. Tampilkan semua postingan

Selasa, 04 Januari 2011

Setup FTP Server di CentOS

Cek apakah package vsftpd sudah terinstall
rpm –qa | grep vsftpd

Jika belum installah package vsftpd
yum install vsftpd*

Edit file /etc/vsftpd/vsftpd.conf

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).

anonymous_enable=NO  

# Uncomment this to allow local users to log in.

local_enable=YES

# Uncomment this to enable any form of FTP write command.

write_enable=YES

# Default umask for local users is 077. You may wish to change this to 022, 
# if your users expect that (022 is used by most other ftpd's)

Setup DNS Server di CentOS

Buat file baru dengan nama named.conf pada direktori /var/named/chroot/etc

vim /var/named/chroot/etc/named.conf

Isi file tersebut dengan

options {
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    allow-transfer {203.130.196.5/32; 203.130.196.6/32;};
};

controls {
    inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "localhost" IN {
    type master;

Setup IPTABLES untuk Keamanan


Syn-flood protection
Force SYN packet check
iptables –A INPUT –p tcp ! --syn –m state --state NEW –j DROP

Force Fragments packets check
iptables –A INPUT –f –j DROP

XMAS packets

iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP

Drop all NULL packets
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP

Once system is secured, test your firewall with nmap or hping2 command:
# nmap -v -f FIREWALL-IP
# nmap -v -sX FIREWALL-IP
# nmap -v -sN FIREWALL-IP
# hping2 -X FIREWALL-IP

Sabtu, 01 Januari 2011

Setup DHCP Server di CentOS

Sebelum melakukan konfigurasi DHCP server, terlebih dahulu pastikan bahwa paket DHCP servernya sudah terinstall. Untuk mengeceknya dapat dilakukan dengan cara ketik di terminal rpm -qa | grep dhcp









Jika ada maka akan tampil seperti gambar di atas. Selanjutnya buka file konfigurasi dengan cara ketik

Jumat, 31 Desember 2010

Setup Transparent Proxy di CentOS

Tambahkan atau edit file /etc/squid/squid.conf

# Set the maximums size of the object which will be cached
maximum_object_size 8192 KB 

# Set maximum physical RAM to be used for storing objects.
# NOTE: typically squid uses much more RAM then specified so when we said 16 MB then actually it is using around 25 MB RAM.
cache_mem 16 MB


# use to set where to store cache. here it is /cache of size 2048 MB.
# Here 22 and 256 are used to define directory structure so you don't have to touch it.

Setup NAT di CentOS

Dalam jaringan komputer, NAT atau Network Address Translation adalah proses memodifikasi alamat jaringan di header paket datagram (IP) ketika melalui perangkat routing dengan tujuan memetakan satu alamat IP ke alamat IP yang lain.

Untuk men-setup-nya di CentOS adalah dengan cara seperti di bawah ini:


iptables –F
iptables –t nat –F
iptables –X
iptables –t nat –X
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
iptables –A FORWARD –i eth1 –j ACCEPT

Edit file /etc/sysctl.conf
Ubah:
     net.ipv4.ip_forward = 0 menjadi = 1

sysctl –p /etc/sysctl.conf
service iptables save
chkconfig iptables on
service iptables restart

Kamis, 30 Desember 2010

Mengkonfigurasi IP address di CentOS

Untuk mengkonfigurasi alamat IP di CentOS kita dapat menggunakan vim editor atau yang lainnya.

# vim /etc/sysconfig/network-scripts/ifcfg-eth0

Konfigurasi alamat IP statis

DEVICE=eth0
BOOTPROTO=static
HWADDR=(sesuai dengan mac address perangkat)
IPADDR=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=YES

Konfigurasi alamat IP dinamis

DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=(sesuai dengan mac address perangkat)
ONBOOT=yes