<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi%3A_Wireless_Access_Point</id>
	<title>Raspberry Pi: Wireless Access Point - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/index.php?action=history&amp;feed=atom&amp;title=Raspberry_Pi%3A_Wireless_Access_Point"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Raspberry_Pi:_Wireless_Access_Point&amp;action=history"/>
	<updated>2026-09-10T16:20:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Raspberry_Pi:_Wireless_Access_Point&amp;diff=3862&amp;oldid=prev</id>
		<title>Cskallak: Created page with &quot;== Summary ==   This Documentation is a step by step guidance to convert your Raspberry Pi into a Wlan Access Point  == Requirements ==  * at least a Raspberry Pi 3B+  == Desc...&quot;</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Raspberry_Pi:_Wireless_Access_Point&amp;diff=3862&amp;oldid=prev"/>
		<updated>2020-05-24T10:57:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Summary ==   This Documentation is a step by step guidance to convert your Raspberry Pi into a Wlan Access Point  == Requirements ==  * at least a Raspberry Pi 3B+  == Desc...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This Documentation is a step by step guidance to convert your Raspberry Pi into a Wlan Access Point&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* at least a Raspberry Pi 3B+&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Updating the package repositories of your system ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt update &lt;br /&gt;
 sudo apt upgrade&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Installing the needed packages  ===&lt;br /&gt;
&lt;br /&gt;
Install hostapd, which  is an package that allows you to use your raspberry pi as an access point:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install hostapd&lt;br /&gt;
&lt;br /&gt;
Install dnsmasq, which allows your Pi to operate as an DHCP and DNS server&lt;br /&gt;
&lt;br /&gt;
 sudo apt install dnsmasq&lt;br /&gt;
&lt;br /&gt;
=== Step 3:  Configure the packages ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Set up the DNS, DHCP service&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
sudo nano /etc/dnsmasq.conf&lt;br /&gt;
&lt;br /&gt;
Add the following lines:&lt;br /&gt;
&lt;br /&gt;
 # Set active Interfaces&lt;br /&gt;
 interface=wlan0&lt;br /&gt;
&lt;br /&gt;
 # Set passvie Interfaces&lt;br /&gt;
 no-dhcp-interface=eth0&lt;br /&gt;
&lt;br /&gt;
 # Set IPv4 Address range and the leas time &lt;br /&gt;
 # The IP doesn&amp;#039;t have to be 10.0.5.X you can use an preferred one&lt;br /&gt;
 # syntax dhcp-range= start of range, end of range, lease time&lt;br /&gt;
 dhcp-range=10.0.5.100,10.0.5.160,24h&lt;br /&gt;
&lt;br /&gt;
 # Setting the dns Server&lt;br /&gt;
 dhcp-option=option:dns-server,10.0.5.1&lt;br /&gt;
&lt;br /&gt;
Test the DHCP service configuration&lt;br /&gt;
&lt;br /&gt;
 dnsmasq --test -C /etc/dnsmasq.conf&lt;br /&gt;
&lt;br /&gt;
Restart the DHCP service to apply changes&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl restart dnsmasq&lt;br /&gt;
 sudo systemctl status dnsmasq&lt;br /&gt;
&lt;br /&gt;
Set dnsmasq as an startup service&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable dnsmasq&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Create a static IPv4 address for wlan0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
add the following lines&lt;br /&gt;
&lt;br /&gt;
 interface wlan0&lt;br /&gt;
    static ip_address=10.0.5.1/24&lt;br /&gt;
    nohook wpa_supplicant&lt;br /&gt;
&lt;br /&gt;
and reboot your system&lt;br /&gt;
&lt;br /&gt;
 sudo reboot&lt;br /&gt;
&lt;br /&gt;
Note: The wlan0 IP address has to be the same as the dns address in the dnsmasq.conf file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Set up the WLAN-AP-Host service&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/hostapd/hostapd.conf&lt;br /&gt;
&lt;br /&gt;
This file shloud not be existen by now and there fore it should be empty by now.&lt;br /&gt;
Insert the following lines and modfiy them as needed.&lt;br /&gt;
&lt;br /&gt;
 # Interface and Driver&lt;br /&gt;
 interface=wlan0&lt;br /&gt;
 #driver=nl80211&lt;br /&gt;
 &lt;br /&gt;
 # WLAN-Configuration&lt;br /&gt;
 ssid=&amp;lt;Insert Wland Router Name Here&amp;gt;&lt;br /&gt;
 channel=1&lt;br /&gt;
 hw_mode=g&lt;br /&gt;
 ieee80211n=1&lt;br /&gt;
 ieee80211d=1&lt;br /&gt;
 country_code=DE&lt;br /&gt;
 wmm_enabled=1&lt;br /&gt;
 &lt;br /&gt;
 # WLAN-Encryption&lt;br /&gt;
 auth_algs=1&lt;br /&gt;
 wpa=2&lt;br /&gt;
 wpa_key_mgmt=WPA-PSK&lt;br /&gt;
 rsn_pairwise=CCMP&lt;br /&gt;
 wpa_passphrase=&amp;lt;Insert Password Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the UNIX permissions of the hostapd.conf file&lt;br /&gt;
&lt;br /&gt;
 sudo chmod 600 /etc/hostapd/hostapd.conf&lt;br /&gt;
&lt;br /&gt;
Test the hostapd configuration&lt;br /&gt;
 &lt;br /&gt;
 sudo hostapd -dd /etc/hostapd/hostapd.conf&lt;br /&gt;
&lt;br /&gt;
The configuraten is valid if you see the following lines&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 wlan0: interface state COUNTRY_UPDATE-&amp;gt;ENABLED&lt;br /&gt;
 ...&lt;br /&gt;
 wlan0: AP-ENABLED&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Exit the debug mode with STRG + C&lt;br /&gt;
&lt;br /&gt;
Configure hostapd to be an daemon background process&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/default/hostapd&lt;br /&gt;
&lt;br /&gt;
and add the following lines&lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=yes&lt;br /&gt;
 DAEMON_CONF=&amp;quot;/etc/hostapd/hostapd.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Start hostapd with the configuration and set it up as an startup service&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl unmask hostapd&lt;br /&gt;
 sudo systemctl start hostapd&lt;br /&gt;
 sudo systemctl enable hostapd&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Allow NAT routing to between eth0 and wlan0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Enable IPv4 Routing permanently:&lt;br /&gt;
Open /etc/sysctl.conf&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/sysctl.conf&lt;br /&gt;
&lt;br /&gt;
and uncomment or add the following line of code&lt;br /&gt;
&lt;br /&gt;
 net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
Creating a iptable entry for NAT routing&lt;br /&gt;
&lt;br /&gt;
 sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Persist the iptbales rules:&lt;br /&gt;
&lt;br /&gt;
Install iptables-persistent and choose to save the current settings in the install process&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install iptables-persistent&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
Raspberry Pi 3B+&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md&lt;br /&gt;
* https://www.elektronik-kompendium.de/sites/raspberry-pi/2002171.htm&lt;br /&gt;
* https://askubuntu.com/questions/119393/how-to-save-rules-of-the-iptables&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Cskallak</name></author>
	</entry>
</feed>