| 07 January 2010
kadang kita kesulitan untuk mengatur setting network pada backtrack versi 3 final. berikut ini adalah script bash untuk mempermudah konfigurasi Backtrack 3 final.
Copy script dibawah ini kemudian paste di editor anda, simpan dengan nama misalnya: settingIP.sh kemudian jalankan.
========================SoF===============================
#!/bin/bash
#Updated & modified by BlackArt
# Memilih perintah
clear
echo -e $intro
echo "--> Silahkan Masukan Pilihan:"
echo
echo "--> 1 Eth0 informations"
echo "--> 2 Set eth0 up"
echo "--> 3 Set eth0 down"
echo "--> 4 Set ip address, netmask and getaway"
echo "--> 5 Set DNS server"
echo "--> 6 Aktifkan DHCP pada eth0"
echo "--> 7 Network test (ping)"
echo
echo "--> Pilihan Anda:"
read choix
case $choix in
#On affiche ifconfig eth0
1)
clear
echo -e $intro
echo "--> Informasi Eth0:"
sleep 3
clear
echo -e $intro
ifconfig eth0
sleep 6
$0;;
#on active eth0
2)
clear
echo -e $intro
echo "--> Jadikan eth0 up..."
sleep 3
clear
echo -e $intro
ifconfig eth0 up
clear
echo -e $intro
echo "--> eth0 up"
sleep 3
$0;;
#On désactive eth0
3)
clear
echo -e $intro
echo "--> Jadikan eth0 down..."
sleep 3
clear
echo -e $intro
ifconfig eth0 down
clear
echo -e $intro
echo "--> eth0 down"
sleep 3
$0;;
#Konfigurasi IP
4)
clear
echo -e $intro
echo "--> Silahkan masukan Informasi dibawah ini:"
echo
echo "--> (IP: ip statis untuk network card Eth0)"
echo "--> (NETMASK: netmask)"
echo "--> (GETAWAY: getaway)"
echo
echo "--> IP NETMASK GETAWAY:"
read ip netmask getaway
clear
echo -e $intro
echo "--> Setting Baru IP Konfigurasi..."
echo "--> IP address: $ip"
echo "--> Netmask: $netmask"
echo "--> Getaway: $getaway"
sleep 4
clear
ifconfig eth0 $ip netmask $netmask
route add default gw $getaway eth0
echo -e $intro
echo "--> Setting telah di simpan."
sleep 3
$0;;
#Konfigurasi DNS
5)
clear
echo -e $intro
echo "--> Silahkan masukan Informasi dibawah ini:"
echo
echo "--> (DNS: ip address dari DNS server)"
echo
echo "--> DNS:"
read dns
clear
echo -e $intro
echo "--> Setting Baru Konfigurasi DNS..."
echo "--> DNS server: $dns"
sleep 3
clear
"echo" nameserver $dns > /etc/resolv.conf
echo -e $intro
echo "--> Pengaturan DNS di simpan."
sleep 3
$0;;
#Mengaktifkan DHCP
6)
clear
echo -e $intro
echo "--> Mengaktifkan DHCP di Eth0..."
sleep 2
clear
echo -e $intro
dhcpcd eth0
clear
echo -e $intro
echo "--> DHCP sukses diaktifkan"
sleep 3
$0;;
#Test Setting dengan Ping
7)
clear
echo -e $intro
echo "--> Silahkan masukan Informasi dibawah ini:"
echo
echo "--> (ADDRESS: adalah alamat untuk di ping"
echo "--> bisa berupa IP atau Domain)"
echo
echo "--> ADDRESS:"
read ipping
clear
echo -e $intro
echo "--> Ping $ipping ..."
ping $ipping -c 5
sleep 3
clear
echo -e $intro
echo "--> End of Test."
sleep 4
$0;;
esac
========================= EoF=============================




