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.

  1. use hostapd as a global service
  2. 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列表文件所在;

 

相关资料

参考1:http://w1.fi/hostapd/  

参考2http://w1.fi/wpa_supplicant/devel/

Hostapd的更多相关文章

  1. hostapd与wpa_supplicant

    hostapd与wpa_supplicant hostapd hostapd includes IEEE 802.11 access point management (authentication ...

  2. 【转】Hostapd工作流程分析

    [转]Hostapd工作流程分析 转自:http://blog.chinaunix.net/uid-30081165-id-5290531.html Hostapd是一个运行在用户态的守护进程,可以通 ...

  3. hostapd源代码分析(三):管理帧的收发和处理

    hostapd源代码分析(三):管理帧的收发和处理 原文链接:http://blog.csdn.net/qq_21949217/article/details/46004379 这篇文章我来讲解一下h ...

  4. hostapd源代码分析(二):hostapd的工作机制

    [转]hostapd源代码分析(二):hostapd的工作机制 原文链接:http://blog.csdn.net/qq_21949217/article/details/46004433 在我的上一 ...

  5. hostapd源代码分析(一):网络接口和BSS的初始化

    [转]hostapd源代码分析(一):网络接口和BSS的初始化 原文链接:http://blog.csdn.net/qq_21949217/article/details/46004349 最近在做一 ...

  6. hostapd and wpa_supplicant

    一.Hostapd hostapd 是一个用户态用于AP和认证服务器的守护进程.它实现了IEEE 802.11相关的接入管理,IEEE 802.1X/WPA/WPA2/EAP 认证, RADIUS客户 ...

  7. hostapd移植与使用

    介绍 版本:hostapd-2.5.tar.gz 下载地址:http://w1.fi/releases/hostapd-2.5.tar.gz 依赖:libnl openssl 移植 libnl移植 w ...

  8. [EAP]将hostapd作为radius服务器搭建EAP认证环境

    文章主要由以下几部分组成: 0.概念理解: WPA/WPA2,EAP,IEEE, 802.11i, WiFi联盟, 802.1x 1.编译hostapd 2.配置hostapd的conf文件 3.外接 ...

  9. Linux下用hostapd架无线AP

    Published by 荒野无灯 on 2011-10-08 00:56:02 under 服务器/MySQL Tags: 路由,无线AP,hostapd 34452 views 本文将介绍在lin ...

随机推荐

  1. ado.net基础思想-abstract

    抽象类用做基类不能被实例化用途是派生出其他非抽象类 接口主要是实现多重继承 abstract 修饰符用于表示所修饰的类是不完整的,并且它只能用作基类.抽象类与非抽象类在以下方面是不同的:• 抽象类不能 ...

  2. thinkphp和uploadfiy

    上传页面 用的是bootstrap <div class="col-sm-6"> <div style="width: 200px; height: 1 ...

  3. 如何利用java把文件中的Unicode字符转换为汉字

    有些文件中存在Unicode字符和非Unicode字符,如何利用java快速的把文件中的Unicode字符转换为汉字而不影响文件中的其他字符呢, 我们知道虽然java 在控制台会把Unicode字符直 ...

  4. 2012年"浪潮杯"山东省第三届ACM大学生程序设计竞赛--n a^o7 ! 分类: 比赛 2015-06-09 17:16 14人阅读 评论(0) 收藏

    n a^o7 ! Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 All brave and intelligent fighte ...

  5. Uva 11400,照明系统设计

    题目链接:https://uva.onlinejudge.org/external/114/11400.pdf 题意:有一个照明系统需要用到n种灯,每种灯的电压为V,电源费用K,每个灯泡费用为C,需要 ...

  6. HDU(1572),最短路,DFS

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1572 很久没写深搜了,有点忘了. #include <iostream> #include ...

  7. 递推,动态规划(DP),字符串处理,最佳加法表达式

    看了一些资料,竟然发现连百度文库也有错误的地方,在这里吐槽一下题目大意:http://wenku.baidu.com/link?url=DrUNNm19IqpPNZjKPX4Jg6shJiK_Nho6 ...

  8. Storm系列之一——Storm Topology并发

    1.是什么构成一个可运行的topology? worker processes(worker进程),executors(线程)和tasks. 一台Storm集群里面的机器可能运行一个或多个worker ...

  9. MySQL基础(五)——视图

    MySQL基础(五)--视图

  10. Web文件的ContentType类型收集

    ".*"="application/octet-stream"".001"="application/x-001"&qu ...