Jump to content

Cant obtain IP on wlan1


Scrag
 Share

Recommended Posts

Hi there.

Im new to the pineapple. I have my MarkIV updated and I just have one problem. I have an ALFA AWUS036H that I have connected via usb to my pineapple. Im using SymPac's WiFi Connect scrip located in the below forum post. It works great except I get DHCP error, cant obtain lease.

SymPac's WiFi connect script:

http://forums.hak5.org/index.php?/topic/29487-wifi-connect-script/?hl=%2Bwifi+%2Bconnect

root@Pineapple:/pineapple/scripts/wificonnect# ./connect.sh wlan1
Starting on wlan1
Scanning for wifi.
cat: can't open 'blacklist.txt': No such file or directory
Connecting to linksys on channel 6
Requesting IP Address
No lease, failing.
Done.

If I run the command manually it just hangs trying to get an IP like below:

root@Pineapple:/pineapple/scripts/wificonnect# udhcpc -i wlan1
udhcpc (v1.19.4) started
Sending discover...
Sending discover...
Sending discover...

My Alfa gets an IP from my linksys just fine on my backtrack laptop, as does my phone, tablet, and windows PC, so I know its not the linksys.

Any ideas would be greatly appreciated.

Thanks!

Link to comment
Share on other sites

Hi Scrag, please post a copy of /etc/config/wireless for me to look at. Also, if you haven't already, you can try to connect manually with the network manager infusion. If you try the network manager infusion make sure wlan1 network is set to WAN and mode is set to client. Just to confirm, you are on firmware version 2.8.1 correct?

-SymPak

Link to comment
Share on other sites

Hi Scrag, please post a copy of /etc/config/wireless for me to look at. Also, if you haven't already, you can try to connect manually with the network manager infusion. If you try the network manager infusion make sure wlan1 network is set to WAN and mode is set to client. Just to confirm, you are on firmware version 2.8.1 correct?

-SymPak

Thanks for the help SymPak.

The first thing I did was goto networknamager and set my wlan1 to WAN and client. I also have had to manually go here and enable my wlan0 for some reason. My firmware is on 2.8.1. Ive had no trouble withe the built in wlan0 running on its own, or when i use an ethernet port. But using my alfa has been ginving me strange problems. The wificonnect script works fine on wllan0. Anyway, here is my /etc/config/wireless below.

Also to clarify what I would like to do - I want to run the AP part of the pinapple off of the built in wlan0, and then have wlan1/ALFA automatically connect to any availalable wireless connection for the internet.

root@Pineapple:/etc/config# cat wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11ng'
	option macaddr '00:c0:ca:68:45:96'
	option htmode 'HT20'
	list ht_capab 'SHORT-GI-20'
	list ht_capab 'SHORT-GI-40'
	list ht_capab 'RX-STBC1'
	list ht_capab 'DSSS_CCK-40'
	option disabled '0'
	option channel '6'

config wifi-iface
	option device 'radio0'
	option hidden '0'
	option ssid 'linksys'
	option mode 'sta'
	option network 'wan'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11g'
	option macaddr '00:c0:ca:6c:f6:6f'
	option disabled '0'
	option channel '10'

config wifi-iface
	option device 'radio1'
	option network 'wan'
	option hidden '0'
	option ssid 'pinapple'
	option mode 'ap'

root@Pineapple:/etc/config# 


Thanks Again.

Scrag

Link to comment
Share on other sites

Ok lets try running the script again on wlan1. After it completes either check the system log under the logs tab in the web interface or run dmesg in a terminal. That should give us a good indication of what is happening.

Link to comment
Share on other sites

Ok lets try running the script again on wlan1. After it completes either check the system log under the logs tab in the web interface or run dmesg in a terminal. That should give us a good indication of what is happening.w

