Raspberry Pi Zero Wの設定

Raspberry Pi Zero Wを購入して初期設定したのでメモ。

実施内容

  1. イメージのSDカードへの書き込み
    • https://www.raspberrypi.org/ から RASPBIAN STRETCH WITH DESKTOP をダウンロード
    • Win32DiskImagerを使用してSDカードへ書き込み
  2. 初期設定
  3. WiFiで接続(クライアントとして動作)
  4. APモードに切り替える(アクセスポイントとして動作)
/etc/dnsmasq.conf
/etc/hostapd/hostapd.conf
/etc/network/interfaces
/etc/default/hostapd
/etc/dhcpcd.conf
    • WiFiモード(クライアント)とAPモード(アクセスポイント)を切り替えるために以下を実施
      • それぞれ、元の設定を.wifiとして、APモードの設定を.apとして残しておく
/etc/dhcpcd.conf.wifi
/etc/dhcpcd.conf.ap
/etc/network/interfaces.wifi
/etc/network/interfaces.ap
      • 切り替える
APモードへ
sudo cp -p /etc/dhcpcd.conf.ap /etc/dhcpcd.conf
sudo cp -p /etc/network/interfaces.ap /etc/network/interfaces
sudo systemctl enable dnsmasq
sudo systemctl enable hostapd
sudo service dnsmasq start
sudo service hostapd start
→ リブート
WiFiモードへ
sudo cp -p /etc/dhcpcd.conf.wifi /etc/dhcpcd.conf
sudo cp -p /etc/network/interfaces.wifi /etc/network/interfaces
sudo systemctl disable dnsmasq
sudo systemctl disable hostapd
→ リブート

TCP UDPの転送

Windowsiptablesのようにパケットを転送するソフト。

参考

UDP/ TCP forwarder

FeatureList

  • Forward multiple ports simultaneously with rock-solid stability.
  • Filter clients by IP address, optionally in real-time via text-file monitoring, or otherwise via an external Web server.
  • View data throughput speed, total bytes transferred, and connection count.
  • See when clients establish connections to your ports, optionally logging to a text file.
  • Configure your forwards locally using a GUI, remotely using a Web browser, or universally using both.
  • Run without installing, run installed, or run as a system service -- your choice.
  • Run directly from a flash drive while using relative folder paths for all settings.
  • Keep it clean by hiding in the system tray.
  • Get future-ready with full support for IPv6 and ScopeIDs.
  • Optionally bind interfaces via IPv4, IPv6, or MAC address.
  • Capture data transfers from UDP and TCP ports while saving to disk in real-time.
  • Split and multiplex UDP datagrams in multiple directions, such as for relaying SNMP traps to a slew of servers.
  • Take full advantage of your investment with 64-bit CPU utilisation for optimal performance.
  • Keep your servers accessible with an interface monitoring system that keeps the forwards flowing -- even in unstable conditions.
  • Manipulate data as it is forwarded from client-to-server or server-to-client using an open-source plugin.
NetworkActiv AUTAPF - UDP/TCP Port Forwarder

nginx

Windowsでnginxを使用する際の参考サイト(Windowsに絞ってメモ)。

参考

nginx + PHP
nginx + + SSL

OpenWrt

TODO

参考

PLANEX MZK-WNH & OpenWrt
PLANEX MZK-WNH & OpenWrt & OpenFlow