From charlesreid1

(Created page with "Making a Raspberry Pi a hotspot See https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md ==Installing Stuff== <pre> sudo apt install dnsmasq hos...")
 
No edit summary
Line 8: Line 8:
sudo apt install dnsmasq hostapd dhcpcd5
sudo apt install dnsmasq hostapd dhcpcd5
</pre>
</pre>
==Edit dhcpcd config file==
Edit <code>/etc/dhcpcd.conf</code> and modify it to contain this:
<pre>
interface wlan0
    static ip_address=192.168.4.1/24
    nohook wpa_supplicant
</pre>
replace wlan0 with whatever interface you want to use.
==Edit dnsmmasq config file==
Edit the dnsmasq config file <code>/etc/dnsmasq.conf</code>, which determines what range of ip addresses will be handed out and for how long. Modify it to contain this:
<pre>
interface=wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
</pre>
This will hand out IPs starting at 192.168.4.2 and ending at 192.168.4.20, lasting for 24 hours lease time.
Modify wlan0 to whatever interface you are using to provide the wifi network.

Revision as of 02:49, 24 November 2019

Making a Raspberry Pi a hotspot

See https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

Installing Stuff

sudo apt install dnsmasq hostapd dhcpcd5

Edit dhcpcd config file

Edit /etc/dhcpcd.conf and modify it to contain this:

interface wlan0
    static ip_address=192.168.4.1/24
    nohook wpa_supplicant

replace wlan0 with whatever interface you want to use.

Edit dnsmmasq config file

Edit the dnsmasq config file /etc/dnsmasq.conf, which determines what range of ip addresses will be handed out and for how long. Modify it to contain this:

interface=wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h

This will hand out IPs starting at 192.168.4.2 and ending at 192.168.4.20, lasting for 24 hours lease time.

Modify wlan0 to whatever interface you are using to provide the wifi network.