Rabu, 19 Oktober 2011

praktek LINUX


Tutorial   



~# Sudo -i
~#pasword
~#ifconfig


TCP IP
~# gedit /etc/network/interfaces


auto eth0
iface eth0 inet static
      address 192.168.1.7
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1
      dns-nameservers 192.168.1.1


auto eth1
iface eth1 inet static
      address 192.168.2.1
      netmask 255.255.255.0
      network 192.168.2.0
      broadcast 192.168.2.255
#     dns-nameservers 192.168.2.

è ~#/etc/init.d/networking restart
DHCP
~# gedit /etc/dhcp3/dhcpd.conf



subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.200;
option domain-name-servers 192.168.2.1,192.168.1.1;
option domain-name "tkjkaleng.com";
option routers 192.168.2.1;
option broadcast-address 192.168.2.255;
ddns-update-style none;
default-lease-time 14400;
max-lease-time 72800;
}






è ~#/etc/init.d/dhcp3 restart
router
gedit /etc/sysctl.conf

Haapus tanda pagar pada file” di bawah :

net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

net.ipv4.ip_forward=1
# stsctl -p
# iptables -t nat -A POSTROUTING -o eth0 -j  MASQUERADE




DNS

cp /etc/bind/db.local /etc/bind/db.server
cp /etc/bind/db.127 /etc/bind/db.254
cp /etc/bind/named.conf.default-zones /etc/bind/named.conf.server

DNS
gedit /etc/bind/db.server

;
; BIND data file for local loopback interface
;
$TTL  604800
@     IN    SOA   tkjkaleng.com. root.tkjkaleng.com. (
                        2           ; Serial
                   604800           ; Refresh
                    86400           ; Retry
                  2419200           ; Expire
                   604800 )   ; Negative Cache TTL
;

@     IN    NS    tkjkaleng.com.
www   IN    A     192.168.2.1
mail  IN    A     192.168.2.1
ftp   IN    A     192.168.2.1

ètruz...

~# gedit /etc/bind/db.254



;
; BIND reverse data file for local loopback interface
;
$TTL  604800
@     IN    SOA   tkjkaleng.com. root.tkjkaleng.com. (
                        1           ; Serial
                   604800           ; Refresh
                    86400           ; Retry
                  2419200           ; Expire
                   604800 )   ; Negative Cache TTL
;
@     IN    NS    tkjkaleng.com.
1     IN    PTR   www.tkjkaleng.com.
1     IN    PTR   ftp.tkjkaleng.com.
1     IN    PTR   mail.tkjkaleng.com.


ètruz...



 gedit /etc/bind/named.conf.server


// 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 "tkjkaleng.com" {
      type master;
      file "/etc/bind/db.server";
};


zone "1.in-addr.arpa" {
      type master;
      file "/etc/bind/db.254";
};


ètruz...

gedit /etc/bind/named.conf

// This is 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.options";
include "/etc/bind/named.conf.local";
#include "/etc/bind/named.conf.default-zones";
include "/etc/bind/named.conf.server";




ètruz...

gedit /etc/resolv.conf

# Generated by NetworkManager
search tkjkaleng.com
nameserver 192.168.2.1

Tidak ada komentar:

Posting Komentar