Nice, Is the script /etc/init.d/wpa-ifupdown suppos to handel wpa wifi connections in a similar way ?
This is always a huge topic and it seems simple to many of us but the fact of the matter is we have a lot of "new" people so we need to be clear about this sort of thing. (Note all commands should be run as root or with sudo)
1. To start networking in Backtrack 4 final issue the following command.
/etc/init.d/networking start
This will attempt to start all the interfaces in the /etc/network/interfaces file.
root@bt:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
If you don't have or don't want some of these interfaces then simply remove the from this file and they will not start.
If you need to set a static IP just set the variables in the /etc/network/interfaces file
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
You will also need to make sure you set a nameserver in /etc/resolv.conf
root@bt:~# cat /etc/resolv.conf
nameserver 192.168.0.1
So for example if all you have is eth0 and wlan0 on your system and you want them both to get a adress via DHCP then remove every thing else for the file with the exception of the lo interface. Here is a example.
root@bt:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
Now if are lazy and want all this to start at boot you can simply issue this command as root
update-rc.d networking defaults
This will create all the proper sym-links
What about ssh?
So while I am on the subject I may as well go over ssh. In order to use ssh on backtrack 4 final you need to generate the keys first.
sshd-generate
after that you can start ssh like this:
/etc/init.d/ssh start
or you can add it to the boot sequence like this:
update-rc.d ssh defaults
Well thats enough to get up and running. I hope this was somewhat helpful to any one just getting started with backtrack.
Last edited by purehate; 01-17-2010 at 04:55 PM.
Nice, Is the script /etc/init.d/wpa-ifupdown suppos to handel wpa wifi connections in a similar way ?
alternatively, in an 'old school' way of doing things on a Debian-based system, one could run:
#ifup eth0 (or whichever interface you wanna start)
instead of running the startup script "/etc/init.d/networking start" this will load the "/etc/network/interfaces" file as well and take you to the net.
to bring you down and disable the interface type:
#ifdown eth0
rgds,
sl33p
"If you can't describe what you are doing as a process, you don't know what you're doing."
W. Edwards Deming
A quite usefull post.Thanx![]()
Hey thanks again pure. I've been wondering about the ssh but tend to get sidetracked with everything else.lol
Just too many shiny things keep distracting me http://www.backtrack-linux.org/forum...ilies/wink.gif and the need hasn't been important enough yet I suppose.
for connections and GUI tools you could start "wicd Network Manager"
# /etc/init.d/wicd start
then use wicd-client to configure your wireless interface(s) look under the [Internet] menu![]()
so is this also still working?
nano /root/.bash_profile
[hit enter then type]:
start-network
[hit ctrl+x then confirm by pressing Y, then enter]
I'm running into some difficulties - I think my networking script is caught in a loop. I just overwrote Ubuntu with Backtrack, and Ubuntu was connecting fine to my wireless, and so is my roommate, so I know my wireless is working. In my interfaces file I have wlan0 declared. When I run the command /etc/init.d/networking start I get this output:
Is there any particular IP address my nameserver in resolv.conf should be set to? It was set to 4.2.2.2 and I reset it to the IP address used in this tutorial.Code: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/******************* Sending on LPF/eth0/*************** Sending on Socket/fallback DHCPRELEASE on eth0 to 192.168.1.2 port 67 send_packet: Network is unreachable send_packet: please consult README file regarding broadcast address. 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/*********** Sending on LPF/eth0/************ Sending on Socket/fallback DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13 DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 No DHCPOFFERS received. No working leases in persistent database - sleeping. 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/wlan0/00:13:02:27:c5:f3 Sending on LPF/wlan0/00:13:02:27:c5:f3 Sending on Socket/fallback DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
When I run ifconfig wlan0 I get this output:
Any advice would be much appreciated - thanks!Code:wlan0 Link encap:Ethernet HWaddr **************** UP BROADCAST MULTICAST MTU:1500 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:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Last edited by Bashar; 01-21-2010 at 06:41 PM. Reason: removing mac address
Its a friendly suggestion but id read up on networking a bit, regardless tho your resolv.conf needs to set to an ip thats going to be able resolve your dns requests ... not a box with an internal ip on Hate's network.
Also im not sure where you got that bash_profile command from since i dont see anyone else mention it, but all it does is start wicd .. "cat /usr/bin/start-network" and see
If you want wicd on boot .. do "/etc/init.d/wicd start" load the gui make sure its setup the way you want then "update-rc.d wicd defaults" and it will load for you from now on .. to remove it do "update-rc.d -f wicd remove"
In the end tho it comes down to this .. if your on a wired network just do, "ifconfig eth0 up ; dhclient eth0" and thats all there is to it .. unless you have dhcp off, and in that case just "man ifconfig" which is what you should be doing anyways![]()
Ok I'm having a problem here.
My wireless card is : Atheros Communications Inc. AR5001 Wireless Network Adapter
Ok I booted backtrack 4 in VirtualBox, when I type ifconfig -a it shows only "lo" and "eth0", if I type "dhclient eth0" it gets me an IP from my wireless router and internet works. Backtrack sees it as a wired connection and it doesn't see my wireless card in "lspci" but if I restart my computer and boot with BT CD I can't get wireless to work whenever I type "dhclient wlan0 , eth0" It sais "DHCLIENT on wlan0 from 255.255.255.255 interval 07" or something like that.
A little help would be nice ...
I'm having a little problem with configuring my wireless on BT4.
When I boot BT on Virtual BOX it doesn't recognice my wireless but I can connect VIA eth0 (dhclient eth0 works) it sees it as a wired connection even tough it is wireless, but that's not the problem when I restart and boot on bt cd internet doesn't work, dhclient doesn't work but this time it sees my wireless card in "lspci"
(I've been trying to post this for 1 week and it still sais that some moderator needs to check it)
Last edited by Archangel-Amael; 01-31-2010 at 11:30 PM.