ユーザ用ツール

サイト用ツール


raspberrypi:log20190220_simple_router

Raspberry Pi 3 B+ を簡易ルーターにする(編集中)

無線LANアクセスポイントの構築

sudo apt-get install hostapd dnsmasq

内蔵無線LANを固定化

/etc/dhcpcd.conf
...
#最終行に
denyinterfaces wlan0
/etc/network/interfaces.d/wlan0-static.conf
iface wlan0 inet static
    address 192.168.70.1
    netmask 255.255.255.0
    network 192.168.70.0
    broadcast 192.168.70.255

いったん再起動

zcat /usr/share/doc/hostapd/examples/hostapd.conf.gz > ~/hostapd.conf
sudo cp ~/hostapd.conf /etc/hostapd/hostapd.conf
sudo vi /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"

sudo systemctl restart hostapd

/lib/dhcpcd/dhcpcd-hooks/90-dnsmasq
if $if_up; then
  if [ $interface = "wlan0" ]; then
    systemctl restart dnsmasq
  fi
fi
raspberrypi/log20190220_simple_router.txt · 最終更新: 2019-02-11 22:15 by tosihisa@netfort.gr.jp