PDA

View Full Version : Howto: Configure Network Cards


xatar
05-15-2006, 05:18 PM
Network Interfaces.

So you have Backtrack running installed on a HDD, you can now configure your cards to use the network. You can also do this exactly the same if you are running the distro from the CD, but your settings will not be saved as the CD is a read only medium. There are plenty of different ways to configure these wired cards and plenty of tools to do it. What I am showing here is the generic Linux commands which should be the same for other distro's.

To turn on your ethernet network card (LAN):

ifconfig eth0 up

The eth0 is the name of the card, this could change depending on what hardware you have installed. To get a list of all adapters:

ifconfig -a

This will list all (-a) interfaces.

To get DHCP to assign a network address automatically from the DHCP server:

dhcpcd eth0

This will run it only on eth0, if you omitted the interface you would run the DHCP discovery process on all compatible cards.

NOTE: Auditor has a script called 'pump' which will do the same process.

Then check if you have an address:

ifconfig eth0

You should see an IP address in there somewhere.


If you want a static IP address instead of a dynamic one:

ifconfig eth0 192.168.1.2

Or whatever IP you want! If you want a variable subnet mask (beyond the scope of this thread!):

ifconfig eth0 192.168.1.2 netmask 255.255.255.224


To manually add a default gateway:

route add default gw 192.168.1.1 eth0

Of course you would replace the IP address with your default gateways, also the eth0 interface is not always needed!


To manually assign your DNS servers:

echo nameserver 192.168.1.1 > /etc/resolv.conf
echo nameserver 212.135.1.36 >> /etc/resolv.conf

Note that the first line will OVERWRITE (>) the resolv.conf file, the second command will APPEND (>>) 'nameserver 212.135.1.36' onto the end of it!


All of this may have been done for you automatically with DHCP anyway, so to check:

cat /etc/resolv.conf

This will display to you the contents of the /etc/resolv.conf file.


To change your DHCP address if it has already been assigned you need to delete the DHCP file assigned to the card:

rm /etc/dhcpc/dhcpcd-eth0.pid

Although that may change based on the interfaces you have!

Then run the dhcpcd command again.

I will post generic instructions for wireless cards soon.

Hope this helps the new guys!

later,

xatar
05-15-2006, 05:19 PM
Wireless cards.

Wireless cards are very different based upon what chipset you have. I personally use Atheros chipset cards which has screwed me up a bit with BackTrack as it has problems with using them for certain attacks.

What I will again show is generic commands for setting up and configuring your wireless interfaces.

The interface name (ath0 below) is entirely dependant on what chipset you are using, you may have any of the following:

ath0
wlan0
wifi0
eth0

You need to find out what you have. To do this you should execute the following bash command:

iwconfig -a

This will show all wireless extension on your machine. You should see all of your network interfaces, but only the wireless ones will have detailed information next to it. Now you know what your wireless cards name is...

Switch on your wireless card:

ifconfig ath0 up


To connect to an 'open' wireless access point (AP):

iwconfig ath0 essid 'nameofnetwork'

The 'nameofnetwork' is your Service Set IDentifer (SSID). That is the name of your network.


To configure a WEP key:

iwconfig ath0 key 3B5D3C7D207E37DCEEEDD301E3


To connect to a specific AP:

iwconfig ath0 ap 03:27:A8:BC:0F:F1

Where '03:27:A8:BC:0F:F1' is the MAC address of your AP, also known as the Basic Service Set IDentifier (BSSID).


Once you have setup your connection, you can get a DHCP address:

dhcpcd ath0


Then check that you have an IP from the wireless network.




But what if the network uses WPA? Again you need to assign the essid and maybe an AP MAC, then:

Create a text based file called wpa_supplicant.conf

Enter the following:

network={
essid="nameofnetwork"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="WPApassphrase"
}

Where nameofnetwork is your essid and psk is your WPA pre-shared key!


Then run the wpa_supplicant tool.

wpa_supplicant -D madwifi -i ath0 -c wpa_supplicant.conf

This will need altering depending on what chipset and drivers you are using. The above should work for an Atheros card.

Saying all of the above about WPA configurations, I have had many problems with it on BackTrack. If someone else has other suggestions, please post here. Also, please post setup commands for other types of wireless cards.




To put your wireless card into monitor mode:

iwconfig ath0 mode monitor


To restrict it to one specific channel:

iwconfig ath0 channel XX

Make sure you use a two figure number, channel 1 tends to put you on channel 11 for some reason!

Again, they are for Atheros cards, other cards have other commands.



I hope this has helped people in understanding a little more about the configuration settings for their wireless cards. Don't forget the wlassisstant tool on BackTrack too.

If you notice any errors in the above commands, please post.
If you want to post other commands, please do!

later,

100r1
07-31-2006, 12:40 PM
Bump

This really helped me when I first started w/ Back Track

Perhaps it will help others


The search button works wonders!

thorin
07-31-2006, 02:31 PM
There are great instructions in this thread:
http://forums.remote-exploit.org/showthread.php?t=1268

for automating DHCP and NIC config. (Make sure you read the whole thread as there's a revised version of the script part way through and a lot of questions are answered).

renn3r
01-26-2007, 11:22 PM
Hi all.
I'am new on this forum and I need some help.
I did evrything as you say, but still having problem.

I did this :

ifconfig eth0 up
ifconfig -a
dhcpcd eth0
ifconfig eth0

than you say : You should see an IP address in there somewhere.

But I get this :
http://shrani.si/files/btrx85.png

I tryed this on backtrack 2.0 and auditor , and I get same problem, I run it from boot cd , direct and on Parallels.
Evrything is all right till I type in pump (on auditor) or dhcpcd eth0 (in backtrack2) than auditor say Operation failed , on backtrack nothing hapens.
I tryed to input DNS before this command , but still nothing.
When I input ifconfig -a , I get
eth0 (with no IP) and lo (with local ip 127.0.0.1).
When I input ifconfig eth1 up , I get :
eth1:ERROR while getting Interface flags : No such device.
I have dynamic IP , Callisto 821 DSL router and I don't use wireless.
On XP when I connect to Internet I must input PPPoE (username,pass,DNS).

Can you please help me with this ?

hyeclass
01-27-2007, 09:23 AM
thanks for this howto ;) pin this plzzzz

