I’ve already written about configuring and using DLink wireless card with the help of RT61 driver. However, few readers like to know more about Wi-Fi Protected Access (WPA and WPA2) secure wireless configurations.
Step # 1: Configure Router / AP with WPA2 Security Mode
First you need to configure WPA2 security mode on the access point. All devices on your network must use the same security mode in order to communicate. Open router configuration by visiting default IP https://192.168.1.1/ and setup
- Security Mode: WPA2 Personal
- WPA2 Algorithm: You may choose from AES or TKIP+AES. Choose TKIP+AES if you have both WPA and WPA2 devices on your network.
- WPA2 Pre-Shared Key: Choose a unique key to authenticate with other devices on your network. The Pre-Shared Key must be between 8 and 63 characters in length. You can generate unique key by visiting this webpage. You can also use standard UNIX / Linux utilities to generates true random passwords (key) by using the /dev/random feature of Linux.
- Group Key Renewal: This settings determines how often your group key changes.
(Fig. 01: Configure WPA2 for your router / access point)
Step # 2: Configure RT61 Wireless Card
Open /etc/network/interfaces file and make changes as follows:
$ sudo vi /etc/network/interfaces
Output:
auto ra0 iface ra0 inet dhcp pre-up iwconfig ra0 mode managed pre-up ifconfig ra0 up pre-up iwconfig ra0 essid nixcraft pre-up iwpriv ra0 set AuthMode=WPA2PSK pre-up iwpriv ra0 set WPAPSK='|zdUkK(!X)_'G!}@1|@OS/6RA#'+}eq8b&V@x1%OZyyDVV:Xwp8UmwLFNS^7=A+' pre-up iwpriv ra0 set EncrypType=AES
Save and close the file. Make sure you replace device name (ra0), essid and WPAPSK with actual configuration parameters. Restart the networking:
$ sudo /etc/init.d/networking restart
Other simple security suggestion
- Change the default admin password on the access point / router.
- If possible turn off administration feature on the access point for wireless interface
- Set up an access control list by Mac address of all devices you want to associate with the access point.
Please note that above instructions are only tested using RT61 driver under Ubuntu Linux. However, instructions should work with any other Linux distos and drivers with minor or minimum changes.
Suggested readings:
- man pages – iwpriv, interfaces, iwconfig
- Original RT61 configuration how to
- Wi-Fi Alliance’s WPA2 page
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 2 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Hey
Trying to use yoiur guide to get a d-link 510 online with WPA2 on Gentoo.
18:05.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
Subsystem: D-Link System Inc AirPlus G DWL-G510 Wireless Network Adapter (Rev.C)
Kernel driver in use: rt61pci
Installed the driver above in kernel and also emerged the firmware addon.
Sadly, I can’t use iwpriv to set any of the above settings.
# iwpriv wlan0
wlan0 no private ioctls.
I can only use iwconfig / ifconfig.
That doesn’t seem to be enough.
Thanks for the info, between this and the RT61 config page I am now WPA2 surfing.
Only thing I don’t understand is why my wireless card no longer appears in the dropdown box for network in the upper right corner of ubuntu 7.04