Thursday, January 31, 2013

Cara setting DNS di Linux

Cara setting DNS di Linux

Bingung saat pertama kali pakai linux?? Mau seeting ip addres dimana yah? Setting gataway dimana y? Trus setting DNS dimana yah?

Okey, langsung saja:)
masuk ke shell, jangan lupa login sebagai root
xlam@cyberkios:~$ sudo su
Password:
root@cyberkios:/# vi /etc/network/interfaces
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
auto eth0 #berfungsi agar alamat ip di simpan secara permanen meskipun linux di restart
iface eth0 inet static #interface eth0 ip di setting secara static atau manual
address 202.159.3.67
netmask 255.255.255.224
gateway 202.159.3.90


Untuk setting DNS anda bisa masuk ke :
root@cyberkios:/# vi /etc/resolv.conf
nameserver 202.159.32.2
nameserver 202.159.33.2 #alamat DNS di sesuaikan dengan ISP yang anda gunakan

Setelah itu kita restart network kita dengan perintah :
root@cyberkios:/etc/init.d/networking restart

#Kita cek konfigurasi anda sudah jalan atau belum
root@cyberkios:/# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:02:44:91:47:83
inet addr:202.159.3.67  Bcast:202.159.3.95  Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:169988 errors:67 dropped:0 overruns:0 frame:0
TX packets:6082 errors:0 dropped:0 overruns:0 carrier:0
collisions:1528 txqueuelen:1000
RX bytes:141935582 (135.3 MiB)  TX bytes:812217 (793.1 KiB)
Interrupt:5
lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3753 (3.6 KiB)  TX bytes:3753 (3.6 KiB)
root@cyberkios:/# ping google.com
PING google.com (64.233.167.99) 56(84) bytes of data.
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=1 ttl=237 time=420 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=2 ttl=237 time=330 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=3 ttl=237 time=545 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=4 ttl=237 time=429 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=5 ttl=237 time=329 ms
— google.com ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 4010ms
rtt min/avg/max/mdev = 329.664/411.183/545.187/79.429 ms
root@cyberkios:/#

Sekian semoga bermanfaat…:)
kalo kurang jelas silahkan komen?

Share this

0 Comment to "Cara setting DNS di Linux"

Post a Comment