Skip to content

Instantly share code, notes, and snippets.

@4noha
Created December 10, 2017 11:47
Show Gist options
  • Save 4noha/9109b6ca317e9fc4d83e080c1af3e19f to your computer and use it in GitHub Desktop.
Save 4noha/9109b6ca317e9fc4d83e080c1af3e19f to your computer and use it in GitHub Desktop.
Create RaspberryPi WiFi AP bridge
ssh [email protected]
> raspberry
sudo apt-get install bridge-utils -y --no-install-recommends
> raspberry
sudo emacs /etc/network/interfaces
"
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
"
sudo /etc/init.d/networking restart
sudo apt-get install hostapd -y --no-install-recommends
# sudo bash -c "zcat /usr/share/doc/hostapd/examples/hostapd.conf.gz > /etc/hostapd/hostapd.conf"
# grep -v -e '^\s*#' -e '^\s*$' /etc/hostapd/hostapd.conf > /etc/hostapd/hostapd.conf
# sudo chmod 600 /etc/hostapd/hostapd.conf
sudo emacs /etc/hostapd/hostapd.conf
"
interface=wlan0
bridge=br0
driver=nl80211
ssid=aws_button23f
country_code=JP
hw_mode=g
channel=7
auth_algs=1
#ieee80211n=1
wpa=2
wpa_passphrase=takuya01
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
"
sudo hostapd /etc/hostapd/hostapd.conf
sudo emacs /etc/default/hostapd
> DAEMON_CONF="/etc/hostapd/hostapd.conf"
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment