In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to open WI-FI hotspots in Debian. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Installation environment
Operating system: Debian Gnu/Linux 8.3Kernel: linux-image-4.3.0-0.bpo.1-amd64 Network Card: Tenda W311M 150m Mini Wireless USB Network Card
1. Prepare the environment
Add Source Warehouse
Execute vi / etc/apt/sources.list and add the following source address:
Deb http://ftp.cn.debian.org/debian/ jessie-backports main contrib non-free
Install dependent packages
Install the latest kernel and related software packages to avoid errors in compiling Hostapd, and execute the following commands in turn:
Apt-get updateapt-get install linux-image-4.3.0-0.bpo.1-amd64apt-get install linux-headers-4.3.0-0.bpo.1-all-amd64apt-get install pkg-configapt-get install libssl-devapt-get install gettextapt-get install opensslapt-get install libnl-genl-3-devapt-get install libnl-genl-3- 200apt-get install libnl-3-devapt-get install libnl-3- 200apt-get install hostapd2, compile, configure hostapd software
Download the hostapd package
Go to http://w1.fi/hostapd/ website to download hostapd-2.5.tar.gz file
Wget http://w1.fi/releases/hostapd-2.5.tar.gz
Decompression
Extract and copy the configuration file
Tar-zxvf hostapd-2.5.tar.gzcd hostapd-2.5cp defconfig .config
Use the vi .config command to modify the file as follows:
# Use libnl v2.0 (or 3.0) libraries.CONFIG_LIBNL20=y# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) CONFIG_LIBNL32=y# IEEE 802.11n (High Throughput) supportCONFIG_IEEE80211N=y
Save exit, compile and install:
Makemake install
The system will generate two executable files named hostapd and hostapd_cli in the / usr/local/bin directory.
Modify profile parameters
Copy the hostapd configuration file to the / etc/hostapd/ folder and modify the related fields to read as follows:
Cp hostapd.conf / etc/hostapd/vi / etc/hostapd/hostapd.confinterface=wlan1driver=nl80211ssid=LONUXPROBEhw_mode=gchannel=7macaddr_acl=0auth_algs=3ignore_broadcast_ssid=0wmm_enabled=1ieee80211n=1ht_capab= [HT40-] [SHORT-GI-20] [SHORT-GI-40] wpa=2wpa_passphrase=linuxprobemacaddr_acl=0auth_algs=1ignore_broadcast_ssid=0wpa_key_mgmt=WPA-PSKwpa_pairwise=TKIPrsn_pairwise=CCMP
Modify the daemon target location
Use vi to edit the file with the following modifications:
Vi / etc/default/hostapdDAEMON_CONF= "/ etc/hostapd/hostapd.conf"
Modify the service script target location
Edit the hostapd service script as follows:
Vi / etc/init.d/hostapdDAEMON_SBIN=/usr/local/bin/hostapd
And add the following to the next line of start):
Sed-I'/\ [keyfile\] / a unmanaged-devices=mac:c8:3a:35:cb:18:e0' / etc/NetworkManager/NetworkManager.conf ip addr add 192.168.11.1 POSTROUTING 24 dev wlan1 echo "1" > / proc/sys/net/ipv4/ip_forward iptables-t nat-A POSTROUTING-o wlan0-j MASQUERADE sleep 2
Add the following to the next line of stop):
Sed-I'/ ^ unmanaged-devices=mac:c8:3a:35:cb:18:e0/d' / etc/NetworkManager/NetworkManager.conf echo "0" > / proc/sys/net/ipv4/ip_forward ip addr del 192.168.11.1 wlan0 24 dev wlan1 iptables-t nat-D POSTROUTING-o wlan0-j MASQUERADE sleep 2
Add the following to the next line of reload):
Sed-I'/ ^ unmanaged-devices=mac:c8:3a:35:cb:18:e0/d' / etc/NetworkManager/NetworkManager.conf echo "0" > / proc/sys/net/ipv4/ip_forward ip addr del 192.168.11.1 wlan0 24 dev wlan1 iptables-t nat-D POSTROUTING-o wlan0-j MASQUERADE sed-I'/\ [keyfile\] / a unmanaged-devices=mac:c8:3a:35:cb:18:e0' / etc/ NetworkManager/NetworkManager.conf ip addr add 192.168.11.1 NetworkManager/NetworkManager.conf ip addr add 24 dev wlan1 echo "1" > / proc/sys/net/ipv4/ip_forward iptables-t nat-A POSTROUTING-o wlan0-j MASQUERADE sleep 2
Save and exit, and * * (set parameters mac and ip according to your own situation) * * reconfigure the script file:
Systemctl daemon-reload3, install and configure dnsmasq software
Install dnsmasq
Apt-get install dnsmasq
Modify the configuration file of dnsmasq
Vi / etc/dnsmasq.confresolv-file=/etc/resolv.dnsmasq.confserver=/cn/114.114.114.114server=/taobao.com/114.114.114.114server=/google.com/8.8.8.8listen-address=127.0.0.1192.168.11.1dhcp-range=192.168.11.50192.168.11.150,12hdhcp-option=3192.168.11.1dhcp-option=6192.168.11.1cache-size=1024conf-dir=/etc/dnsmasq.d
Modify the configuration file
Vi / etc/resolv.dnsmasq.confnameserver 114.114.114.114nameserver 223.5.5.5nameserver 223.6.6.6
Modify the configuration file
Vi / etc/resolv.confnameserver 127.0.0.14, start related services
Start the service
Use the commands separately:
Systemctl enable dnsmasq.servicesystemctl disable hostapd.service
Turn both services on and off, and then use the command when you need to use hotspot mode:
Systemctl start hostpad.serive
Users can use the hotspot name LINUXPROBE, password linuxprobe, gateway address and DNS are 192.168.11.1 80211N protocol unlimited hotspot to connect to the Internet!
This is the end of this article on "how to open WI-FI hotspots in Debian". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.