DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd July 2013
kimotori kimotori is offline
Port Guard
 
Join Date: Jun 2013
Posts: 17
Default [OK] wpa2-psk

I m frustate.
How to connect ath0 with wpa2?
Im use

Ifconfig ath0 nwid BSD nwkey 1234567890
not connect... is not correct? Yes...

Last edited by kimotori; 6th July 2013 at 09:34 AM.
Reply With Quote
  #2   (View Single Post)  
Old 3rd July 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

You've posted in a NetBSD forum -- your previous posts were regarding OpenBSD.

In both OSes, the nwkey option of ifconfig(8) is to set the key for WEP, not WPA/WPA2.

If you are using NetBSD, see the wpa_supplicant(8) man page, and the NetBSD WPA tutorial.

If you are using OpenBSD, see the wpakey option of the ifconfig(8) man page.
Reply With Quote
  #3   (View Single Post)  
Old 3rd July 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

kimotori, please indicate whether you are referring to NetBSD or OpenBSD. If the latter, we can move the thread to the correct subforum.
Reply With Quote
  #4   (View Single Post)  
Old 3rd July 2013
kimotori kimotori is offline
Port Guard
 
Join Date: Jun 2013
Posts: 17
Default

Quote:
Originally Posted by ocicat View Post
kimotori, please indicate whether you are referring to NetBSD or OpenBSD. If the latter, we can move the thread to the correct subforum.

Excuse me! Maybe I exaggerated the tone was ironic, (openbsd is too simply) I was wondering how you could connect via wifi with netbsd, not even the 'installer provides the connection to wifi network (with wpa)

in /etc/rc.conf:
Quote:
wpa_supplicant=YES
wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
ok... but

/etc/wpa_supplicant.conf:
Quote:
network={
ssid="BSD"
scan_ssid=1
key_mgmt=WPA-PSK
psk=b7d1304e45ebbdb66ebd458b2d89e6871ac1dcb1efae52 1beaa76fb78708fe9b
}
but not connect
I also used wpa_passphrase BSD 1234567890 > /etc/wpa_supplicant.conf
but not good...

Quote:
ifconfig ath0 up?
Quote:
ifconfig -a
Quote:
...
status= no network
naturally for the dns I used the OpenDNS in /etc/resolv.conf

Apropos, dhclient going in loop
it also in /etc/ifconfig.ath0:
Quote:
inet 192.168.1.23 netmask 255.255.255.0
!route add default 192.168.1.254
Surely, given my "ignorance" I missed something!
I'm frustrated... and rude...

My /etc/rc.conf

Quote:
hostname=puffy
wpa_supplicant=YES
wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
sshd=YES
wscons=YES
changes if something is hidden ssid?

Pardonnez-moi
Tnx for helpme.

Last edited by kimotori; 3rd July 2013 at 08:43 AM.
Reply With Quote
  #5   (View Single Post)  
Old 3rd July 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Pursuant to the wpa_supplicant.conf(5) man page, psk is either ASCII or Hexidecimal

Your Hexadecimal value was interpreted as ASCII because you did not use a leading 0x.
Reply With Quote
  #6   (View Single Post)  
Old 3rd July 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I also notice a space character in the middle of your Hexadecimal string. That is another syntax error if it exists that way in the file.
Reply With Quote
  #7   (View Single Post)  
Old 3rd July 2013
kimotori kimotori is offline
Port Guard
 
Join Date: Jun 2013
Posts: 17
Default

Quote:
but not connect
I also used wpa_passphrase BSD 1234567890 > /etc/wpa_supplicant.conf
but not good
so I have to turn the 10 numbers base 10 in hexadecimal?

Quote:
wpa_passphrase BSD 499602D2 > /etc/wpa_supplicant.conf
right?
Reboot, I try and let you know

P.S.
Quote:
I also notice a space character in the middle of your Hexadecimal string. That is another syntax error if it exists that way in the file.
no, Tnx v.m. but is it a sample
Reply With Quote
  #8   (View Single Post)  
Old 3rd July 2013
kimotori kimotori is offline
Port Guard
 
Join Date: Jun 2013
Posts: 17
Default

