DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th July 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default Can I connect to unprotected Wifi?

Hello. I would like to connect to unprotected Wifi. I am aware of risk of this.
My operating system:
Code:
kern.version=OpenBSD 6.1-current (GENERIC.MP) #73: Sat Jul  1 10:53:54 MDT 2017
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
I have said unprotected. I mean by this lack of WEP/WPA/WPA2, basically anything based on cryptography to authenticate and authorize access. This network restricts access based on MAC addresses, but my MAC is added by admin of this public network. I can connect to this network from the same laptop using Windows operating system, so this is not hardware problem.
I have Wifi network device supported by iwn(4) driver.
Fun thing is that I managed to connect to WPA2-Personal without any problems, but I am stuck at connecting to unprotected Wifi.

I would like to anonymise at least some info, but if you think I censor too much tell me about this.

I see the network existence via command (nwid name is altered, but really contains spaces):
Code:
# ifconfig iwn0 scan
                nwid "word1 space word2" chan 6 bssid 80(censored)e5 -49dBm HT-MCS23 short_preamble,short_slottime
but there are other Wifi networks with the same nwid (they are legitimate, there are several APs to this network).

I have instructed iwn(4) driver to connect to this network by this file:
Code:
# cat /etc/hostname.iwn0                                                       
media autoselect mode 11n
nwid "word1 space word2"
dhcp
This gives me:
Code:
# ifconfig iwn0
iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 00:(censored):cc
	index 2 priority 4 llprio 3
	groups: wlan
	media: IEEE802.11 autoselect (DS1 mode 11g)
	status: no network
	ieee80211: nwid "word1 space word2" chan 6 bssid 80:(censored):e5 -49dB
Some info from Windows when connected to this Wifi network:

Code:
ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : (censored)
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : (censored).pl

