The first step is to install the required packages: sudo apt-get install dnsmasq hostapd

I'll go into a little detail about the two:

  • hostapd - This is the package that allows you to use the built in WiFi as an access point
  • dnsmasq - This is a combined DHCP and DNS server that's very easy to configure

If you want something a little more 'heavyweight', you can use the isc-dhcp-server and bind9 packages for DHCP and DNS respectively, but for our purposes, dnsmasq works just fine.