Home Install Usage Learn E.Book MAP

Thursday, November 10, 2011

Getting Networking to work In BackTrack 5

If you haven’t noticed yet BackTrack does not boot with networking by default in order to increase its stealth.

Setting your IP manually

We will first set up the networking manually. In the following example we will assume the following addresses and their purpose:
IP Address      -  192.168.1.112/24
   Default Gateway -  192.168.1.1
   DNS server      -  192.168.1.1
In order to set these up we will run the following commands:
root@bt:~# ifconfig eth0 192.168.1.112/24
root@bt:~# route add default gw 192.168.1.1
root@bt:~# echo nameserver 192.168.1.1 > /etc/resolv.conf 
 


Getting a static IP to stick between reboots

These settings however will only last until you reboot, so if we want to save them between reboots we need to edit the /etc/network/interfaces file like this:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.112 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 Edit the file as appropriate, then have the network come up automatically at boot time:
root@bt:~# update-rc.d networking defaults root@bt:~# /etc/init.d/networking restart

Getting an IP from DHCP

In order to get an IP from a DHCP server we can issue the dhclient <interface> command as follows:
root@bt:~# dhclient eth0 Internet Systems Consortium DHCP Client V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/eth0/00:0c:29:81:74:21 Sending on LPF/eth0/00:0c:29:81:74:21 Sending on Socket/fallback DHCPREQUEST of 192.168.1.112 on eth0 to 255.255.255.255 port 67 DHCPACK of 192.168.1.112 from 192.168.1.1 bound to 192.168.1.112 -- renewal in 37595 seconds. root@bt:~#

Using the script to start networking

There is a script to start networking in the /etc/init.d directory which attempts to start every interface listen in /etc/network/interfaces (you can remove the ones you don’t need). To start it issue the following command:
root@bt:~# /etc/init.d/networking start

WICD Network Manager

Another way to set up your networking is using the WICD Network Manager, you can find it in the menu:
Menu > Internet > Wicd Network Manager
NOTE: Notice that when starting WICD you will get an error:

Wicd error.png

In order to get rid of this error you have to reboot Backtrack, than BEFORE starting WICD open up a terminal and type in the following:
root@bt:~# dpkg-reconfigure wicd root@bt:~# update-rc.d wicd defaults Now after a reboot the error should not occur anymore.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...