Quote:
Originally Posted by kimotori View Post
so I have to turn the 10 numbers base 10 in hexadecimal?



right?
Reboot, I try and let you know

P.S.


no, Tnx v.m. but is it a sample
no good... i'm discouraged, I've tried everything even the 'unlikely

I set my router to wep o wpa1 :°
Reply With Quote
  #9   (View Single Post)  
Old 3rd July 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

WPA pre-shared key mode uses a 256-bit key. This key is either represented as a string of 64 Hexidecimal digits (and by convention, on Unix-like system they are represented beginning with 0x, such as 0xb7d130....), or as an 8 to 63-byte printable ASCII passphrase, such as "this is my passphrase" or MySecretKey or as you tried to use, 123456790.

If an ASCII passphrase is used, it is transformed into a 256-bit key via a cryptographic hash, using the SSID as a salt to 4096 iterations of HMAC-SHA1.

This transformation is the job of wpa_supplicant, if it finds an ASCII passphrase. You need not do this yourself. Just set psk="1234567890" in /etc/wpa_supplicant.conf if that is your ASCII passphrase.

Last edited by jggimi; 3rd July 2013 at 12:28 PM. Reason: clarity
Reply With Quote
Old 3rd July 2013
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

An additional idea is to use the -d and -f flags when running wpa_supplicant(8). These will put debugging information into a file.
Reply With Quote
Old 6th July 2013
kimotori kimotori is offline
Port Guard
 
Join Date: Jun 2013
Posts: 17
Default

Quote:
Originally Posted by jggimi View Post
WPA pre-shared key mode uses a 256-bit key. This key is either represented as a string of 64 Hexidecimal digits (and by convention, on Unix-like system they are represented beginning with 0x, such as 0xb7d130....), or as an 8 to 63-byte printable ASCII passphrase, such as "this is my passphrase" or MySecretKey or as you tried to use, 123456790.

If an ASCII passphrase is used, it is transformed into a 256-bit key via a cryptographic hash, using the SSID as a salt to 4096 iterations of HMAC-SHA1.

This transformation is the job of wpa_supplicant, if it finds an ASCII passphrase. You need not do this yourself. Just set psk="1234567890" in /etc/wpa_supplicant.conf if that is your ASCII passphrase.
Tnx @jggimi @ldOp

works ok!

wpa_passphrase I have not used because it creates a problem.

I wrote a file, wpa_supplicant.conf manually. I make a brief summary:

vi /etc/rc.conf
Quote:
...
wpa_supplicant=YES
wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
sshd=YES
wscons=YES
...
vi /etc/wpa_supplicant.conf
Quote:
network={
ssid="BSD"
scan_ssid=1
key_mgmt=WPA-PSK
psk="1234567890"
}
mistakenly wrote psk=1234567890...without the quotes..

I recommend, use the "" and don't use a wpa_passphrase

vi /etc/ifconfig.ath0

Quote:
inet 192.168.1.200 netmask 255.255.255.0
!route add default 192.168.1.254
ifconfig ath0

Quote:
...
status=active
...

Last edited by kimotori; 9th July 2013 at 03:31 AM.
Reply With Quote
Old 14th July 2013
kimotori kimotori is offline
Port Guard
 
Join Date: Jun 2013
Posts: 17
Default

Quote:
Originally Posted by kimotori View Post
Tnx @jggimi @ldOp

works ok!

wpa_passphrase I have not used because it creates a problem.

I wrote a file, wpa_supplicant.conf manually. I make a brief summary:

vi /etc/rc.conf


vi /etc/wpa_supplicant.conf


mistakenly wrote psk=1234567890...without the quotes..

I recommend, use the "" and don't use a wpa_passphrase

vi /etc/ifconfig.ath0



ifconfig ath0
but sometime continue not work..

I'm using netbsd i386 (on a i3 netbook asus k54l)

Last edited by kimotori; 14th July 2013 at 07:34 PM.
Reply With Quote
Reply

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
WPA2, crackable? Sunnz General software and network 2 7th July 2008 10:17 PM
Dual ath cards with WPA2 in hostapd? Malinda FreeBSD Security 4 8th June 2008 08:34 PM


All times are GMT. The time now is 11:13 AM.


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