Wireless LAN adapter Wi-Fi 2:

   Connection-specific DNS Suffix  . : (censored).pl
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6200 AGN
   Physical Address. . . . . . . . . : 00-(censored)CC
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::(censored)2263%30(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.(censored).136(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.128
   Lease Obtained. . . . . . . . . . : 5 7 2017 22:15:19
   Lease Expires . . . . . . . . . . : 5 7 2017 22:25:17
   Default Gateway . . . . . . . . . : 10.(censored).129
   DHCP Server . . . . . . . . . . . : 10.(censored).0
   DHCPv6 IAID . . . . . . . . . . . : 5(censored)6
   DHCPv6 Client DUID. . . . . . . . : 00-(censored)-70

   DNS Servers . . . . . . . . . . . : 10.(censored).129
                                       212.(censored).177
   NetBIOS over Tcpip. . . . . . . . : Enabled
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase

Last edited by e1-531g; 16th July 2017 at 05:57 AM.
Reply With Quote
  #2   (View Single Post)  
Old 6th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

The status: no network indicates that there is no connection with the Access Point. This can occur for a number of reasons. Some that I can think of include:
  • missing firmware
  • an uncleared preexisting wpakey or nwkey
  • selecting the wrong WiFi channel
I can exclude firmware, since you stated you can connect to a WPA2 network. I can exclude an uncleared key, since I don't see one in your ifconfig(8) output.

That leaves channel 6, and your -49dB connection, as the likely problem.

Scan the network, pick out a better channel for the Access Point, and set it in your hostname.iwn0 file.

Last edited by jggimi; 6th July 2017 at 05:06 PM. Reason: typo
Reply With Quote
  #3   (View Single Post)  
Old 6th July 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

I tried, but OpenBSD can not connect also on other channels. I tried both 2,4Ghz and 5,2Ghz channels.

I have named this thread that way because maybe (just maybe) it is related to hardening of OpenBSD 802.11 stack (or maybe not):
Code:
   - IEEE 802.11 wireless stack improvements:
      o TKIP/WPA1 was disabled by default because of inherent weaknesses
        in this protocol.
I have attached html file generated by WifiInfoView running inside Windows OS connected to this network. It contains wireless networks list. I want to connect to "word1 space word2".
Attached Files
File Type: html report_when_connected.html (30.2 KB, 14 views)
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
  #4   (View Single Post)  
Old 6th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

Quote:
Originally Posted by e1-531g View Post
...maybe (just maybe) it is related to hardening of OpenBSD 802.11 stack ...
That is not the problem. Your open network is open, it is not using WPA.
Quote:
I want to connect to "word1 space word2".
Then this is most likely the problem. As you have obfuscated content, it is difficult for me to determine the root cause, so instead I will point you to the hostname.if(5) man page, which states:
Quote:
Arguments containing either whitespace or single quote characters must be double quoted.
It also states:
Quote:
Any lines not matching these packed formats are passed directly to ifconfig(8). The packed formats are converted using a somewhat inflexible parser and the administrator should not expect magic — if in doubt study ifconfig(8) and the per-driver manual pages to see what arguments are permitted.
If it were me, I would manually issue ifconfig(8) commands to provision the network interface. Or take your laptop to a cafe where their open WiFi networks do not include spaces, to confirm it is a space-parsing issue.
Reply With Quote
  #5   (View Single Post)  
Old 6th July 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

For now I can connect via cable, so it is not a big deal at the moment.
I am going to experiment a little bit with my router and OpenBSD (set up the same nwid and see what happens) when I come back to my place, but my place is in another city where I plan to arrive next week.
I can tell:
1. All characters inside nwid are ascii characters,
2. 5 upper case characters,
3. 6 lower case characters,
4. 1 digit,
5. All the above characters are forming three words,
6. Between these three words there are two spaces.

I am going to update this thread in 10 days.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
  #6   (View Single Post)  
Old 6th July 2017
Funkygoby Funkygoby is offline
Port Guard
 
Join Date: Aug 2015
Posts: 26
Default

I have read somewhere (in the man?) that the last used password is kept in memory and that you need to pass -wpakey so that ifconfig will connect without password.
Anyway this works for me and if I need to connect to the open wifi of the laundry with my intel wifi card I use:
Code:
# ifconfig iwn0 nwid laundryHotspot -wpakey up
# dhcp
Reply With Quote
  #7   (View Single Post)  
Old 6th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

Yes, Funky, keys (wpakey/nwkey) are retained until changed or removed. However, the ifconfig(8) output in the top post does not show either key type was provisioned at the time.
Reply With Quote
  #8   (View Single Post)  
Old 7th July 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 529
Default

Out of curiosity, even though it's open, is it a hidden wireless network? I've found problems when using hidden wireless networks.
Reply With Quote
  #9   (View Single Post)  
Old 15th July 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

I have my router until tomorrow's evening. This is the router I connected to, when I mentioned connecting to WPA2-Personal network. This time I have disabled WEP/WPA/WPA2. I have changed name to the same as troublesome open Wifi network and it works. This is the same snapshot of the system (I have not updated). It seems that name with spaces is not the issue.
I still would try to see whether names are the same (maybe nonprintable ASCII character?), but I begin to doubt that the name of network is the issue here.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase

Last edited by e1-531g; 16th July 2017 at 12:04 AM.
Reply With Quote
Old 17th July 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

I have tried to inspect name of network with hexedit, but I don't see anything unusual. I experimented with name anyway and added Windows-like ending inside double quote, but still there is no network.
Can OpenBSD handle roaming Wifi networks? It is a one big wireless network inside multiple floor building. There are several APs to this network with the same SSID, but different BSSIDs.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 17th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

Quote:
Originally Posted by e1-531g View Post
Can OpenBSD handle roaming Wifi networks?
Yes. And on the host side, it's been supporting 802.11f Inter Access Point Protocal since 2005 with hostapd(8). (Developed in 2004 at 21c3, then integrated in 2005.)

You might find tcpdump(8) helpful to a detailed diagnosis -- it can log 802.11 traffic -- beacons, replies, etc.
Reply With Quote
Old 17th July 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

It seems that AP doesn't reply to my authentication request.

Man page about iwn driver say:
Code:
CAVEATS
     802.11n operation is currently limited to data rates MCS 0 to MCS 7.
Can this cause my problems?
Attached Files
File Type: txt fragment.txt (34.6 KB, 9 views)
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 17th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

No, because you're not using 802.11n. From your first post:
Code:
media: IEEE802.11 autoselect (DS1 mode 11g)
Reply With Quote
Old 2nd August 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

Hmm. I wanted to access the network via Ethernet cable in other room of the same network. It seems it doesn't work too. It still does work when I am using Windows operating system. Does anyone has any concept, idea what may cause it?
Update:
Code:
#ifconfig bge0
bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
	lladdr b8:88:e3:d3:08:70
	index 1 priority 0 llprio 3
	media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
	status: active
dhclient bge0 produces something like (I did not captured this via stdout redirection, so I am writing this from my brain memory):
Code:
bge0: no link.... sleeping
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase

Last edited by e1-531g; 2nd August 2017 at 06:53 PM.
Reply With Quote
Old 2nd August 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

You have different problems, even if they have the same root cause.
  • On WiFi, you are unable to connect with the Access Point to establish Ethernet connectivity.
  • On wired Ethernet, you have Ethernet connectivity (status: active) but are unable to communicate with a DHCP server.
Reply With Quote
Old 15th August 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

I have probably messed with bge0 status before posting provious ifconfig for this interface. Now I have:
Code:
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr b8:88:e3:d3:08:70
	index 1 priority 0 llprio 3
	media: Ethernet autoselect (none)
	status: no carrier
I was not touching cable and restarted to Windows and I have connectivity, so this is not a cable related issue.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 15th August 2017
e1-531g e1-531g is offline
VPN Cryptographer
 
Join Date: Mar 2014
Posts: 354
Default

I tried also booting from bsd.rd. iwn0 is not connecting, because of firmware. Bge0 should work, but it does not and displays similar (if not the same) message as previous (status: no carrier).
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 15th August 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,891
Default

"No carrier" is an indicator that the NIC's PHY is unable to connect to your wired Ethernet. Your statement that "it works in Windows" indicates that the problem is either an intermittent hardware problem, or a driver problem.

You might consider posting your complete dmesg.
Reply With Quote
Reply

Tags
openbsd, wifi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to wifi networks without GUI spermwhale_warrior NetBSD Installation and Upgrading 6 24th November 2015 07:27 PM
connect to OpenBSD BOX with VNC mfaridi OpenBSD General 9 14th April 2010 08:38 PM
connect to openbsd box (ssh) milo974 Other BSD and UNIX/UNIX-like 4 3rd January 2009 02:44 AM
FTP-Proxy cannot connect plexter OpenBSD Packages and Ports 6 11th October 2008 05:59 PM
wpa_supplicant won't connect to AP adamk FreeBSD General 4 24th September 2008 08:09 AM


All times are GMT. The time now is 08:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick