资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

linux选择热点的命令 linux无线热点

deepin linux怎么创建wifi热点

方法/步骤

创新互联建站主营衢江网站建设的网络公司,主营网站建设方案,成都APP应用开发,衢江h5微信小程序开发搭建,衢江网站营销推广欢迎衢江等地区企业咨询

安装hostapd无线网认证程序。

sudo apt-get install hostapd

安装小型DNS/TFTP服务器。

sudo apt-get install dnsmasq

安装iptables。默认deepin linux下已经安装。

sudo apt-get install iptables

安装git,需要克隆github上的create_ap。sudo apt-get install git

建立一个文件夹,并初始化git仓库,以便克隆github上的工具。

克隆github上的ap创建工具create_ap。

克隆完成,执行如下命令安装create_ap。

sudo make install

接下来查看自己电脑上网络名称。

最后通过create_ap来创建wifi热点,命令格式:

create_ap 无线网卡 有线网卡 热点名称 密码

比如我的电脑创建一个密码为110120114的叫mywifi的热点。

sudo create_ap wlan0 enxb827eb03ac05 mywifi 110120114

开启后,其它无线设备就可以在无线网扫描中找到mywifi的网络,输入密码即可上网了。

linux mint17怎么开热点

第一步:安装应用;

apt-get install hostapd dnsmasq

第二步:配置文件;

修改/etc/hostapd/hostapd.conf

1

2

3

4

5

6

7

8

9

10

interface=wlan0

driver=nl80211

ssid=hotspot # Your WAP name, change it to something more unique

hw_mode=g

channel=6 # You may want to change this if the channel is too crowded

wpa=1

wpa_passphrase=hotspot_password # Password for clients

wpa_key_mgmt=WPA-PSK

wpa_pairwise=TKIP CCMP

wpa_ptk_rekey=600

修改/etc/dnsmasq.conf

1

2

3

4

5

6

7

8

9

# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers

no-resolv

# Interface to bind to

interface=wlan0

# Specify starting_range,end_range,lease_time

dhcp-range=10.0.0.3,10.0.0.20,12h

# dns addresses to send to the clients

server=8.8.8.8

server=8.8.4.4

第三步:添加脚步;

将以下脚本添加到/etc/network/if-up.d/wapstart:

#!/bin/sh

WIRE=eth0

WIFI=wlan0

# Only run script for wired interface

if [ ! "$IFACE" = "$WIRE" ]

then

exit 0

fi

# Setup wireless interface

ifconfig $WIFI up 10.0.0.1 netmask 255.255.255.0

# Start dnsmasq

/etc/init.d/dnsmasq start

#Enable NAT

iptables --flush

iptables --table nat --flush

iptables --delete-chain

iptables --table nat --delete-chain

iptables --table nat --append POSTROUTING --out-interface $WIRE -j MASQUERADE

iptables --append FORWARD --in-interface $WIFI -j ACCEPT

# Start the Wireless Access Point service

/etc/init.d/hostapd start

exit 0

将以下脚本添加到/etc/network/if-post-down.d/wapstop:

#!/bin/bash

WIRE=eth0

WIFI=wlan0

# Only run script for wired interface

if [ ! "$IFACE" = "$WIRE" ]

then

exit 0

fi

# Stops Wireless Access Point services

/etc/init.d/hostapd stop

/etc/init.d/dnsmasq stop

# Asked nice the first time...

killall dnsmasq

killall hostapd

ifconfig $WIFI down

为这两个脚本加上可执行权限:

chmod +x /etc/network/if-up.d/wapstart

chmod +x /etc/network/if-post-down.d/wapstop

最后一步:使用咯;

ifconfig eth0 down

ifconfig eth0 up

如何用linux做wifi热点

第一步:安装应用;

apt-get install hostapd dnsmasq

第二步:配置文件;

修改/etc/hostapd/hostapd.conf

修改/etc/dnsmasq.conf

第三步:添加脚本;

将以下脚本添加到/etc/network/if-up.d/wapstart:

将以下脚本添加到/etc/network/if-post-down.d/wapstop:

为这两个脚本加上可执行权限:

chmod +x /etc/network/if-up.d/wapstart

chmod +x /etc/network/if-post-down.d/wapstop

最后一步:使用咯;

ifconfig eth0 down

ifconfig eth0 up


文章名称:linux选择热点的命令 linux无线热点
文章分享:http://cdkjz.cn/article/hicpsd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220