Kamis, 22 November 2012

Memasang IP Virtual

1. Memasang IP Virtual

#nano /etc/network/interfaces
Code:
auto eth0:1
iface eth0:1 inet static
    address 192.168.1.1
    netmask 255.255.255.240
    network 192.168.1.0
    broadcast 192.168.1.15
auto eth0:2
iface eth0:2 inet static
    address 192.168.1.2
    netmask 255.255.255.240
    network 192.168.1.0
    broadcast 192.168.1.15

Code:
#ifconfig eth0 down ( untuk mematikan NIC sementara )
#ifconfig eth0 up ( untuk menghidupkan NIC )
#/etc/init.d/networking restart ( untuk menrestart network )
#/etc/init.d/networking start ( untuk menjalankan network )


PENJELASAN :
eth0:1 adalah virtual ip satu dalam eth0
eth0:2 adalah virtual ip dua dalam eth0

2. Setting DNS Virtual

Tidak lupa terlebih dahulu kita installasi paket yang dibutuhkan!
apt-get install bind9 ( menginstall paket bind yaitu paket yang kita butuhkan untuk mengkonfigurasi dns)

#nano /etc/bind/named.conf
Code:
#nano /etc/bind/named.conf

    zone "1.168.192.in-addr.arpa" {
        type om ;
        file "db.10;
    };
   
    zone "shadow.sch.id" {
        type om ;
        file "db.Shadow;
    };



#cd /etc/bind
#touch db.Shadow
#nano db.Shadow
Code:
$TTL 86400
@    IN    SOA    wahyu.cyberwahyu.sch.id root.localhost (
            4; serial
            1w; refresh
            3h; retry
            3w; expire
            1w; ttl
            )
    IN    NS    192.168.1.1.
wahyuIN    A    192.168.1.1
wahyuIN    A    192.168.1.2
www    IN    CNAME    Shadow
tkj    IN    CNAME    Shadow


#touch db.192
#nano db.192
Quote:
$TTL 86400
@ IN SOA shadow.dancer.sch.id root.localhost (
4; serial
1w; refresh
3h; retry
3w; expire
1w; ttl
)
@ IN NS 192.168.1.1.
1 IN PTR Shadow.dancer.sch.id.
2 IN PTR Shadow.dancer.sch.id.


#nano /etc/resolv.conf
Code:
nameserver 192.168.1.1
nameserver 192.168.1.2


terakhir test DNS nya ... klo reply berarti DNS jadi

Tidak ada komentar:

Posting Komentar