Hmmmmm...ok. Well now wlan1 works fine, script works fine. I have an IP address. But now wlan0 doesnt broadcast an SSID. Also, if Iaunch Karma from the web console it doesnt start. Also while I was trying to get a few things going I noticed a hostapd error message. I clicked it out before I had a chance to save it though :(

Here is my log.


| Status | Configuration | Advanced | USB | Jobs | 3G | SSH | Scripts | Logs | Upgrade | Resources | Pineapple Bar | About |
networkmanager | sslstrip | nmap


DNS Spoof Log (refresh)


Phishing log (refresh)



System Log (refresh)
23:30:01 Pineapple user.notice root: CLEANUP: memory below threshold, dropping pagecache, dentries and inodes
23:30:01 Pineapple user.notice root: CLEANUP: Karma log looking good
23:30:01 Pineapple user.notice root: CLEANUP: Clean-up Script Executed
23:30:01 Pineapple cron.info crond[1509]: crond: USER root pid 2119 cmd /pineapple/infusions/logcheck/logcheck_report.sh
23:30:01 Pineapple cron.info crond[1509]: crond: USER root pid 2118 cmd /pineapple/scripts/cleanup.sh
23:28:58 Pineapple authpriv.notice dropbear[2043]: Password auth succeeded for 'root' from 192.168.20.136:41852
23:28:48 Pineapple authpriv.info dropbear[2043]: Child connection from 192.168.20.136:41852
23:28:36 Pineapple daemon.warn dnsmasq-dhcp[1601]: no address range available for DHCP request via wlan1
23:28:36 Pineapple daemon.warn dnsmasq-dhcp[1601]: no address range available for DHCP request via wlan1
23:28:36 Pineapple daemon.warn dnsmasq-dhcp[1601]: no address range available for DHCP request via eth1
23:28:36 Pineapple daemon.warn dnsmasq-dhcp[1601]: no address range available for DHCP request via eth1
23:28:36 Pineapple daemon.warn dnsmasq-dhcp[1601]: DHCP packet received on wlan0 which has no address
23:28:36 Pineapple daemon.warn dnsmasq-dhcp[1601]: DHCP packet received on wlan0 which has no address
23:28:35 Pineapple daemon.info dnsmasq[1601]: using nameserver 8.8.8.8#53
23:28:35 Pineapple daemon.info dnsmasq[1601]: using nameserver 192.168.20.1#53
23:28:35 Pineapple daemon.info dnsmasq[1601]: using local addresses only for domain lan
23:28:35 Pineapple daemon.info dnsmasq[1601]: reading /tmp/resolv.conf.auto
23:27:39 Pineapple cron.err crond[1509]: time disparity of 22828286 minutes detected
23:27:00 Pineapple user.notice ifup: Allowing Router Advertisements on wan (eth1)
00:01:22 Pineapple daemon.notice netifd: Interface 'wan' is now up
00:01:21 Pineapple daemon.warn dnsmasq-dhcp[1601]: no address range available for DHCP request via wlan1
00:01:21 Pineapple daemon.warn dnsmasq-dhcp[1601]: no address range available for DHCP request via wlan1
00:01:21 Pineapple daemon.warn dnsmasq-dhcp[1601]: DHCP packet received on wlan0 which has no address
00:01:21 Pineapple daemon.warn dnsmasq-dhcp[1601]: DHCP packet received on wlan0 which has no address
00:01:21 Pineapple daemon.notice netifd: wan (909): Sending select for 192.168.20.156...
00:01:21 Pineapple daemon.notice netifd: wan (909): Lease of 192.168.20.156 obtained, lease time 172800
00:01:21 Pineapple daemon.info dnsmasq[1601]: using nameserver 8.8.8.8#53
00:01:21 Pineapple daemon.info dnsmasq[1601]: using local addresses only for domain lan
00:01:21 Pineapple daemon.info dnsmasq[1601]: reading /tmp/resolv.conf.auto
00:01:14 Pineapple user.info sysinit: udhcpc: setting default routers: 192.168.20.1
00:01:14 Pineapple user.info sysinit: udhcpc: ifconfig wlan1 192.168.20.157 netmask 255.255.255.0 broadcast +
00:01:14 Pineapple user.info sysinit: sh: write error: Invalid argument
00:01:14 Pineapple user.info sysinit: setting up led WLAN
00:01:14 Pineapple user.info sysinit: setting up led WAN
00:01:14 Pineapple user.info sysinit: setting up led USB
00:01:14 Pineapple user.info sysinit: setting up led LAN
00:01:14 Pineapple user.info sysinit: Sending select for 192.168.20.157...
00:01:14 Pineapple user.info sysinit: Sending discover...
00:01:14 Pineapple user.info sysinit: Lease of 192.168.20.157 obtained, lease time 172800
00:01:14 Pineapple daemon.warn dnsmasq-dhcp[1601]: DHCP packet received on wlan0 which has no address
00:01:14 Pineapple daemon.warn dnsmasq-dhcp[1601]: DHCP packet received on wlan0 which has no address
00:01:12 Pineapple kern.info kernel: [ 72.600000] wlan0: associated
00:01:12 Pineapple kern.info kernel: [ 72.590000] wlan0: associate with 00:13:10:81:1b:66 (try 1/3)
00:01:12 Pineapple kern.info kernel: [ 72.590000] wlan0: RX AssocResp from 00:13:10:81:1b:66 (capab=0x401 status=0 aid=2)
00:01:12 Pineapple kern.info kernel: [ 72.580000] rtl8187 1-1:1.0: wlan0: disabling VHT as WMM/QoS is not supported by the AP
00:01:12 Pineapple kern.info kernel: [ 72.570000] rtl8187 1-1:1.0: wlan0: disabling HT as WMM/QoS is not supported by the AP
00:01:12 Pineapple kern.info kernel: [ 72.560000] wlan0: send auth to 00:13:10:81:1b:66 (try 1/3)
00:01:12 Pineapple kern.info kernel: [ 72.560000] wlan0: authenticated
00:01:12 Pineapple kern.info kernel: [ 72.320000] wlan0: authenticate with 00:13:10:81:1b:66
00:01:11 Pineapple user.info sysinit: udhcpc (v1.19.4) started
00:01:11 Pineapple user.info sysinit: Sending discover...
00:01:11 Pineapple user.info sysinit: Failed to connect to hostapd - wpa_ctrl_open: No such file or directory
00:01:10 Pineapple user.info sysinit: Command failed: Operation not supported
00:01:07 Pineapple user.info sysinit: command failed: Operation not supported (-122)
00:01:07 Pineapple user.info sysinit: command failed: Device or resource busy (-16)
00:01:07 Pineapple kern.info kernel: [ 67.160000] wlan1: associated
00:01:07 Pineapple kern.info kernel: [ 67.150000] wlan1: associate with 00:02:6f:91:d8:6c (try 1/3)
00:01:07 Pineapple kern.info kernel: [ 67.150000] wlan1: RX AssocResp from 00:02:6f:91:d8:6c (capab=0xc21 status=0 aid=3)
00:01:07 Pineapple kern.info kernel: [ 67.130000] wlan1: authenticated
00:01:07 Pineapple kern.info kernel: [ 67.120000] wlan1: send auth to 00:02:6f:91:d8:6c (try 1/3)
00:01:07 Pineapple kern.info kernel: [ 67.100000] wlan1: authenticate with 00:02:6f:91:d8:6c
00:01:06 Pineapple user.info sysinit: Command failed: Operation not supported
00:01:05 Pineapple user.info sysinit: command failed: Device or resource busy (-16)
00:01:04 Pineapple kern.info kernel: [ 64.960000] wlan0: deauthenticating from 00:13:10:81:1b:66 by local choice (reason=3)
00:01:04 Pineapple kern.info kernel: [ 64.700000] wlan1: deauthenticating from 00:02:6f:91:d8:6c by local choice (reason=3)
00:01:04 Pineapple daemon.info dnsmasq[1601]: using nameserver 8.8.8.8#53
00:01:04 Pineapple daemon.info dnsmasq[1601]: using local addresses only for domain lan
00:01:04 Pineapple daemon.info dnsmasq[1601]: using local addresses only for domain lan
00:01:04 Pineapple daemon.info dnsmasq[1601]: started, version 2.62 cachesize 150
00:01:04 Pineapple daemon.info dnsmasq[1601]: reading /tmp/resolv.conf.auto
00:01:04 Pineapple daemon.info dnsmasq[1601]: read /etc/hosts - 1 addresses
00:01:04 Pineapple daemon.info dnsmasq[1601]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack
00:01:04 Pineapple daemon.info dnsmasq-dhcp[1601]: read /etc/ethers - 0 addresses
00:01:04 Pineapple daemon.info dnsmasq-dhcp[1601]: DHCP, IP range 172.16.42.100 -- 172.16.42.249, lease time 12h
00:01:01 Pineapple user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
00:01:01 Pineapple user.notice dnsmasq: Allowing 127.0.0.0/8 responses
00:00:58 Pineapple kern.info kernel: [ 58.760000] wlan0: associated
00:00:58 Pineapple kern.info kernel: [ 58.750000] wlan0: associate with 00:13:10:81:1b:66 (try 1/3)
00:00:58 Pineapple kern.info kernel: [ 58.750000] wlan0: RX AssocResp from 00:13:10:81:1b:66 (capab=0x401 status=0 aid=2)
00:00:58 Pineapple kern.info kernel: [ 58.740000] rtl8187 1-1:1.0: wlan0: disabling VHT as WMM/QoS is not supported by the AP
00:00:58 Pineapple kern.info kernel: [ 58.730000] rtl8187 1-1:1.0: wlan0: disabling HT as WMM/QoS is not supported by the AP
00:00:58 Pineapple kern.info kernel: [ 58.720000] wlan0: send auth to 00:13:10:81:1b:66 (try 1/3)
00:00:58 Pineapple kern.info kernel: [ 58.720000] wlan0: authenticated
00:00:58 Pineapple kern.info kernel: [ 58.380000] wlan0: authenticate with 00:13:10:81:1b:66
00:00:57 Pineapple authpriv.info dropbear[1526]: Running in background
00:00:56 Pineapple user.info sysinit: Command failed: Operation not supported
00:00:56 Pineapple cron.info crond[1509]: crond: crond (busybox 1.19.4) started, log level 5
00:00:52 Pineapple user.info sysinit: command failed: Operation not supported (-122)
00:00:52 Pineapple user.info sysinit: command failed: Device or resource busy (-16)
00:00:52 Pineapple user.info sysinit: Command failed: Operation not supported
00:00:52 Pineapple kern.info kernel: [ 52.720000] wlan1: associated
00:00:52 Pineapple kern.info kernel: [ 52.720000] wlan1: RX AssocResp from 00:02:6f:91:d8:6c (capab=0xc21 status=0 aid=3)
00:00:52 Pineapple kern.info kernel: [ 52.710000] wlan1: associate with 00:02:6f:91:d8:6c (try 1/3)
00:00:52 Pineapple kern.info kernel: [ 52.690000] wlan1: authenticated
00:00:52 Pineapple kern.info kernel: [ 52.680000] wlan1: send auth to 00:02:6f:91:d8:6c (try 1/3)
00:00:52 Pineapple kern.info kernel: [ 52.650000] wlan1: authenticate with 00:02:6f:91:d8:6c
00:00:51 Pineapple daemon.notice netifd: wan (909): Sending discover...
00:00:50 Pineapple user.info sysinit: command failed: Device or resource busy (-16)
00:00:48 Pineapple user.notice ifup: Enabling Router Solicitations on loopback (lo)
00:00:48 Pineapple daemon.notice netifd: wan (909): Sending discover...
00:00:47 Pineapple kern.info kernel: [ 47.170000] eth1: link up (100Mbps/Full duplex)
00:00:46 Pineapple user.notice ifup: Enabling Router Solicitations on lan (br-lan)
00:00:45 Pineapple daemon.notice netifd: wan (909): udhcpc (v1.19.4) started
00:00:45 Pineapple daemon.notice netifd: wan (909): Sending discover...
00:00:44 Pineapple kern.info kernel: [ 44.910000] device eth0 entered promiscuous mode
00:00:44 Pineapple daemon.notice netifd: Interface 'loopback' is now up
00:00:44 Pineapple daemon.notice netifd: Interface 'lan' is now up
00:00:43 Pineapple user.notice usb-modeswitch: 1-1:1.0: Manufacturer=Manufacturer_Realtek_RTL8187_ Product=RTL8187_Wireless Serial=00C0CA6CF66F
00:00:43 Pineapple user.notice usb-modeswitch: 1-0:1.0: Manufacturer=Linux_3.3.8_ehci_hcd Product=Generic_Platform_EHCI_Controller Serial=ehci-platform
00:00:40 Pineapple kern.info kernel: [ 38.760000] usbcore: registered new interface driver rndis_host
00:00:40 Pineapple kern.info kernel: [ 38.530000] usbcore: registered new interface driver cdc_ether
00:00:40 Pineapple kern.info kernel: [ 38.490000] usbserial: USB Serial Driver core
00:00:40 Pineapple kern.info kernel: [ 38.480000] usbcore: registered new interface driver usbserial_generic
00:00:40 Pineapple kern.info kernel: [ 38.480000] USB Serial support registered for generic
00:00:40 Pineapple kern.info kernel: [ 38.470000] usbcore: registered new interface driver usbserial
00:00:40 Pineapple kern.info kernel: [ 38.250000] usbcore: registered new interface driver ath9k_htc
00:00:40 Pineapple kern.info kernel: [ 37.760000] xt_time: kernel timezone is -0000
00:00:40 Pineapple kern.info kernel: [ 37.080000] nf_conntrack version 0.5.0 (458 buckets, 1832 max)
00:00:40 Pineapple kern.info kernel: [ 36.940000] NET: Registered protocol family 24
00:00:40 Pineapple kern.info kernel: [ 36.710000] ip_tables: (C) 2000-2006 Netfilter Core Team
00:00:40 Pineapple kern.info kernel: [ 36.460000] tun: Universal TUN/TAP device driver, 1.6
00:00:40 Pineapple kern.info kernel: [ 36.460000] tun: (C) 1999-2004 Max Krasnyansky
00:00:40 Pineapple kern.info kernel: [ 36.310000] PPP generic driver version 2.4.2
00:00:40 Pineapple kern.info kernel: [ 35.960000] RPC: Registered tcp NFSv4.1 backchannel transport module.
00:00:40 Pineapple kern.info kernel: [ 35.950000] RPC: Registered udp transport module.
00:00:40 Pineapple kern.info kernel: [ 35.950000] RPC: Registered tcp transport module.
00:00:40 Pineapple kern.info kernel: [ 35.940000] RPC: Registered named UNIX socket transport module.
00:00:40 Pineapple kern.info kernel: [ 35.720000] Button Hotplug driver version 0.4.1
00:00:40 Pineapple kern.info kernel: [ 35.610000] usbcore: registered new interface driver rt2800usb
00:00:40 Pineapple kern.info kernel: [ 35.580000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
00:00:40 Pineapple kern.info kernel: [ 35.580000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
00:00:40 Pineapple kern.info kernel: [ 35.570000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
00:00:40 Pineapple kern.info kernel: [ 35.560000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
00:00:40 Pineapple kern.info kernel: [ 35.550000] cfg80211: Regulatory domain changed to country: GB
00:00:40 Pineapple kern.info kernel: [ 35.550000] cfg80211: Calling CRDA for country: GB
00:00:40 Pineapple kern.info kernel: [ 35.550000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
00:00:40 Pineapple kern.info kernel: [ 35.540000] ieee80211 phy1: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
00:00:40 Pineapple kern.info kernel: [ 35.490000] usbcore: registered new interface driver rtl8187
00:00:40 Pineapple kern.info kernel: [ 35.480000] rtl8187: wireless switch is on
00:00:40 Pineapple kern.info kernel: [ 35.480000] rtl8187: Customer ID is 0xFF
00:00:40 Pineapple kern.info kernel: [ 35.450000] ieee80211 phy0: hwaddr 00:c0:ca:6c:f6:6f, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
00:00:40 Pineapple kern.info kernel: [ 35.030000] usbcore: registered new interface driver rt73usb
00:00:40 Pineapple kern.info kernel: [ 33.690000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
00:00:40 Pineapple kern.info kernel: [ 33.680000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
00:00:40 Pineapple kern.info kernel: [ 33.670000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
00:00:40 Pineapple kern.info kernel: [ 33.670000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
00:00:40 Pineapple kern.err kernel: [ 38.650000] Error: Driver 'gpio-keys-polled' is already registered, aborting...
00:00:40 Pineapple kern.debug kernel: [ 35.540000] Registered led device: ath9k-phy1
00:00:40 Pineapple kern.debug kernel: [ 35.530000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
00:00:40 Pineapple kern.debug kernel: [ 35.520000] ath: doing EEPROM country->regdmn map search
00:00:40 Pineapple kern.debug kernel: [ 35.520000] ath: country maps to regdmn code: 0x37
00:00:40 Pineapple kern.debug kernel: [ 35.520000] ath: Regpair used: 0x37
00:00:40 Pineapple kern.debug kernel: [ 35.520000] ath: EEPROM regdomain: 0x833a
00:00:40 Pineapple kern.debug kernel: [ 35.520000] ath: EEPROM indicates we should expect a country code
00:00:40 Pineapple kern.debug kernel: [ 35.520000] ath: Country alpha2 being used: GB
00:00:40 Pineapple kern.debug kernel: [ 35.480000] Registered led device: rtl8187-phy0::tx
00:00:40 Pineapple kern.debug kernel: [ 35.480000] Registered led device: rtl8187-phy0::rx
00:00:40 Pineapple kern.debug kernel: [ 35.480000] Registered led device: rtl8187-phy0::radio
00:00:40 Pineapple kern.debug kernel: [ 35.450000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'



Thanks again for all the help, I know its a lot of info to go through. At least for me anyway :)

Link to comment
Share on other sites

It looks like your wlan0 is still associating with another ap. If wlan0 is still set to client mode it won't broadcast an ssid.

-SymPak

Link to comment
Share on other sites

I tried rebooting and wlan1 comes up fine now with an IP address. wlan0 still wont broadcast an SSID. I have tried changing its mode to AP in the network manager, but it doesnt seem to help. If i reboot again network manager says its a client again.

Link to comment
Share on other sites

Strange. Try this

mv /etc/config/wireless /etc/config/wireless.bak

wifi detect > /etc/config/wireless

wifi

That will rebuild the wireless config file. It isn't necessary to rename the wireless config but I like to do it just in case.

-SymPak

Edited by SymPak
Link to comment
Share on other sites

Well, it got to the point where i cant get wlan0 to broadcast or work at all. Even after disconnecting LAN and ALFA, rebooting multiple times and resetting wireless config it would not work. I reset the pinapple back to factory defaults. Then i setup wlan1 over again and it seems to work like a charm now. I believe the problem was a conflict of the wireless configuration files not jiving with the network manager infusion. Either something got boggled up between the 2 or maybe I just didnt understand what I was doing. Anyway, it works now so im not worried.

Thanks for all the great help!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...