RaspberryPi/Hotspot: Difference between revisions
From charlesreid1
No edit summary |
|||
| Line 20: | Line 20: | ||
replace wlan0 with whatever interface you want to use. | replace wlan0 with whatever interface you want to use. | ||
===Restart dhcpcd service=== | |||
<pre> | |||
sudo service dhcpcd restart | |||
</pre> | |||
==Edit dnsmmasq config file== | ==Edit dnsmmasq config file== | ||
Revision as of 02:52, 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.
Restart dhcpcd service
sudo service dhcpcd restart
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.