Skip to content

Instantly share code, notes, and snippets.

@mitchellmebane
Last active March 7, 2016 06:22
Show Gist options
  • Save mitchellmebane/f5ed2dd7c1e483f9dc5c to your computer and use it in GitHub Desktop.
Save mitchellmebane/f5ed2dd7c1e483f9dc5c to your computer and use it in GitHub Desktop.
/etc/default/hostapd:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
/etc/hostapd/hostapd.conf:
interface=wlan0
channel=3
ssid=browserhax
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_passphrase=qpwoeiruty
country_code=US
ieee80211d=0
driver=nl80211
hw_mode=g
ieee80211n=1
wmm_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40]
/etc/NetworkManager/NetworkManager.conf (make sure keyfile plugin is enabled, find adapter MAC and add it to unmanaged-devices in keyfile section. Create keyfile section if it doesn't exist.):
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
[keyfile]
unmanaged-devices=mac:10:fe:ed:23:d9:22
/etc/network/interfaces:
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.2.1
netmask 255.255.255.0
broadcast 192.168.2.255
pre-up rfkill unblock wifi
up service isc-dhcp-server start && service hostapd start
down service hostapd stop && service isc-dhcp-server stop
/etc/default/isc-dhcp-server:
INTERFACES="wlan0"
/etc/dhcp/dhcpd.conf (appended at bottom, after defaults):
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.10 192.168.2.20;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option domain-name-servers 192.168.2.1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment