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.
|
2015-09-28 00:36:17 -04:00
|
|
|
* Disable communication between clients (client isolation).
|
2014-04-03 08:57:26 -04:00
|
|
|
* IEEE 802.11n support
|
2013-12-04 08:39:01 -05:00
|
|
|
* 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)
|
2015-03-24 19:21:01 -04:00
|
|
|
* procps or procps-ng
|
2013-09-28 03:45:59 -04:00
|
|
|
* hostapd
|
|
|
|
* iproute2
|
2013-12-04 08:39:01 -05:00
|
|
|
* iw
|
2014-08-28 13:46:52 -04:00
|
|
|
* iwconfig (you only need this if 'iw' can not recognize your adapter)
|
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 08:39:01 -05:00
|
|
|
## Installation
|
2014-08-04 08:17:43 -04:00
|
|
|
### Generic
|
2013-12-04 08:39:01 -05:00
|
|
|
git clone https://github.com/oblique/create_ap
|
|
|
|
cd create_ap
|
|
|
|
make install
|
2013-11-17 06:43:50 -05:00
|
|
|
|
2014-08-04 08:17:43 -04:00
|
|
|
### ArchLinux (AUR)
|
|
|
|
yaourt -S create_ap
|
|
|
|
|
|
|
|
### Gentoo
|
|
|
|
emerge layman
|
2014-11-11 01:03:32 -05:00
|
|
|
layman -f -a jorgicio
|
2014-08-04 08:17:43 -04:00
|
|
|
emerge net-wireless/create_ap
|
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
|
|
|
|
2014-09-04 18:53:42 -04:00
|
|
|
### Bridged Internet sharing (pre-configured bridge interface):
|
|
|
|
create_ap -m bridge wlan0 br0 MyAccessPoint MyPassPhrase
|
|
|
|
|
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
|
|
|
|
2014-04-03 08:57:26 -04:00
|
|
|
### Enable IEEE 802.11n
|
|
|
|
create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase
|
2013-11-29 09:03:34 -05:00
|
|
|
|
2015-09-28 00:36:17 -04:00
|
|
|
### Client Isolation:
|
|
|
|
create_ap --isolate-clients wlan0 eth0 MyAccessPoint MyPassPhrase
|
|
|
|
|
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
|
2014-08-28 13:46:52 -04:00
|
|
|
FreeBSD
|