Hostapd
Hostapd
一、基本概念
hostapd is an application used to setup your wireless interface as an access-point (master mode). Hostapd requires a configuration file in order to operate, and in addition, it needs to support the driver used for the wireless interface.
二、用途
To use hostapd, you have two choices.
- use hostapd as a global service
- use hostapd as a standalone user application
1、Global Service
If you install hostapd through yum (Fedoras package system), it comes with some startup scripts located in /etc/init.d. To use the service, you have to create a configuration file, put it in/etc/hostapd/hostapd.conf and issue the service hostapd start|restart|stop command.
2、Standalone User Application (Preferred)
This allows you to tailor hostapd for your experiments and set the configuration to your preferences. But as you most of the time would use nearly identical configurations, you may create a configuration file which you use for several experiments.
终端应用
如果已经准备好配置文件hostapd.conf,可以通过下面的指令启动hostapd程序:
hostapd /path/to/file/hostapd.conf
hostapd将以终端应用的方式运行,并可以通过Ctrl+C终止程序的运行。
后台程序
如果不想以终端应用的方式运行hostapd,可以以后台程序的方式运行它:
# hostapd -B /path/to/file/hostapd.conf
为了能kill掉hostapd,需要通过指令将hostapd的pid写入到文件中:
hostapd -B -P/path/to/pid/hostapd.pid /path/to/file/hostapd.conf
上述指令会将hostapd的pid写入到文件hostapd.pid中
查看hostapd的状态
ps aux | grep hostapd
三、配置
For running a WPA-PSK access-point one may use a configuration file like the one below
ssid=test
hw_mode=g
channel=10
interface=wlan0
bridge=br0
driver=nl80211
ignore_broadcast_ssid=0
macaddr_acl=0
accept_mac_file=/etc/hostapd.accept
deny_mac_file=/etc/hostapd.deny
- ssid:别人所看到的无线接入点的名称;
- hw_mode:指定802.11协议,其中 a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g;
- channel:设定无线频道;
- interface:接入点设备名称,注意不要包含ap后缀,即如果该设备称为wlan0ap,填写wlan0即可;
- bridge:指定所处网桥;
- driver:设定无线驱动;
- macaddr_acl:可选,指定MAC地址过滤规则,0表示除非在禁止列表否则允许,1表示除非在允许列表否则禁止,2表示使用外部RADIUS服务器;
- accept_mac_file:指定允许MAC列表文件所在;
- deny_mac_file:指定禁止MAC列表文件所在;
相关资料
参考2:http://w1.fi/wpa_supplicant/devel/
Hostapd的更多相关文章
- hostapd与wpa_supplicant
hostapd与wpa_supplicant hostapd hostapd includes IEEE 802.11 access point management (authentication ...
- 【转】Hostapd工作流程分析
[转]Hostapd工作流程分析 转自:http://blog.chinaunix.net/uid-30081165-id-5290531.html Hostapd是一个运行在用户态的守护进程,可以通 ...
- hostapd源代码分析(三):管理帧的收发和处理
hostapd源代码分析(三):管理帧的收发和处理 原文链接:http://blog.csdn.net/qq_21949217/article/details/46004379 这篇文章我来讲解一下h ...
- hostapd源代码分析(二):hostapd的工作机制
[转]hostapd源代码分析(二):hostapd的工作机制 原文链接:http://blog.csdn.net/qq_21949217/article/details/46004433 在我的上一 ...
- hostapd源代码分析(一):网络接口和BSS的初始化
[转]hostapd源代码分析(一):网络接口和BSS的初始化 原文链接:http://blog.csdn.net/qq_21949217/article/details/46004349 最近在做一 ...
- hostapd and wpa_supplicant
一.Hostapd hostapd 是一个用户态用于AP和认证服务器的守护进程.它实现了IEEE 802.11相关的接入管理,IEEE 802.1X/WPA/WPA2/EAP 认证, RADIUS客户 ...
- hostapd移植与使用
介绍 版本:hostapd-2.5.tar.gz 下载地址:http://w1.fi/releases/hostapd-2.5.tar.gz 依赖:libnl openssl 移植 libnl移植 w ...
- [EAP]将hostapd作为radius服务器搭建EAP认证环境
文章主要由以下几部分组成: 0.概念理解: WPA/WPA2,EAP,IEEE, 802.11i, WiFi联盟, 802.1x 1.编译hostapd 2.配置hostapd的conf文件 3.外接 ...
- Linux下用hostapd架无线AP
Published by 荒野无灯 on 2011-10-08 00:56:02 under 服务器/MySQL Tags: 路由,无线AP,hostapd 34452 views 本文将介绍在lin ...
随机推荐
- SQL语句,给自己的记录
1.group by 和求和函数的使用 select className,SUM(num) as sumNum FROM test GROUP BY className 2.更新一个字段的所有值 up ...
- Unity安卓上播放视频的问题,暂时无解记录一下
设备联想A7600m,好像是联发科的cpu 先用网上流传很广的这个Unity自带接口试验一下: Handheld.PlayFullScreenMovie(Path.Combine(Applicatio ...
- 最流行的编程语言JavaScript能做什么?
本文转自互联网! 首先很遗憾的一点是,"PHP虽然是最好的语言",但是它不是最流行的语言. 对不起的还有刚刚在4月TIOBE编程语言排行榜上榜的各个语言: 你们都很棒,但是你们都担 ...
- Mybatis like 模糊查询问题
1.mysql:LIKE CONCAT('%',#{empname},'%' ) 或者 LIKE CONCAT('%',‘${empname}’,'%' ) 2.oracle:LIKE '%'||#{ ...
- 2016年11月22日 星期二 --出埃及记 Exodus 20:13
2016年11月22日 星期二 --出埃及记 Exodus 20:13 "You shall not murder.不可杀人.
- linux rc.sysinit文件详解
/etc/rc.d/rc.sysinit 系统初始化脚本的任务 .激活udev和selinux .根据/etc/sysctl.conf文件设定内核参数 .设定系统时钟 .装载键盘映射 .启用交换分区 ...
- Android 计算器界面
高仿魅族魅蓝NOTE 2风格 <?xml version="1.0" encoding="utf-8"?> <TableLayout xmln ...
- socket,TCP/IP的理解
TCP/IP 要想理解socket首先得熟悉一下TCP/IP协议族, TCP/IP(Transmission Control Protocol/Internet Protocol)即传输控制协议/网间 ...
- SQLServer使用表值参数,高性能批量插入数据
记得前段时间帮同事写了个解析账号并入库的小工具,来批量导入账号信息,账号量相当大,程序每读取一条记录便执行一次insert来插入数据,整整跑了一下午才把账号全部入库. 今天又接到同事类似的需求,不过这 ...
- ubuntu中rar与unrar用法详解
本文转载:http://helloklzs.iteye.com/blog/1139993 安装: sudo apt-get install rar 这样就可以安装了 删除是以下语句 sudo apt- ...