TumbaBit
Posts: 18
Joined: Thu Jan 02, 2014 7:17 pm

Trouble with /etc/host/interfaces

Tue Feb 25, 2014 8:00 pm

I'm currently in the middle of setting up a wireless adapter on my new RPi, but I've encountered a problem. I'm running Kali, a version of Debian, and I want to use the Pi for a little bit of amature security testing on my home wifi (not he one I'm currently connected to). So, as I said I'm setting I'm currently setting up my wireless adapter and I'm editing the /etc/host/interfaces file. According to a tutorial I found online it need to look like this:

Code: Select all

auto lo 
iface lo inet loopback 

auto eth0
iface eth0 inet dhcp 

auto wlan0 
iface wlan0 inet dhcp

wpa-ssid "MySSID"
wpa-psk "MyPASS"
Now first of all this might be wrong, please tell me if it is, but I see another problem with the setup. What I want is to be able to see surrounding networks, test them with aircrack-ng/airmon-ng, all that stuff, without already being connected to a network, just like you can with a normal laptop. So my question is, do I just delete the last two lines? Do I add something else? Or maybe I've gotten a completely wrong tutorial? I hope someone can help me with this. Thanks!

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Trouble with /etc/host/interfaces

Tue Feb 25, 2014 9:04 pm

The settings you have will connect you to MySSID (assuming MyPASS is correct) but will neither help nor hinder your ability to scan and connect to alternative networks. If using the command line you need to investigate iwconfig and iwlist. The following command will show all wifi networks in range of the default wifi interface:

iwlist wlan0 scan

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Trouble with /etc/host/interfaces

Wed Feb 26, 2014 6:00 am

I would take out the quotes.

Here is what I use.

Code: Select all

    auto lo

    iface lo inet loopback
    iface eth0 inet static
    address 10.232.1.81
    netmask 255.255.255.0
    gateway 10.232.1.1


    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet static
    address 10.232.1.99
    netmask 255.255.255.0
    gateway 10.232.1.1
    wpa-passphrase password
    wpa-ssid myssid
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

TumbaBit
Posts: 18
Joined: Thu Jan 02, 2014 7:17 pm

Re: Trouble with /etc/host/interfaces

Wed Feb 26, 2014 6:28 am

Thanks to both of you for replying, but I have one question. What if I don't know the SSID/password? Do I just leave my home wifi connection details in there and connect in some other way? And do I really have to change this file every time D:? Thanks!
Thank you so much for taking your time and helping a newbie along the way :)

ripat
Posts: 191
Joined: Tue Jul 31, 2012 11:51 am
Location: Belgium

Re: Trouble with /etc/host/interfaces

Wed Feb 26, 2014 6:58 am

Not all wireless drivers are capable of entering the raw monitor mode needed for sniffing wireless packets. Check the Kismet or Aircrack compatibility pages.

Reminder: passively sniffing wireless packets on a network that you don't own is not illegal but using the information that you captured to actively probe someone else's network is unlawful. At least in my country.
Using Linux command line usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Return to “Beginners”