renn3r
01-27-2007, 05:39 PM
Nobody don't know how to fix this ?

hyeclass
01-28-2007, 10:25 PM
donno what ur talking about but i also got connected with my dwl-g122 but couldnt surf, so i called dlink they told me somethign about the wpa-supplicant so try that... i havent had time ;)

renn3r
01-30-2007, 08:49 AM
Now I know how to.

To help others with same problem , for DSL connection and dynamic IP.

Input this command : pppoe setup // works 100%

THX for help.

michelinok
02-04-2007, 01:32 PM
Just a thing that i didn't understand: i've manually configured my cards, but everytime i reboot, the dhcpd commands are executed (a dhcpd for each card). How can i disable this and make the configurations permanent?

Again...sorry for my english!

toriwells
02-14-2007, 08:49 AM
That is because of your /etc/network/interfaces file. If you want them permanently configured with a static ip address you must modify this file in order to achive it. For example, if you have eth0 and in the file you find something like this 'iface eth0 inet dhcp' that means that dhcp will run everytime you start networking. Instead you should prefer something like that 'iface eth0 inet static' <- this way you teach eth0 to be static, and in the line below 'address xxx.xxx.xxx.xxx', 'netmask xxx.xxx.xxx.xxx' and 'gateway xxx.xxx.xxx.xxx' all of them in separated lines.

Hope this helps!

Just a thing that i didn't understand: i've manually configured my cards, but everytime i reboot, the dhcpd commands are executed (a dhcpd for each card). How can i disable this and make the configurations permanent?

Again...sorry for my english!

ax4413
02-20-2007, 04:02 PM
I'm new to Linux and backtrack in particular and I just wanted to say that this is one very useful thread indeed. Sorted my LAN difficulties in seconds.

Cheers xatar

bmw740il
02-28-2007, 03:47 AM
many thanks its help us good

frosszeen
03-15-2007, 08:53 AM
I m using acer aspire 3682NWXCI...

my problem:

