2013-12-04 08:39:01 -05:00
|
|
|
## Features
|
|
|
|
* Create an AP (Access Point) at any channel.
|
|
|
|
* Choose one of the following encryptions: WPA, WPA2, WPA/WPA2, Open (no encryption).
|
|
|
|
* Hide your SSID.
|
|
|
|
* Internet sharing methods: NATed or Bridged or None (no Internet sharing).
|
|
|
|
* Choose the AP Gateway IP (only for 'NATed' and 'None' Internet sharing methods).
|
|
|
|
* You can create an AP with the same interface you are getting your Internet connection.
|
|
|
|
* You can pass your SSID and password through pipe or through arguments (see examples).
|
|
|
|
|
2013-09-28 03:45:59 -04:00
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
## Dependencies
|
|
|
|
### General
|
2013-09-28 03:45:59 -04:00
|
|
|
* bash (to run this script)
|
|
|
|
* util-linux (for getopt)
|
|
|
|
* hostapd
|
|
|
|
* iproute2
|
2013-12-04 08:39:01 -05:00
|
|
|
* iw
|
2013-09-28 03:45:59 -04:00
|
|
|
* haveged (optional)
|
|
|
|
|
2013-12-04 09:19:36 -05:00
|
|
|
### For 'NATed' or 'None' Internet sharing method
|
2013-12-04 08:39:01 -05:00
|
|
|
* dnsmasq
|
|
|
|
* iptables
|
2013-09-28 02:04:52 -04:00
|
|
|
|
2013-12-04 09:19:36 -05:00
|
|
|
### For 'Bridged' Internet sharing method
|
2013-12-04 08:39:01 -05:00
|
|
|
* bridge-utils
|
|
|
|
* dhclient
|
2013-09-28 02:04:52 -04:00
|
|
|
|
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
## Installation
|
|
|
|
###
|
|
|
|
git clone https://github.com/oblique/create_ap
|
|
|
|
cd create_ap
|
|
|
|
make install
|
2013-11-17 06:43:50 -05:00
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
### No passphrase (open network):
|
|
|
|
create_ap wlan0 eth0 MyAccessPoint
|
2013-11-17 06:43:50 -05:00
|
|
|
|
2013-09-28 02:04:52 -04:00
|
|
|
### WPA + WPA2 passphrase:
|
2013-12-04 08:39:01 -05:00
|
|
|
create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
|
2013-09-28 02:04:52 -04:00
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
### AP without Internet sharing:
|
|
|
|
create_ap -n wlan0 MyAccessPoint MyPassPhrase
|
2013-09-28 02:04:52 -04:00
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
### Bridged Internet sharing:
|
|
|
|
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
|
2013-11-17 06:43:50 -05:00
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
### Internet sharing from the same WiFi interface:
|
|
|
|
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
|
2013-11-17 06:43:50 -05:00
|
|
|
|
2013-12-15 05:38:06 -05:00
|
|
|
### Choose a different WiFi adapter driver
|
|
|
|
create_ap --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase
|
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
### No passphrase (open network) using pipe:
|
|
|
|
echo -e "MyAccessPoint" | create_ap wlan0 eth0
|
2013-09-28 02:04:52 -04:00
|
|
|
|
2013-12-04 08:39:01 -05:00
|
|
|
### WPA + WPA2 passphrase using pipe:
|
|
|
|
echo -e "MyAccessPoint\nMyPassPhrase" | create_ap wlan0 eth0
|
2013-11-17 06:43:50 -05:00
|
|
|
|
2013-11-29 09:03:34 -05:00
|
|
|
|
|
|
|
## Systemd service
|
|
|
|
Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage) service
|
|
|
|
### Start service immediately:
|
2013-12-04 08:39:01 -05:00
|
|
|
systemctl start create_ap
|
2013-11-29 09:03:34 -05:00
|
|
|
|
|
|
|
### Start on boot:
|
2013-12-04 08:39:01 -05:00
|
|
|
systemctl enable create_ap
|
|
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
FreeBSD
|