Linux install WiFi driver, open hotspot

Source: Internet
Author: User

This installation of the Debian system when the installation prompts the WiFi hardware need to install non-free firmware to run, and tell the hardware to install the firmware name is Iwlwifi-2030-6.ucode. Is the driver of the Iwlwifi driver for my wireless hardware model 2230.

Once the system is installed, you can install it directly using the Apt-get install Iwlwifi. After that, you can use WiFi normally. However, a generic WiFi driver is used for the Intel-wirelees network card. I want to install the latest driver for this NIC model. Here's how:

1. Use the LSPCI command to view the network card model 2230, go to https://wiki.debian.org/website to find WiFi driver. Get a deb package. WiFi is available after installation.

Open hotspot

You need to install Hostapd+isc-dhcp-server, all using Apt-get installation. Here is the configuration.

HOSTAPD Configuration

You can view the description document under the/USR/SHARE/DOC/HOSTAPD path to configure. More content. Use the simplified configuration of others directly below.

1. Modify the/usr/hostapd/hostapd.conf. No words to create a. Modify the name of your network card.

interface=wlp6s0 Driver=nl80211  hw_mode=g  Channel=1   SSID=mywifiWPA=2  wpa_key_mgmt=wpa-PSK  wpa_pairwise =CCMP  wpa_passphrase=12345678  

2. When you start HOSTAPD, you can search for Mywifi, but you cannot connect.

sudo hostapd-b/etc/hostapd.conf
Configure DHCP

Using Isc-dhcp-server here, you can also use other DHCP server programs.

1. Modify this file/etc/default/isc-dhcp-server, change the INTERFACESV4 value to the name of your network card.

2. Modify the/etc/dhcp/dhcpd.conf. Modify the following two places.

Configuring forwarding rules using Iptables

Turn on the Linux forwarding function, temporarily open

sudo sysctl-w net.ipv4.ip_forward=1  

Permanently modify, change the configuration file/etc/sysctl.conf

#清除所有规则

#转发到eth0网卡

#查看转发规则

sudo iptables-l

The script is as follows

#!/bin/bash#need Root Identify#su-Root <<eof#pwd, #exit, #EOF This  isThe step.# close the Wifi.open The fly mode.close the fly mode.# then.create the wifispot. #Now. We can stop the Managent of the networkmanagernmcli n off#1. Open Hostapdkillall HOSTAPDHOSTAPD-b/etc/hostapd/hostapd.conf#2. Initial WiFiInterfaceConfigurationip addr del192.168.201.1/ -Dev Wlp6s0ip addr Add192.168.201.1/ -Dev Wlp6s0sleep2########## #Start DHCP, comment out/Add relevant section##########/etc/init.d/isc-dhcp-server restart########### #Enable natiptables-F iptables-T nat-a postrouting-o ppp0-J Masquerade #Enable LinuxreturnSysctl-W net.ipv4.ip_forward=1

Problem: always conflict with NetworkManager when opening HOSTAPD. This is not a direct use of the NetworkManager management network

Nmcli N Off

Failed to start DHCP. Sometimes it is because the NIC is not configured with an IP address. So you can check it.

Linux install WiFi driver, open hotspot

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.