Your Name il y a 1 an
Parent
commit
4bca1b941a
1 fichiers modifiés avec 47 ajouts et 0 suppressions
  1. 47 0
      hotspot_offline/hotspot_offline

+ 47 - 0
hotspot_offline/hotspot_offline

@@ -0,0 +1,47 @@
+sudo apt install dnsmasq hostapd
+sudo nano /etc/dhcpcd.conf
+ajouter à la fin
+
+interface wlan0
+    static ip_address=192.168.4.1/24
+    nohook resolv.conf, wpa_supplicant
+
+
+sudo nano /etc/dnsmasq.d/hotspot.conf
+interface=wlan0
+
+# Gateway + DNS server
+dhcp-option=3,192.168.4.1
+dhcp-option=6,192.168.4.1
+
+# specify the range of IPs that will be handed out
+dhcp-range=192.168.4.2,192.168.4.200,255.255.255.0,24h
+
+# Let the Raspberry Pi resolve to all DNS queries
+address=/#/192.168.4.1
+
+sudo nano /etc/default/dnsmasq
+# do not overwrite /etc/resolv.conf so that local DNS still goes through
+DNSMASQ_EXCEPT=lo
+
+sudo nano /etc/hostapd/hostapd.conf
+interface=wlan0
+driver=nl80211
+ssid=Testme
+hw_mode=g
+channel=5
+wmm_enabled=0
+macaddr_acl=0
+auth_algs=1
+ignore_broadcast_ssid=0
+
+# Remove the '#' in front of below lines to set a password 'Password'
+wpa=2
+wpa_passphrase=Password
+ wpa_key_mgmt=WPA-PSK
+ wpa_pairwise=TKIP
+ rsn_pairwise=CCMP
+
+
+sudo nano /etc/default/hostapd
+DAEMON_CONF="/etc/hostapd/hostapd.conf"