Can you use Windows to access the Internet in Linux? I am going to show you how.
You're going to need the wireless tools. Depending on the distribution you've installed, you may already have the required package on your distribution CDs, though it's less than likely that they'll already be installed to your Linux system. Both Red Hat and Mandrake come with wireless tools packages on CD, so you'll need to dig out your discs and install the rpms using your usual package management or set-up tool. Next, you need the 'ndiswrapper' package itself. Again, there's a possibility that you already have a pre-built packaged version supplied with your chosen distro. If you have, you can install this and save yourself a fair old bit of fiddling. If you haven't, you'll need to download 'ndiswrapper' from the home site.
Step 1: Download 'ndiswrapper' from the home site: https://sourceforge.net/projects/ndiswrapper/
And now the bad news. The 'ndiswrapper' package is only available in source code form, and there are no nice pre-compiled binaries or easy to install rpm packages.
Despite what you may think, compiling a program from the source is not too difficult, as long as you're sensible and don't panic. To compile 'ndiswrapper', you'll also need the complete Linux kernel sources installed. Make sure everything is ready by creating another session with your package management tools and the distribution discs.
Next, download the latest stable version of 'ndiswrapper' from the home site. As of writing, this was 1.61, with the tarball file you need called 'ndiswrapper-1.61.tar.gz'.
Step 2: Extract the tarball using the following command:
tar zxvf ndiswrapper-1.61.tar.gz
Change the filename if you have a newer version, which is highly likely by the time you read this. This will leave you with a directory called 'ndiswrapper-1.61' or similar. Move into this using the 'cd' command.
Step 3: Next, you'll need root access privileges before you can compile the sources.
Rather than logging out entirely, use the 'su' command and enter the root password to temporarily give yourself root access. However, make sure you log out with 'exit' when you've finished compiling. You can then build the sources using the simple command:
make install
This should compile the sources into a kernel module.
Step 4: Next, we need to locate the Windows driver for your hardware.
Note that drivers built for older versions of Windows won't work. Make sure your card or chipset is supported by checking the 'ndiswrapper' hardware list. You'll find the link in the 'Going Further' column. Rather than use the drivers that came with your card, we're going to download ones which are known to work after matching them to your hardware ID. To do this, we first need to invoke the command 'lspci' and note the entry in the first column, which looks similar to 0000:00:0c.0. You also need to use the 'lspci –n' command to locate your card's PCI ID. This will be the third or fourth column, depending on your distribution, and will look similar to 104c:8400. Look in the hardware list and match your card's PCI ID to an entry there, then download the relevant driver.
Step 5: Now we need to unpack the drivers.
Most listed in the hardware list are in simple zip format, so use the unzip command followed by the filename. If you hit one in Windows CAB format, replace unzip with the 'cabextract' command. On rare occasions, drivers may be Windows program files, which means you'll need to extract them from a Windows session first. Make sure the driver files are all in one directory (and you need the .INF, .SYS and any .BIN files). Type the following command, replacing filename.inf with the actual name from your driver set:
ndiswrapper –i filename.inf
This copies all of the necessary files to '/etc/ndiswrapper' and builds the required configuration files.
Step 6: Once installed, you can check the status of the installed drivers by typing the following command:
ndiswrapper -l
This should tell you which drivers are installed and present for use.
Step 7: Now that everything is installed, use the command 'modprobe ndiswrapper' to load the module.
If successful, you should see a message indicating that the module has loaded. Now we need to configure the system. Use the command 'iwconfig', which is part of the wireless tools package. This will return the ID of the wireless interface, which is usually 'wlan0'.
Step 8: Check to see if you can see your wireless access point, or router, by using this command:
iwlist wlan0 scan
This should return the ID of your access point.
Step 9: Set the operating mode, which is usually managed by typing:
iwconfig wlan0 mode Managed
Almost there.
Step 10: To fire up the network, use the command:
ifconfig wlan0 up
In theory, you should now be up and running. If any of the stages have caused you problems, you'll need to check the 'ndiswrapper' FAQ, as space doesn't permit long diagnostics here.
As it stands, your wireless network won't automatically switch on when Linux boots. To do this, type:
ndiswrapper –m
...then add the line 'ndiswrapper' to the '/etc/modules' file using a text editor.
Wireless security
The key to successfully securing your wireless connection is, well, a key!
One of the problems with wireless networking is that, without adequate security, anyone with a wireless laptop could tap into your network. At worst, this could mean the destruction of your files and, at best, the hijacking of your Internet connection. This happens a lot on unsecured networks, and leads to the phenomenon known as 'wardriving', where a user drives about with a wireless laptop, scanning the immediate vicinity for open wireless networks. Wi-Fi wireless networking isn't the most secure protocol, but offers good security using a system known as WEP (Wireless Encryption Protocol). This uses a secure 128-bit key known to every device on the network. Without this key, a device can't connect.
Depending on your hardware, there may be a key when you install your access point or router. To set the WEP parameters, you need to check the documentation that came with it. Once done, note two settings before you can encrypt your network in Linux: the ESSID and the WEP keys. Write both of these down and go back to your Linux terminal. To set the ESSID for 'ndiswrapper', type the following line:
iwconfig wlan0 essid ESSID
You should replace 'ESSID' with the network name you established with the access point. Next, specify the WEP key by typing the following command:
iwconfig wlan0 key restricted 12345
In this instance, replace '12345' with the actual Wireless Encryption Protocol key you generated when you first installed the access point or router.
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved yet. See the Utopian Rules. Please edit your contribution to reapply for approval.
You may edit your post here, as shown below:
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you @shreyasgune . I have edited my tutorial and added more details. I hope you will review it again.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @rufu I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit