pastebin - collaborative debugging tool
pi.kpaste.net RSS


Setup Pi Zero W as Wifi Router Raspbian 9
Posted by Anonymous on Sun 4th Nov 2018 23:55
raw | new post
modification of post by Anonymous (view diff)

  1. echo raspian 9 debian 9
  2. echo notes are taken from
  3. echo http://www.raspberryconnect.com/network/item/333-raspberry-pi-hotspot-access-point-dhcpcd-method
  4.  
  5. sudo apt-get update
  6. sudo apt-get upgrade
  7. sudo apt-get install joe -y
  8. sudo apt-get install hostapd -y
  9. sudo apt-get install dnsmasq -y
  10.  
  11. dpkg -s dnsmasq
  12. echo if version < 2.77
  13. echo sudo apt-get purge dns-root-data -y
  14.  
  15. cat >>/etc/hostapd/hostapd.conf <<EOF
  16. interface=wlan0
  17. driver=nl80211
  18. ssid=RPiHotSpot
  19. hw_mode=g
  20. channel=6
  21. wmm_enabled=0
  22. macaddr_acl=0
  23. auth_algs=1
  24. ignore_broadcast_ssid=0
  25. wpa=2
  26. wpa_passphrase=raspberry
  27. wpa_key_mgmt=WPA-PSK
  28. wpa_pairwise=TKIP
  29. rsn_pairwise=CCMP
  30. EOF
  31.  
  32. cat /etc/default/hostapd
  33. echo "-----"
  34. #DAEMON_OPTS=""
  35. cat >> /etc/default/hostapd <<EOF
  36. DAEMON_CONF="/etc/hostapd/hostapd.conf"
  37. EOF
  38. echo "-----"
  39. cat /etc/default/hostapd
  40.  
  41.  
  42.  
  43. cat >> /etc/dnsmasq.conf <<EOF
  44.  
  45. #RPiHotspot config - No Intenet
  46. interface=wlan0
  47. domain-needed
  48. bogus-priv
  49. dhcp-range=192.168.99.150,192.168.99.200,255.255.255.0,12h
  50. EOF
  51.  
  52.  
  53. cat >>/etc/dhcpcd.conf <<EOF
  54.  
  55. nohook wpa_supplicant
  56. interface wlan0
  57. static ip_address=192.168.99.1/24
  58. static routers=192.168.50.1
  59. EOF
  60.  
  61.  
  62. cat >> /etc/sysctl.conf <<EOF
  63.  
  64. net.ipv4.ip_forward=1
  65. EOF
  66.  
  67.  
  68. echo USB automount
  69. sudo apt-get install usbmount -y
  70. sed -i 's/MountFlags=slave/MountFlags=shared/g' /lib/systemd/system/systemd-udevd.service
  71.  
  72. echo fish://pi@192.168.99.1:/home/pi/

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at