Berikut ini tutorial membangun sebuah router dengan menggunakan Linux. Distro Linux yang digunakan adalah Slackware, dengan skema jaringan sebagai berikut :
Diasumsikan IP public, Netmask, Broadcast, dan DNS sebagai berikut :
IP : 202.1.1.3
Gateway : 202.1.1.1
Netmask : 255.255.255.0
DNS : 202.1.1.2
Langkah Pertama, Setting IP gateway :
root@parados:~# vi /etc/rc.d/rc.inet1.conf
# Config information for eth0 :
IPPADDR[0]=”202.1.1.3″
NETMASK[0]=”255.255.255.0″
USE_DHCP[0]=”"
DHCP_HOSTNAME=”"
# Config information for eth0 :
IPPADDR[1]=”192.168.25.100″
NETMASK[1]=”255.255.255.0″
USE_DHCP[1]=”"
DHCP_HOSTNAME=”"
# Default gateway IP address :
GATEWAY=”202.1.1.1″
Simpan dan keluar.
Langkah Kedua, Setting DNS resolve :
root@parados:~# vi /etc/resolv.conf
nameserver 202.1.1.2
Simpan dan keluar.
Langkah Ketiga, Setting ip_forwarding :
root@parados:~# pkgtool
pilih setup -> pilih services lalu pilih ip forward, aktifkan. Untuk mngaktifkan semua konfigurasi di atas, restart rc.inet1.
root@parados:~# /etc/rc.d/rc.inet1 restart
Tes konektifitas dengan gateway 202.1.1.1 :
root@parados:~# ping 202.1.1.1
PING 202.1.1.1 (202.1.1.1) 56(84) bytes of data.
64 bytes from 202.1.1.1: icmp_seq=1 ttl=64 time=5.64 ms
64 bytes from 202.1.1.1: icmp_seq=2 ttl=64 time=4.31 ms
64 bytes from 202.1.1.1: icmp_seq=3 ttl=64 time=5.07 ms
64 bytes from 202.1.1.1: icmp_seq=4 ttl=64 time=4.28 ms
— 202.1.1.1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3001ms
rtt min/avg/max/mdev = 4.280/4.828/5.641/0.570 ms
Jika lancar akan muncul tampilan seperti di atas.
Tes konektifitas DNS dengan ping salah satu url, misalnya google.co.id :
root@parados:~# ping google.co.id
PING google.co.id (72.14.207.104) 56(84) bytes of data.
64 bytes from eh-in-f104.google.com (72.14.207.104) : icmp_seq=1 ttl=237 time=260
64 bytes from eh-in-f104.google.com (72.14.207.104) : icmp_seq=2 ttl=237 time=268
64 bytes from eh-in-f104.google.com (72.14.207.104) : icmp_seq=3 ttl=237 time=261
64 bytes from eh-in-f104.google.com (72.14.207.104) : icmp_seq=4 ttl=237 time=265
— 202.1.1.1 ping statistics —
4 packets transmitted, 4 received, 20% packet loss, time 3998ms
rtt min/avg/max/mdev = 260.950/624.132/268.577/3.125 ms
Jika lancar akan muncul tampilan seperti di atas.
Langkah Keempat, Setting NAT IPtables :
root@parados:~# vi /etc/rc.d/rc.snat
#!/bin/sh
# flush
iptables -F
iptables -F -t nat
iptables -t nat -A POSTROUTING -s 192.168.25.0/24 -o eth0 -j SNAT –to-source 202.1.1.3
simpan dan keluar.
Langkah Kelima, Setting agar NAT IPtables berjalan saat booting :
Tambahkan script berikut pada /etc/rc.d/rc.local
root@parados:~# vi /etc/rc.d/rc.local
# snat
/etc/rc.d/rc.snat
Simpan dan keluar.
Langkah Keenam, Setting agar file /etc/rc.d/rc.snat dapat dieksekusi :
root@parados:~# chmod 777 /etc/rc.d/rc.snat
Langkah Ketujuh, reboot dan router siap digunakan :
root@parados:~# reboot
Labels
- 100 Malware (1)
- artikel linux (7)
- Artikel Slackware (6)
- DNS Service Google (1)
- Ethernet (1)
- Folder Share Tnp Psswd (1)
- IMEI (1)
- Install XMMS di Fedora (1)
- Jaringan (10)
- linux 64 studio (1)
- linux Absolut (1)
- linux aLinux (1)
- linux APODIO (1)
- linux Arch (1)
- linux ArcheOS (1)
- linux Artistx (1)
- linux Asp (1)
- linux Astaro (1)
- linux AsteriskNOW (1)
- linux Austrix (1)
- linux Back Track (1)
- linux BlankON (1)
- linux boss (1)
- linux CentOS (2)
- linux Debian (2)
- linux Edubuntu (1)
- linux Fedora (1)
- linux Knoppix (1)
- linux Kubuntu (1)
- linux Lubuntu (1)
- linux Mandriva (1)
- linux Open SUSE (2)
- linux Red Hat (2)
- linux Slackware (6)
- linux Ubuntu (17)
- linux ylmf (tampilan windows) (1)
- linux Zencafe (1)
- materi linux (10)
- Metropolitan Area Network (MAN) (1)
- other linux (2)
- salix os (1)
- sistem bil binner (1)
- tcp ip (1)
- tcp ip v4 (1)
- Topologi Jaringan (1)
- Tugas Akhir(TKJ) (2)
Membagun router menggunakan slackware 12
Thursday, June 10, 2010Posted by jasa iso manual at 1:12 AM
Labels: linux Slackware
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment