PDA

View Full Version : WEP Not Working


lfirth
2006-02-25, 03:01 PM CST
Hi, I eventualy have managed to get my wireless network card up and running with Fedora Core 4, I thought that it was abaout time I added a little security to it so have attempted to add WEP. The following is the output of my /etc/sysconfig/network-scripts/keys-wlan0 file

KEY=s:d472979ddb

I read on another forum that it may be necessery to ad the 's:' to get it to work properly but either way with or without the 's:', this will not allow me to connect to the wirlwess AP.

Any suggestions as to why or as to what else I can try?

bytesniper
2006-02-25, 03:25 PM CST
taken from the iwconfig man page:

key/enc[ryption]
Used to manipulate encryption or scrambling keys and security mode.
To set the current encryption key, just enter the key in hex digits as XXXX-XXXX-XXXX-XXXX or XXXXXXXX. To set a key other than the current key,
prepend or append [index] to the key itself (this won’t change which is the active key). You can also enter the key as an ASCII string by using
the s: prefix. Passphrase is currently not supported.
To change which key is the currently active key, just enter [index] (without entering any key value).
off and on disable and reenable encryption.
The security mode may be open or restricted, and its meaning depends on the card used. With most cards, in open mode no authentication is used and
the card may also accept non-encrypted sessions, whereas in restricted mode only encrypted sessions are accepted and the card will use authentica-
tion if available.
If you need to set multiple keys, or set a key and change the active key, you need to use multiple key directives. Arguments can be put in any
order, the last one will take precedence.
Examples :
iwconfig eth0 key 0123-4567-89
iwconfig eth0 key [3] 0123-4567-89
iwconfig eth0 key s:password [2]
iwconfig eth0 key [2]
iwconfig eth0 key open
iwconfig eth0 key off
iwconfig eth0 key restricted [3] 0123456789
iwconfig eth0 key 01-23 key 45-67 [4] key [4]


it depends on how you setup your wep key. one of those will work using your interface name...eth1, ath0, wlan0, etc...

lfirth
2006-02-25, 11:20 PM CST
Couldn't run the command cos I got the following error.

[root@localhost sbin]# iwconfig wlan0 key d472-979d-db
bash: iwconfig: command not found
[root@localhost sbin]#

dir shows that the command is there:

[root@localhost sbin]# dir
accton extlinux kmodule pwdb_chkpwd
addpart fdisk ldconfig quotacheck
adsl-connect findfs logsave quotaoff
adsl-setup firmware_helper loopctrl quotaon
adsl-start fixfiles losetup rdisc
adsl-status fsck lsmod rdump
adsl-stop fsck.cramfs lspci rdump.static
agetty fsck.ext2 lvm.static reboot
alsactl fsck.ext3 MAKEDEV rescuept
arp fsck.msdos mdadm resize2fs
arping fsck.vfat mdadm.static restore
ata_id fuser mdassemble restorecon
ata_id.static fxload mdmpd restore.static
auditctl generate-modprobe.conf mgetty rmmod
auditd genhostid mii-diag rmt
aureport getkey mii-tool route
ausearch grub mingetty rpcdebug
autrace grubby mkbootdisk rpc.lockd
avmcapictrl grub-install mkdosfs rpc.statd
badblocks grub-md5-crypt mke2fs rrestore
blkid grub-terminfo mkfs rrestore.static
blockdev halt mkfs.cramfs rtmon
capiinit hdparm mkfs.ext2 runlevel
cardctl hisaxctrl mkfs.ext3 runuser
cardmgr hotplug mkfs.msdos scsi_id
change_console hwclock mkfs.vfat scsi_id.static
chkconfig ibod mkinitrd service
clock icnctrl mkswap setkey
consoletype ifcfg mkzonedb setpci
ctrlaltdel ifconfig modinfo setsysfont
debugfs ifdown modprobe sfdisk
delpart ifenslave mount.cifs shutdown
depmod ifrename mount.smb slattach
dhcdbd ifup mount.smbfs sln
dhclient init nameif start_udev
dhclient-script initlog nash sulogin
dhcp6c insmod netplugd swapoff
divaload insmod.static netreport swapon
divalog install-info new-kernel-pkg sysctl
divalogd installkernel nologin syslogd
divertctrl ip pack_cis tc
dmraid ipmaddr pam_console_apply telinit
dmraid.static ipppd pam_tally tune2fs
dmsetup ipppstats pam_timestamp_check udev
dmsetup.static iprofd parted udevcontrol
dosfsck iptables partprobe udevd
dump iptables-restore partx udev_run_devd
dump_cis iptables-save path_id udev_run_hotplugd
dumpe2fs iptunnel pcbitctl udevsend
dump.static isdnctrl pidof udevstart
e2fsck isdnlog pivot_root udevstart.static
e2image iwconfig plipconfig udev.static
e2label iwevent portmap unix_chkpwd
edd_id iwgetid poweroff usb_id
edd_id.static iwlist pppoe vboxd
eiconctrl iwpriv pppoe-relay vconfig
elvtune iwspy pppoe-server vol_id
ether-wake killall5 pppoe-sniff ypbind
ethtool klogd ppp-watch
[root@localhost sbin]# iwconfig wlan0 key d472-979d-db
bash: iwconfig: command not found
[root@localhost sbin]# dir
accton extlinux kmodule pwdb_chkpwd
addpart fdisk ldconfig quotacheck
adsl-connect findfs logsave quotaoff
adsl-setup firmware_helper loopctrl quotaon
adsl-start fixfiles losetup rdisc
adsl-status fsck lsmod rdump
adsl-stop fsck.cramfs lspci rdump.static
agetty fsck.ext2 lvm.static reboot
alsactl fsck.ext3 MAKEDEV rescuept
arp fsck.msdos mdadm resize2fs
arping fsck.vfat mdadm.static restore
ata_id fuser mdassemble restorecon
ata_id.static fxload mdmpd restore.static
auditctl generate-modprobe.conf mgetty rmmod
auditd genhostid mii-diag rmt
aureport getkey mii-tool route
ausearch grub mingetty rpcdebug
autrace grubby mkbootdisk rpc.lockd
avmcapictrl grub-install mkdosfs rpc.statd
badblocks grub-md5-crypt mke2fs rrestore
blkid grub-terminfo mkfs rrestore.static
blockdev halt mkfs.cramfs rtmon
capiinit hdparm mkfs.ext2 runlevel
cardctl hisaxctrl mkfs.ext3 runuser
cardmgr hotplug mkfs.msdos scsi_id
change_console hwclock mkfs.vfat scsi_id.static
chkconfig ibod mkinitrd service
clock icnctrl mkswap setkey
consoletype ifcfg mkzonedb setpci
ctrlaltdel ifconfig modinfo setsysfont
debugfs ifdown modprobe sfdisk
delpart ifenslave mount.cifs shutdown
depmod ifrename mount.smb slattach
dhcdbd ifup mount.smbfs sln
dhclient init nameif start_udev
dhclient-script initlog nash sulogin
dhcp6c insmod netplugd swapoff
divaload insmod.static netreport swapon
divalog install-info new-kernel-pkg sysctl
divalogd installkernel nologin syslogd
divertctrl ip pack_cis tc
dmraid ipmaddr pam_console_apply telinit
dmraid.static ipppd pam_tally tune2fs
dmsetup ipppstats pam_timestamp_check udev
dmsetup.static iprofd parted udevcontrol
dosfsck iptables partprobe udevd
dump iptables-restore partx udev_run_devd
dump_cis iptables-save path_id udev_run_hotplugd
dumpe2fs iptunnel pcbitctl udevsend
dump.static isdnctrl pidof udevstart
e2fsck isdnlog pivot_root udevstart.static
e2image iwconfig plipconfig udev.static
e2label iwevent portmap unix_chkpwd
edd_id iwgetid poweroff usb_id
edd_id.static iwlist pppoe vboxd
eiconctrl iwpriv pppoe-relay vconfig
elvtune iwspy pppoe-server vol_id
ether-wake killall5 pppoe-sniff ypbind
ethtool klogd ppp-watch

bytesniper
2006-02-25, 11:43 PM CST
when you su to root use su - (yes with the dash) so its sets up path's for the root user.

or use /usr/sbin/iwconfig everytime

lfirth
2006-02-27, 09:42 PM CST
when you su to root use su - (yes with the dash) so its sets up path's for the root user.


Thanks for your help, but I tried all the options available in both ASCII and HEX and it just won't connect. I'll just have to leave it open.

boknoy
2006-03-02, 02:06 AM CST
Replace the "s" with an "o"
KEY=s:d472979ddb becomes KEY=o:d472979ddb

Security mode must be open and not shared. I read this somewhere from the ipw2100 website at sourceforge.

What I noticed was that the keys in /etc/sysconfig/network-scripts/keys-XXX is not getting configured. You can verify this if you do a iwconfig wla0 and check the encryption if it is the same key you are using.

sample iwconfig output below:
eth1 IEEE 802.11b ESSID:"MyAP" Nickname:"MyPC"
Mode:Managed Frequency:2.432 GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate=11 Mb/s Tx-Power:off
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:1111-2222-3333-4444-5555-6666-772 Security mode:open
Power Management:off
Link Quality=100/100 Signal level=-36 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:251 Missed beacon:0

Hope it helps you as that is how I solved my problem.

lfirth
2006-03-02, 04:29 AM CST
Security mode must be open and not shared. I read this somewhere from the ipw2100 website at sourceforge.


THAT'S IT!

Works now, thank you for the tip.