how to setup acer acpi on back track.:(?

i had try a few time it wont work..it give...error no such device..

pls help me.....:(

itsme
04-05-2007, 12:02 AM
Hello All,

I have a question here. When BT 2 is booting it comes to a point that it tries to get an IP by doing a dhcpcd on all available network interfaces. I connect wireless to my AP which is obviously secured with a wep key :cool: . So the dhcpcd fails and adds quite some seconds to the boot time. When BT 2 is up and running i can configure my wlan card, so set my wep key and connect to my AP succesfully.

What i actually want is to predefine my wep key and SSID , so that BT 2 can automatically connect to my AP at boot time and only does a dhcpcd on this particular NIC. Is there a way to achieve this?

Thanks in advance!

hobbes
04-05-2007, 09:11 AM
I would recomend using the nodhcp boot code then creating a script with your desired commands (don't forget make it executable) and adding it to /etc/rc.d/rc.local (the last script to be run on startup) with something like this:


# Start wireless config script
if [ -x /path/to/script.sh ]; then
. /path/to/script.sh
fi


Alternately you can use the /etc/rc.d/rc.wireless script. You can find some info on editing the conf file here (http://www.slackbasics.org/html/netconfig.html) (section 23.4).

itsme
04-05-2007, 09:22 AM
Thanks for your help. Is there also a way to make the nodhcp default?

hobbes
04-05-2007, 09:38 AM
Honestly I just commented out that section of code in /etc/rc.d/rc.inet1 like this:


#! /bin/sh
# /etc/rc.d/rc.inet1
# This script is used to bring up the various network interfaces.
#
# Modified for SLAX by Tomas M. <http://slax.linux-live.org>
#
# /proc/cmdline 'nodhcp' option added by Martin J. Muench <mjm@remote-exploit.org>

if [ "$1" = "start" -o "$1" = "" ]; then

ifconfig lo down 2>/dev/null
/sbin/ifconfig lo 127.0.0.1 2>/dev/null
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo 2>/dev/null

# check if 'nodhcp' was set
# if ! grep -w -q "nodhcp" /proc/cmdline ; then
#
# for eth in `ls /sys/class/net | grep -v sit`; do
# check if dhcpcd is not already running for $eth interface,
# in that case it was started by hotplug so don't start it again
# if [ "$eth" != "lo" -a ! -e /etc/dhcpc/dhcpcd-$eth.pid ]; then
# echo "/sbin/dhcpcd -d -t 10 $eth"
# /sbin/dhcpcd -d -t 10 $eth
# fi
# done
# fi

fi

itsme
04-06-2007, 09:34 AM
Well...i added my card in the /etc/rc.d/rc.wireless.conf with all applicapble parameters. I also modified /etc/rc.d/rc.inet1 just like you did, to disable the dhcpcd on boot. However, after a reboot, the laptop came to the point that the mousepointer appeared and then it automatically shutdown....:confused:

Even the failsafe & a attempt to boot from livecd failed with the same result :eek: . So i ended up reinstalling BT 2 all over again.

So people, Don't try this at home:D

gosch2912
05-17-2007, 07:49 PM
Hallo
I seached a long time here in the forum. Maybe I´m blind. I just want to get my wireless to work. Because I find a bit hard with all the commands in the shell (Windows Noob I know) I tryed with the wlassistant.
It says:Radio of your wireless card is off. Would you like to turn it on?. I click Yes Nothing happens.

Before that, I tryed to config by the console. Thats what I did:

ifconfig eth0 up
ifconfig eth0 192.168.1.54 netmask 255.255.255.0
route add default gw 192.168.1.1 eth0
echo nameserver 192.168.1.1 > /etc/resolv.conf

After that a symbole in the 'tray' appears for a network connection.

But I can´t go on any websites with f.fox.

Strange thing is, that the LED from my WLAN is NOT on. (Normally orange light)

I have a ACER Notebook: Travel MAte 291 LMi
Wlan Card: ipw2100 (Intel Pro Wireless 2100)

And if I type iwconfig -a there comes No such device.
If I type onlyiwconfig I have

eth0 unassorciated ESSID:off/any Nickname:"ipw2100
Mode:Managed Channel=0 Acsess Point 00:00:00:00:00:00
Bit Rate=0 kb/s Tx-Power:off
.....
I had this Problem with windows, too long time ago. I needed a driver for this switch on the notebook.

Maybe you have another Tutorial link for me. This Tutorial is very usefull although my inet doesn't work:)

michelinok
05-18-2007, 07:33 AM
Try

ifconfig eth1 up


then post the results of

iwconfig

loftrat
05-22-2007, 01:57 PM
Ok, this method works fine up to a point. Could someone let me know please what I need to do/change to make these settings to the network config permanant?

B|T is installed to the HDD, but each time I reboot I have to repeat this process.

I've had a quick look through the forum but nothing obvious leaps out at me.

Thanks.

loftrat
05-23-2007, 04:15 PM
Any thoughts anybody?

darkevil011
07-26-2007, 04:59 AM
Im having trouble trying to connect to WPA networks, i use the wpa_supplicant command with the script provided in the first post but i get a madwifi driver not supported error

any ideas?

Cheers

balding_parrot
07-26-2007, 05:03 AM
Look in the tutorials and guides section.
Xploitz has written many tutorials covering all types of WPA networks.

darkevil011
07-26-2007, 05:52 AM
figured out my problem

my passphrase contained a $ so when using wpa_passphrase put ' ' around the password, prob obvious to most people but im sharing my experiences.

put the psk it generates into your conf file.
i have an atheros AR5005G wireless card and had to use

wpa_supplicant -D wext - i ath0 -c path_to_my_conf_file

bingo

-D madwifi gave me an "unsupported driver error"

Cheers

-=Xploitz=-
07-26-2007, 05:39 PM
i have an atheros AR5005G wireless card and had to use

wpa_supplicant -D wext - i ath0 -c path_to_my_conf_file

bingo

-D madwifi gave me an "unsupported driver error"

Cheers

Did you get that -D madwifi from my tutorial?? I could have sworn that I put -Dwext because the wext is the default driver BT2 uses..that way EVERYONE, no matter what card they have and/or use..my commands and WPA / WPA2 supplicant tutorials should work for all. Hmmm.....Now I feel the urge to go search my tutorials and edit them again. Work, work, work, work, when will it all end??:confused:

darkevil011
07-26-2007, 11:58 PM
xatar wrote the bit i used did he get them for you

Wireless cards.

Wireless cards are very different based upon what chipset you have. I personally use Atheros chipset cards which has screwed me up a bit with BackTrack as it has problems with using them for certain attacks.

What I will again show is generic commands for setting up and configuring your wireless interfaces.

The interface name (ath0 below) is entirely dependant on what chipset you are using, you may have any of the following:

ath0
wlan0
wifi0
eth0

You need to find out what you have. To do this you should execute the following bash command:

iwconfig -a

This will show all wireless extension on your machine. You should see all of your network interfaces, but only the wireless ones will have detailed information next to it. Now you know what your wireless cards name is...

Switch on your wireless card:

ifconfig ath0 up


To connect to an 'open' wireless access point (AP):

iwconfig ath0 essid 'nameofnetwork'

The 'nameofnetwork' is your Service Set IDentifer (SSID). That is the name of your network.


To configure a WEP key:

iwconfig ath0 key 3B5D3C7D207E37DCEEEDD301E3


To connect to a specific AP:

iwconfig ath0 ap 03:27:A8:BC:0F:F1

Where '03:27:A8:BC:0F:F1' is the MAC address of your AP, also known as the Basic Service Set IDentifier (BSSID).


Once you have setup your connection, you can get a DHCP address:

dhcpcd ath0


Then check that you have an IP from the wireless network.




But what if the network uses WPA? Again you need to assign the essid and maybe an AP MAC, then:

Create a text based file called wpa_supplicant.conf

Enter the following:

network={
essid="nameofnetwork"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="WPApassphrase"
}

Where nameofnetwork is your essid and psk is your WPA pre-shared key!


Then run the wpa_supplicant tool.

wpa_supplicant -D madwifi -i ath0 -c wpa_supplicant.conf

This will need altering depending on what chipset and drivers you are using. The above should work for an Atheros card.

Saying all of the above about WPA configurations, I have had many problems with it on BackTrack. If someone else has other suggestions, please post here. Also, please post setup commands for other types of wireless cards.




To put your wireless card into monitor mode:

iwconfig ath0 mode monitor


To restrict it to one specific channel:

iwconfig ath0 channel XX

Make sure you use a two figure number, channel 1 tends to put you on channel 11 for some reason!

Again, they are for Atheros cards, other cards have other commands.



I hope this has helped people in understanding a little more about the configuration settings for their wireless cards. Don't forget the wlassisstant tool on BackTrack too.

If you notice any errors in the above commands, please post.
If you want to post other commands, please do!

later,

-=Xploitz=-
07-27-2007, 12:31 AM
xatar wrote the bit i used did he get them for you


Oohhh..no...he wrote that before me. Not sure why he wrote -D madwifi though..:confused:

Mine WPA/WPA2 connection tutorials work though;)

shamanvirtuel
09-01-2007, 05:35 AM
xploitz you may correct the error in this tutorial from xatar....

he wrote iwconfig -a for ifconfig -a

coder
10-02-2007, 12:14 PM
Thanks buddy
I'm glad that I'm now posting from B|T 2 live cd...

pppoe setup

has automatically made things works...

sbandavid
11-06-2007, 11:08 PM
Hi, i m using backtrack in live mode and i'm trying to configure my intel 3945 wireless card, but i get some problems... here the output of some commands ...

# dmesg | grep ipw3945
ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.2.0dmpr
ipw3945: Copyright(c) 2003-2006 Intel Corporation
ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection
[<f954f3e0>] (ipw_isr+0x0/0x320 [ipw3945])

# lspci | grep 3945
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

# lsmod | grep ipw3945
ipw3945 199624 0
ieee80211 30408 1 ipw3945

# iwconfig
lo no wireless extensions

any suggestion? thanx

Unregistered
11-18-2007, 12:45 PM
There are great instructions in this thread:
forums.remote-exploit.org/showthread.php?t=1268

for automating DHCP and NIC config. (Make sure you read the whole thread as there's a revised version of the script part way through and a lot of questions are answered).
dead link, anyone know of a way to automate it?

john2278
12-27-2007, 10:36 PM
i have a lan card but i cant connect to internet from bt2 i gave ip,dns,dhcp to set ip command but no connection help

zarraza
12-28-2007, 01:27 AM
i have a lan card but i cant connect to internet from bt2 i gave ip,dns,dhcp to set ip command but no connection help

try modprobe e100

nickF
01-05-2008, 05:24 PM
Hello!

First of all, thank you for this excellent topic.

But I have a problem, it gives me the following errors:

I put my card into monitore mode; Then I try:

iwconfig wlan0 key KEY

Following error:
Error for wireless request "Set Encode" (8B2A):
SET failed on device wlan0; Operation not supported

I try:
ifconfig wlan0 up
iwconfig wlan0 key KEY

The same.

Then I tried:

iwconfig wlan0 ap @macAP

Following error:
Interface wlan0 doesn't support MAC addresses
wlan0 Interface doesn't support MAC addresses
Error for wireless request "Set AP Address" (8B14à):
invalid argument "mac@AP"

Have you an idea of the problem?

Thank you!

MaXe Legend
01-05-2008, 05:41 PM
This is quite a good thread i think, useful :)

archangel.amael
01-05-2008, 09:09 PM
nickFI have a problem, it gives me the following errors
have a problem, it gives me the following errors
First of all what type of card do you have? Second did you check the wiki (http://backtrack.offensive-security.com/index.php?title=Main_Page)for your card? Find out if it is a supported card or not.

And if your card is supported did you try to connect to the internet with it and see if that works before trying do injection and other things with it.
Do that and then post back the results and then we can offer better help.
Thanks

MaXe Legend This is quite a good thread i think, useful

Come on man don't just post on every thread to get some sort of artificial post count or whatever. At least offer some help or something
not just the above dribble right after someone posts for help.

MaXe Legend
01-05-2008, 09:34 PM
Actually i post in the threads i am interested in, if you check the forum i am not in
every thread, only the threads where there are problems i know i might be able to
solve or threads i am interested in and if i think it's good then i post.

On other forums you get something called "rep" or reputation if people clicks a little
reputation button meaning the person think you did something good to deserve that.
Post counts on the other hand is not something that shows how good you are, infact
it just shows how much you post or how active you are.

Seeing as you have 3 posts per day, meaning you are either choosing not to reply so
much or you're not very active. I see a lot of threads every day on this forum where
people need help to do things or fix things. I have 8 posts per day which might be a
little too much.

On my own forum i have 5.5 posts per day so that isn't so bad. Posting in a thread
and giving your oppinion is good. But posting in every thread there is only saying like:
"wow this is good" all the time or not making constructive and intelligent replies is
the same as spamming which is not accepted on any forums.

And if you want to find more information about me then you can allways google me :)

nickF
01-05-2008, 10:33 PM
First of all what type of card do you have? Second did you check the wiki for your card? Find out if it is a supported card or not.

And if your card is supported did you try to connect to the internet with it and see if that works before trying do injection and other things with it.
Do that and then post back the results and then we can offer better help.
Thanks


Come on man don't just post on every thread to get some sort of artificial post count or whatever. At least offer some help or something
not just the above dribble right after someone posts for help.

Thank you archangel for youre answer!

I have an alfa 500 - Here is a screen in which you see better the error, and the details about the card:


http://img167.imageshack.us/img167/5725/image12zr5.png

archangel.amael
01-06-2008, 02:06 AM
Thank you archangel for youre answer!

h[Ø]ttp://img167.imageshack.us/img167/5725/image12zr5.png

It looks like you need to use the airmon-ng command correctly but I could be wrong here
but normally it will look like this

bt~# airmon-ng start wlan0

better go have a look at the aircrack site and look over the commands real quick like.
http://www.aircrack-ng.org/doku.php?id=airmon-ng

That will give you more info about the commands.
hope that helps

nickF
01-06-2008, 03:06 AM
It looks like you need to use the airmon-ng command correctly but I could be wrong here
but normally it will look like this

bt~# airmon-ng start wlan0

better go have a look at the aircrack site and look over the commands real quick like.


That will give you more info about the commands.
hope that helps

Thank you for youre answer!

I thinked that the monitor mode, was just for injection?!

airmon-ng start wlan0, puts my card into monitore mode.

I tested here, beginning from 0, with monitor and managed mode, same error:

http://img166.imageshack.us/img166/3134/image14tb7.png


:confused::confused:

pureh@te
01-06-2008, 03:39 AM
With the alfa airmon in not needed. A simple


bt~#iwconfig wlan0 mode monitor

&

bt~#iwconfig wlan0 mode managed

will get you back and forth with ease.

nickF
01-09-2008, 11:16 PM
I've read somewhere that it is not possible to connect to a protected network with the alfa under BT2 - In other words, not possible to set a key with the alfa under BT2.

Lets test under BT3.

balding_parrot
01-10-2008, 02:46 AM
I've read somewhere that it is not possible to connect to a protected network with the alfa under BT2 - In other words, not possible to set a key with the alfa under BT2.

Lets test under BT3.Total rubbish.

ClemsonF4i
01-23-2008, 01:07 AM
Thank you for youre answer!

I thinked that the monitor mode, was just for injection?!

airmon-ng start wlan0, puts my card into monitore mode.

I tested here, beginning from 0, with monitor and managed mode, same error:
......
:confused::confused:


Nick,

I am not sure why you are trying to set a key while your card is in MONITOR mode (monitor mode is useful for scanning, you cannot access internet with it). If you need to connect to your AP, your card needs to be in MANAGED mode. So try to put your card in managed mode then retry your key. Simply run:

#iwconfig wlan0 mode managed

ktech.
02-05-2008, 02:10 PM
This an an awesome tutorial I have only run into one small problem which im sure somebody can help me with. Connection looks great, nothing wrong there, but when I go to use firefox or another browser I get " Firefox is configured to use a proxy server that is refusing connections"

Im just lost as to how to configure it otherwise. Im using an Atheros card btw.

nicola1981
02-07-2008, 10:28 PM
I just wonder if it's so difficult for someone who knows how to configure backtrack to wrote an complete "how to"regarding network config on backtrack...
I read all but I don't understand how to configure my eth0 whit an static IP.
I don't want to use DHCP (someone can tell me "use nodhcp".... but how??? )
I don't find anny /etc/network/interfaces.
It is annoing to set IP every time when I reboot my PC.
Off topic: How can I enable copy/paste whit mouse right click
What can I do to make an alias to remain after reboot?

thedash71
02-11-2008, 05:02 AM
Hi folks,

Just installed BT2 2 Final onto my hard disk and I have a problem where my Netgear 511T keeps on losing its connection to the AP. As soon as it loses the connection, it reconnects after a few seconds.

I've tested the card in Windows and it works fine, the problem seems to lie with Linux.

I'm finding this very frustrating to be honest, and I'm hoping someone here may possibly suggest a fix.

Any suggestions greatly appreciated.

Thanks,
Jen

bommeli
02-13-2008, 10:36 AM
Thanks for this howto.

Desidero
02-14-2008, 03:38 AM
Okay, I hate to add to this thread, but I suppose it must be done.

I've tried everything here, I've read tutorials, read the wiki, etc.

I can get my wireless card to work just fine - what I want is to use my wired card. I have a direct connection in my apartment to a shared T1 connection - everything is detected automatically and there is no login/security stuff required.

This is the output of ifconfig after doing ifconfig eth0 up (tried having eth1 (my wireless card) and lo both down and up) and deleting/reacquiring my dhcp information. The information it has is identical to that in Windows (where it works), so there's nothing wrong there.

bt ~ # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:08:A1:14:AD:0B
inet addr:[myip] Bcast:[ip] Mask:255.255.254.0
UP BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:17721 errors:262 dropped:0 overruns:0 frame:0
TX packets:66 errors:7 dropped:0 overruns:0 carrier:7
collisions:0 txqueuelen:1000
RX bytes:1515452 (1.4 MiB) TX bytes:5207 (5.0 KiB)
Interrupt:16 Base address:0x2c00

--------------------------------------

I tried going into the "Setup IP Address" and filled all the information in manually as well (IP/Default Gateway/DHCP/DNS servers). Again, identical to the info I'm automatically getting in Windows.

Here is a list of all my connections:

eth0 Link encap:Ethernet HWaddr 00:08:A1:14:AD:0B
inet addr:[myip] Bcast:[ip] Mask:255.255.254.0
UP BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:20930 errors:313 dropped:0 overruns:0 frame:0
TX packets:66 errors:7 dropped:0 overruns:0 carrier:7
collisions:0 txqueuelen:1000
RX bytes:1783212 (1.7 MiB) TX bytes:5207 (5.0 KiB)
Interrupt:16 Base address:0x2c00

eth1 Link encap:Ethernet HWaddr 00:06:25:13:21:94
inet addr:192.168.1.112 Bcast:192.168.1.255 Mask:255.255.255.0
BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:3110 errors:0 dropped:1257 overruns:0 frame:0
TX packets:7935 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:456409 (445.7 KiB) TX bytes:598153 (584.1 KiB)
Interrupt:3

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

------------------

Does anyone have any other ideas as to why this isn't working? It seems to have all the information it needs, but firefox/etc still won't work.

Oh, I'm running from the BT3 Live CD ISO if that matters.
My NIC is a CNet PRO200WL PCI Fast Ethernet Adapter (ancient, yes, I know).

Same for Lenovo R61 (live USB), only works in VESA. Whenever running xconf, it crashes to a black screen. For example, if i run PCHANGES without xconf, it works...

I tried to run xorgconfig, but still goes to a black screen after i run startx. I haven't tried the audio fix yet...

Apparently editing posts isn't enabled... YES IT IS I installed the BT3 USB version to a hard drive now and it's still doing the same thing (though my eth0 and eth1 are switched around for some reason), so that's not the problem.

/var/log/messages file
fileden dot com/files/2007/11/4/1564649/messages.txt

#dmesg output
fileden dot com/files/2007/11/4/1564649/dmesg%20output.txt

Screenshot of various network things:
fileden dot com/files/2007/11/4/1564649/networkstuff.png

Let me know if there's anything else that would be helpful. Sorry about not having real links, but the forum wouldn't allow them.

EDITED BY BP

Desidero
02-15-2008, 07:49 PM
*Update*

Strange things happening... I was playing around with the GRUB boot loader to get BT working with that (was using the windows boot loader pointed at lilo.mbr before) and a few things have changed. The first time I successfully loaded via GRUB, the internet actually worked. I was going to come and post here, but after clicking login on the 3rd website I went to, it suddenly stopped working. I haven't been able to recreate this situation after rebooting, etc. I even tried reinstalling BT and running it from GRUB in an attempt to recreate the scenario.

Also, every time BT loads up now, the little computer icon for my eth0 (wired) connection shows up in the system tray, but goes away within 1-3 seconds. I don't recall if it was there the time that my internet worked, sadly. I was excited about it working after messing around for 2 days trying to figure it out.

Another strange thing is that the network connection viewer isn't showing eth0 even when it's set to "UP" in ifconfig now. It always used to, despite not working.

Other than that, things are as they were. IP info comes up, but no connection.

frankibo
02-18-2008, 04:40 PM
Okay, I hate to add to this thread, but I suppose it must be done.

I've tried everything here, I've read tutorials, read the wiki, etc.

I can get my wireless card to work just fine - what I want is to use my wired card. I have a direct connection in my apartment to a shared T1 connection - everything is detected automatically and there is no login/security stuff required.

This is the output of ifconfig after doing ifconfig eth0 up (tried having eth1 (my wireless card) and lo both down and up) and deleting/reacquiring my dhcp information. The information it has is identical to that in Windows (where it works), so there's nothing wrong there.

bt ~ # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:08:A1:14:AD:0B
inet addr:[myip] Bcast:[ip] Mask:255.255.254.0
UP BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:17721 errors:262 dropped:0 overruns:0 frame:0
TX packets:66 errors:7 dropped:0 overruns:0 carrier:7
collisions:0 txqueuelen:1000
RX bytes:1515452 (1.4 MiB) TX bytes:5207 (5.0 KiB)
Interrupt:16 Base address:0x2c00

--------------------------------------

I tried going into the "Setup IP Address" and filled all the information in manually as well (IP/Default Gateway/DHCP/DNS servers). Again, identical to the info I'm automatically getting in Windows.

Here is a list of all my connections:

eth0 Link encap:Ethernet HWaddr 00:08:A1:14:AD:0B
inet addr:[myip] Bcast:[ip] Mask:255.255.254.0
UP BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:20930 errors:313 dropped:0 overruns:0 frame:0
TX packets:66 errors:7 dropped:0 overruns:0 carrier:7
collisions:0 txqueuelen:1000
RX bytes:1783212 (1.7 MiB) TX bytes:5207 (5.0 KiB)
Interrupt:16 Base address:0x2c00

eth1 Link encap:Ethernet HWaddr 00:06:25:13:21:94
inet addr:192.168.1.112 Bcast:192.168.1.255 Mask:255.255.255.0
BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:3110 errors:0 dropped:1257 overruns:0 frame:0
TX packets:7935 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:456409 (445.7 KiB) TX bytes:598153 (584.1 KiB)
Interrupt:3

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

------------------

Does anyone have any other ideas as to why this isn't working? It seems to have all the information it needs, but firefox/etc still won't work.

Oh, I'm running from the BT3 Live CD ISO if that matters.
My NIC is a CNet PRO200WL PCI Fast Ethernet Adapter (ancient, yes, I know).

Same for Lenovo R61 (live USB), only works in VESA. Whenever running xconf, it crashes to a black screen. For example, if i run PCHANGES without xconf, it works...

I tried to run xorgconfig, but still goes to a black screen after i run startx. I haven't tried the audio fix yet...

Apparently editing posts isn't enabled... YES IT IS I installed the BT3 USB version to a hard drive now and it's still doing the same thing (though my eth0 and eth1 are switched around for some reason), so that's not the problem.

/var/log/messages file
fileden dot com/files/2007/11/4/1564649/messages.txt

#dmesg output
fileden dot com/files/2007/11/4/1564649/dmesg%20output.txt

Screenshot of various network things:
fileden dot com/files/2007/11/4/1564649/networkstuff.png

Let me know if there's anything else that would be helpful. Sorry about not having real links, but the forum wouldn't allow them.

EDITED BY BP

I've got the same problem with my Backtrack 2.0 Final Live CD. Still haven't been able to figure this out. Could use some help, anyone got an idea?

Zoner21
02-19-2008, 06:59 AM
I just bought an Encore Wireless card, the BT2 recognize it but I can connect to my home network, I'm using WPA for the Network.

In a tutorial i see that using the wpa_supplicant can do it but it didn't work, I create a wpa.conf, when I execute the wpa_supplicant, it says
"trying to associate with xx:xx:xx:xx:xx:xx ssid ....."

and like 10 seconds later displays,

"Authentication with 00:00:00:00:00:00 timed out" (and the mac displays with all 0),

i'm using the wpa.conf like is in the tutorial, I also try using first the wpa_passfrase command but didn't work.

Sorry to post again so soon, but forgot something.

I investigate the chip in Encore cards and Encore ENLWI-SG have Atheros 5212 chip. Then look for the madwifi driver because that's the one that came in the tutorial and make it, but still having the "unsupported driver 'madwifi'", i don't know if i'm missing something, the messages in the last post are using the wext driver.

ktech.
03-02-2008, 02:06 AM
If Im not using a card, but one of the USB wireless devices that come installed in my Dell, how can I set that up?

bloody
03-24-2008, 01:11 AM
I'm using a WUSB54G V.4 and trying to connect to my WPA2 Fonero.
I configured everything, but I get this error, after that my USB device freezes, and BT is to be rebooted!
Btw this page could be helpfull for configuration the conf file:
daemon-systems.org/man/wpa_supplicant.conf.5.html

Btw i used RSN for proto, same error like with WPA!

Any idea what the problem is, or better - the solution :)?

Here the pic link, as I'm not allowed to post links/imgs:
img141.imageshack.us/img141/2964/wusb54gwc7.jpg

TIA!

level
03-24-2008, 01:58 AM
bloody,

You don't really need to use wpa_supplicant for your card. With the driver on BT you just need a few commands.

There are a few threads on the forum about this, here is one:

http://forums.remote-exploit.org/showthread.php?t=8423&highlight=wusb54g

bloody
03-24-2008, 04:26 AM
Hi Level,
I'm not sure if I should continue in that treath or the other...
I read it several times and I tried to run it, but as I am using a LiveCD there is no option for me to update everytime I start BackTrack the drivers.
Doing the suggested options doesnt work for me, eventually rausb0 is down after all, or just nothing happens! Sometimes it locks up, but nothing more :/
I started to play with the rt73 but it doesnt work either :/
I'm trying all this with BT3 LiveCD, any more ideas or details on how to get it poppin :D?

TIA

goldmax
05-08-2008, 10:10 PM
hello all my friend , i have installed the bt2 in my hard disk according to the dual boot with the windows xp ,,no problem with that at all..also i have successfully installed the proper driver for my ati vga card..no problem at all ...every things worked like charm..but the problem is..when i configure the setting of my network card :ip address . netmask...dns...and i reboot the system..the BT2 back to its default configure..ie: detecting the dhcp and all my previous network card settings are disappeared..so i re-iput the settings another time..
my question is : is there any way to make bt2 remember the last settings of the network card? and not boot in dhcp method?

linuxer314
05-09-2008, 02:12 PM
to madwifi driver 4 wpa_Supplicant, it's simple...
download from some slackware packet site (i can't post a url yet) and install it....
then uninstall wpa_supplicant whit bt:#pkgtool
then google 4 wpa supplicant, download the source from the wpa_supplicant homepage, and extract in a directory....
ok now:

cd /place/to/wpa_supplicant
cp defconfig .config

then you have a .config file that we have to modify my .config file is:
# Driver interface for Host AP driver
CONFIG_DRIVER_HOSTAP=y

# Driver interface for Agere driver
#CONFIG_DRIVER_HERMES=y
# Change include directories to match with the local setup
#CFLAGS += -I../../hcf -I../../include -I../../include/hcf
#CFLAGS += -I../../include/wireless

#Driver interface for madwifi driver
CONFIG_DRIVER_MADWIFI=y
#Change include directories to match with the local setup
CFLAGS += -I/usr/include/madwifi

# Driver interface for Prism54 driver
# (Note: Prism54 is not yet supported, i.e., this will not work as-is and is
# for developers only)
#CONFIG_DRIVER_PRISM54=y

# Driver interface for ndiswrapper
#CONFIG_DRIVER_NDISWRAPPER=y

# Driver interface for Atmel driver
CONFIG_DRIVER_ATMEL=y

# Driver interface for Broadcom driver
#CONFIG_DRIVER_BROADCOM=y
# Example path for wlioctl.h; change to match your configuration
#CFLAGS += -I/opt/WRT54GS/release/src/include

# Driver interface for Intel ipw2100/2200 driver
#CONFIG_DRIVER_IPW=y

# Driver interface for generic Linux wireless extensions
CONFIG_DRIVER_WEXT=y

# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include
#LIBS += -L/usr/local/lib

# Driver interface for Windows NDIS
#CONFIG_DRIVER_NDIS=y
#CFLAGS += -I/usr/include/w32api/ddk
#LIBS += -L/usr/local/lib
# For native build using mingw
#CONFIG_NATIVE_WINDOWS=y
# Additional directories for cross-compilation on Linux host for mingw target
#CFLAGS += -I/opt/mingw/mingw32/include/ddk
#LIBS += -L/opt/mingw/mingw32/lib
#CC=mingw32-gcc
# By default, driver_ndis uses WinPcap for low-level operations. This can be
# replaced with the following option which replaces WinPcap calls with NDISUIO.
# However, this requires that WZC is disabled (net stop wzcsvc) before starting
# wpa_supplicant.
# CONFIG_USE_NDISUIO=y

# Driver interface for development testing
#CONFIG_DRIVER_TEST=y

# Driver interface for wired Ethernet drivers
CONFIG_DRIVER_WIRED=y

# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is
# included)
CONFIG_IEEE8021X_EAPOL=y

# EAP-MD5
CONFIG_EAP_MD5=y

# EAP-MSCHAPv2
CONFIG_EAP_MSCHAPV2=y

# EAP-TLS
CONFIG_EAP_TLS=y

# EAL-PEAP
CONFIG_EAP_PEAP=y

# EAP-TTLS
CONFIG_EAP_TTLS=y

# EAP-FAST
# Note: Default OpenSSL package does not include support for all the
# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL,
# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch)
# to add the needed functions.
#CONFIG_EAP_FAST=y

# EAP-GTC
CONFIG_EAP_GTC=y

# EAP-OTP
CONFIG_EAP_OTP=y

# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
#CONFIG_EAP_SIM=y

# EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
#CONFIG_EAP_PSK=y

# EAP-PAX
#CONFIG_EAP_PAX=y

# LEAP
CONFIG_EAP_LEAP=y

# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
#CONFIG_EAP_AKA=y

# EAP-SAKE
#CONFIG_EAP_SAKE=y

# EAP-GPSK
#CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
#CONFIG_EAP_GPSK_SHA256=y

# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y

# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine.
CONFIG_SMARTCARD=y

# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
#CONFIG_PCSC=y

# Development testing
#CONFIG_EAPOL_TEST=y

what you had to modify is CFLAGS += -I/usr/include/madwifi
that indicate the directory in wich you have madwifi driver installed (you can simply search it with console typing "locate madwifi")

ok then after the change, save .config
and
type

.config
make
make all


finally reboot (isn't necessary but do it)
and then you will able to use

wpa_supplicant -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf

p.s. modify also wpa_supplicant.conf with your network parameters.

Mclovin
05-24-2008, 09:54 PM
I have the same problem as the outher guy's.
i went to slackware's site and tried looking there
come to find out there is no rc.inet1 or rc.inet2
no rc.modules
no /etc/rc.d/rc.inet1.conf
on my ISO so........ mabey its the copy I burned mabey:confused:
never had so many problems with pulling an ip
I even think it told me i dident have permison to something (logged in as root)

thedark1
06-02-2008, 03:23 PM
anyone stuck with adapters switching names at reboots or how to assign static ips that will stick, search for a thread called "getting some settings to stick" in the newbie section.for some anal reason this friggin forum won't even let me post url to the topics inside it, so you'll have to find that thread with the forum search feature.

amidamaru
06-25-2008, 08:37 AM
Network Interfaces.

So you have Backtrack running installed on a HDD, you can now configure your cards to use the network. You can also do this exactly the same if you are running the distro from the CD, but your settings will not be saved as the CD is a read only medium. There are plenty of different ways to configure these wired cards and plenty of tools to do it. What I am showing here is the generic Linux commands which should be the same for other distro's.

To turn on your ethernet network card (LAN):

ifconfig eth0 up

The eth0 is the name of the card, this could change depending on what hardware you have installed. To get a list of all adapters:

ifconfig -a

This will list all (-a) interfaces.

To get DHCP to assign a network address automatically from the DHCP server:

dhcpcd eth0

This will run it only on eth0, if you omitted the interface you would run the DHCP discovery process on all compatible cards.

NOTE: Auditor has a script called 'pump' which will do the same process.

Then check if you have an address:

ifconfig eth0

You should see an IP address in there somewhere.


If you want a static IP address instead of a dynamic one:

ifconfig eth0 192.168.1.2

Or whatever IP you want! If you want a variable subnet mask (beyond the scope of this thread!):

ifconfig eth0 192.168.1.2 netmask 255.255.255.224


To manually add a default gateway:

route add default gw 192.168.1.1 eth0

Of course you would replace the IP address with your default gateways, also the eth0 interface is not always needed!


To manually assign your DNS servers:

echo nameserver 192.168.1.1 > /etc/resolv.conf
echo nameserver 212.135.1.36 >> /etc/resolv.conf

Note that the first line will OVERWRITE (>) the resolv.conf file, the second command will APPEND (>>) 'nameserver 212.135.1.36' onto the end of it!


All of this may have been done for you automatically with DHCP anyway, so to check:

cat /etc/resolv.conf

This will display to you the contents of the /etc/resolv.conf file.


To change your DHCP address if it has already been assigned you need to delete the DHCP file assigned to the card:

rm /etc/dhcpc/dhcpcd-eth0.pid

Although that may change based on the interfaces you have!

Then run the dhcpcd command again.

I will post generic instructions for wireless cards soon.

Hope this helps the new guys!

later,

Thank you very much my friend ;)

markian
07-08-2008, 04:12 PM
Thank you very much..
:)

markian
07-08-2008, 11:38 PM
Honestly I just commented out that section of code in /etc/rc.d/rc.inet1 like this:


#! /bin/sh
# /etc/rc.d/rc.inet1
# This script is used to bring up the various network interfaces.
#
# Modified for SLAX by Tomas M. <htt*://slax.linux-live.org>
#
# /proc/cmdline 'nodhcp' option added by Martin J. Muench <mjm@remote-exploit.org>

if [ "$1" = "start" -o "$1" = "" ]; then

ifconfig lo down 2>/dev/null
/sbin/ifconfig lo 127.0.0.1 2>/dev/null
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo 2>/dev/null

# check if 'nodhcp' was set
# if ! grep -w -q "nodhcp" /proc/cmdline ; then
#
# for eth in `ls /sys/class/net | grep -v sit`; do
# check if dhcpcd is not already running for $eth interface,
# in that case it was started by hotplug so don't start it again
# if [ "$eth" != "lo" -a ! -e /etc/dhcpc/dhcpcd-$eth.pid ]; then
# echo "/sbin/dhcpcd -d -t 10 $eth"
# /sbin/dhcpcd -d -t 10 $eth
# fi
# done
# fi

fi




Thanks it works fine..

TeK_KeN
10-21-2008, 06:02 AM
thanks!
really useful tutorial.

justin24lee
10-30-2008, 12:42 PM
I posted a question on how can I get my wireless card to connect to a WPA equipped router. After messing around, I have finally found a working configuration, hopefully anyone that has this problem it will be cleared up.

Okay, I have an Atheros AR5007 wireless card. I am trying to connect to the router in my living room which has WPA set on it.

1. Type iwconfig to see what interfaces you have. For me it says ath0.
2. Type iwlist ath0 scanning. This scans for networks, now look for the one you want to connect to and get the ESSID number.
3. Now go to your file manager(Konqueror). Click the green up arrow. This brings up your folders.
4. Find the one that says etc and click it.
5. Scroll down and look for wpa_supplican.conf, for me this is the last folder.
6. Open the folder and look for an area that says:

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=0
ssid="THIS IS WHERE YOU PUT THE ESSID NUMBER FROM THE SCAN"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk="THIS IS WHERE YOU PUT THE PASSWORD"
}

*Note:For me, where it says psk= there was no quotation marks. I cleared everything up to the equals sign and put "my password", yes include the quotation marks, but put in your password.

7. Click Save.
8. Go back to the shell and type this:
wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant.conf -B
*Note: where it says -iath0, put -i and then whatever interface you have(eth0, ath0, wifi0) the -B is so when you close the Shell the command will still run in the background.
9. Type ifconfig ath0(or whatever interface you have)
10. Look to where it says ESSID. It should say the ESSID that you put in the wpa_supplicant.conf file.
11. When you type ifconfig ath0 and it doesn't show an IP address then you have to get one.
12. Type in dhcpcd ath0(or your interface)
13 Type ifconfig ath0, it should have an IP address.

If so then pat yourself on the back, you are now connected to the router and can surf the internet.

If that didn't work for you, I am sorry, this was based on what I have done to get around the problem I was having, hope this was helpful.