Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Turn on Encryption
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
wingrunr21
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 91

PostPosted: Sat Jul 22, 2006 4:31 am    Post subject: Turn on Encryption Reply with quote

I am attemping to set up my Ralink USB wireless adapter using rt2x00. I got it compiled and the system detects the adapter. I followed the wiki guide on using wireless-tools to set things up, so that's all working. My problem is that I cannot get it to take my WEP key. It is a 128-bit hex key, and I cannot enter it manually. When I do a

Code:
iwconfig wlan0 key my128bitkey


it doesn't do anything. The same is true in my config files and using /etc/init.d/net.wlan0

/etc/conf.d/wireless

Code:

mythbox conf.d # cat wireless
essid_wlan0="BrunkWireless"
channel_wlan0="6"
key_BrunkWireless="my128bitkey"
preferred_aps=( "BrunkWireless" )
sleep_scan_wlan0="1"
sleep_associate_wlan0="15"
mode_wlan0="managed"
rate_wlan0="auto"


/etc/conf.d/net

Code:
mythbox conf.d # cat net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"

modules=( "iwconfig" )
config_BrunkWireless=( "dhcp" )
dhcp_BrunkWireless="nodns nontp nonis"


Even when I manually set my access point's MAC address it still doesn't work. While I'm at it, what is the option for forcing wlan0 to connect to my access point's MAC address? Thanks for all your help.
Back to top
View user's profile Send private message
genfive
Apprentice
Apprentice


Joined: 10 Nov 2005
Posts: 291

PostPosted: Sat Jul 22, 2006 4:52 am    Post subject: Reply with quote

for the key, you need to put an "s:" in front of it to indicate it is ASCII string, not hex-decimal format. also, you probably should specify whether it is an open enc, or a restricted enc... change your key lines to the following:

Code:

jim@tifa /usr/src/linux $ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

modules=( "iwconfig" )

#essid_eth1="dlinkrouter"
key_dlinkrouter="[1] s:mykeyhas13chars key [1] enc restricted"


#essid_eth1="dumb-neighbors-open-ap"
key_dumb_neighbors_open_ap="[1] s:lovethynabor key [1] enc open"

preferred_aps=( "dlinkrouter" "dumb-neighbors-open-ap" )
associate_order="forcepreferredonly"

config_eth0=( "dhcp" )

# set a timeout of 20 seconds instead of the default 1 min
dhcpcd_eth0="-t 10"

config_eth1=( "dhcp" )

# set a timeout of 20 seconds instead of the default 1 min
hdcpcd_eth1="-t 10"
jim@tifa /usr/src/linux $
Back to top
View user's profile Send private message
wingrunr21
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 91

PostPosted: Sat Jul 22, 2006 12:24 pm    Post subject: Reply with quote

It is a hex key. That means the s: is not needed. It doesn't matter anyway, for with or without the s:, it still doesn't work. I'd like to point out that I cannot do this manually either. I can put in all the information (including the MAC address of the router) but I cannnot get the WEP key to work.
Back to top
View user's profile Send private message
genfive
Apprentice
Apprentice


Joined: 10 Nov 2005
Posts: 291

PostPosted: Sat Jul 22, 2006 12:44 pm    Post subject: Reply with quote

try to dump everything into one file, namely, /etc/conf.d/net, as suggested by the gentoo guide, and do away from using /etc/conf.d/wireless.

Also do make sure the access point uses WEP, and the correct encryption (open or restricted). I would get rid of the options about the channel, sleep_scan, mode, etc. follow the example I gave (a working example) and see if it works for you

also, I found the iwconfig command didn't work for me somehow. I used the following instead:

Code:

/etc/init.d/net.wlan0 start
/etc/init.d/net.wlan0 stop
Back to top
View user's profile Send private message
wingrunr21
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 91

PostPosted: Sat Jul 22, 2006 12:53 pm    Post subject: Reply with quote

Nope

/etc/init.d/net.wlan0 restart

Code:
mythbox conf.d # /etc/init.d/net.wlan0 restart
 * Caching service dependencies ...                                       [ ok ]
 * Starting wlan0
 *   Loading networking modules for wlan0
 *     modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa
 *       iwconfig provides wireless
 *       ifconfig provides interface
 *       dhcpcd provides dhcp
 *   Configuring wireless network for wlan0
 *   Connecting to "BrunkWireless" (WEP disabled) ...                     [ ok ]
 *     wlan0 connected to "BrunkWireless" at 00:11:95:CE:3B:EF
 *     in managed mode (WEP disabled)
 *   Configuring wlan0 for "BrunkWireless" ...                            [ ok ]
 *   Bringing up wlan0
 *     dhcp
 *       Running dhcpcd ...


I KNOW my AP has WEP enabled becaused I have my Windows laptop right next to me connected to it with the key. I know the key is correct etc.

/etc/conf.d/net

Code:

mythbox conf.d # cat net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"

modules=( "iwconfig" )
config_wlan0=( "dhcp" )
dhcp_wlan0="nodns nontp nonis"
dhcpcd_wlan0="-t 10"

essid_wlan0="BrunkWireless"
key_BrunkWireless="my128bithexkey"
preferred_aps=( "BrunkWireless" )
Back to top
View user's profile Send private message
genfive
Apprentice
Apprentice


Joined: 10 Nov 2005
Posts: 291

PostPosted: Sat Jul 22, 2006 1:33 pm    Post subject: Reply with quote

Code:

*     wlan0 connected to "BrunkWireless" at 00:11:95:CE:3B:EF
*     in managed mode (WEP disabled)


well, for some reason, it says WEP is disabled...
Back to top
View user's profile Send private message
wingrunr21
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 91

PostPosted: Sat Jul 22, 2006 2:00 pm    Post subject: Reply with quote

Yep. I cannot get it to enable. Apparently when using iwconfig the rt2x00 driver doesn't report that the enc key has been entered. I cannot get it to manually start though. The init script is also not picking up the key.
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sat Jul 22, 2006 2:28 pm    Post subject: Reply with quote

I haven't been keeping up with the latest rt2x00 development. Last time I heard, the rt2x00 was unable to do encryption. Has the situation changed?

Perhaps you'd have better luck with the new legacy drivers that were released on June 20th, which can use WEP or WPA.
Back to top
View user's profile Send private message
wingrunr21
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 91

PostPosted: Sat Jul 22, 2006 10:37 pm    Post subject: Reply with quote

The legacy drivers don't work for me. When I modprobe the module wireless-tools cannot find the device and wpa_supplicant says the device isn't supported.
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sun Jul 23, 2006 8:46 pm    Post subject: Reply with quote

The legecy drivers _don't_ use wpa_supplicant. AFAIK, wpa_supplicant will interfere with the legacy drivers.
Back to top
View user's profile Send private message
wingrunr21
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 91

PostPosted: Sun Jul 23, 2006 8:49 pm    Post subject: Reply with quote

Trust me I tried it every which way. I decided to ditch the native drivers and use NDISWRAPPER. Works like a charm now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum