<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.marcelpost.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Wifi-hotspot</id>
	<title>Wifi-hotspot - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.marcelpost.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Wifi-hotspot"/>
	<link rel="alternate" type="text/html" href="https://www.marcelpost.com/wiki/index.php?title=Wifi-hotspot&amp;action=history"/>
	<updated>2026-04-29T09:58:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://www.marcelpost.com/wiki/index.php?title=Wifi-hotspot&amp;diff=4005&amp;oldid=prev</id>
		<title>Admin at 20:25, 15 November 2025</title>
		<link rel="alternate" type="text/html" href="https://www.marcelpost.com/wiki/index.php?title=Wifi-hotspot&amp;diff=4005&amp;oldid=prev"/>
		<updated>2025-11-15T20:25:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:25, 15 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;These issues made me look at rolling my own wifi extender using a raspberry pi.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;These issues made me look at rolling my own wifi extender using a raspberry pi.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Update (Nov 2025) -- [[Wifi-hotspot2]] wifi hotspot using NetworkManager v2&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===What I discovered===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===What I discovered===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key mw:diff:wikidiff2:1.12:old-3750:rev-4005:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://www.marcelpost.com/wiki/index.php?title=Wifi-hotspot&amp;diff=3750&amp;oldid=prev</id>
		<title>Admin at 03:23, 8 November 2024</title>
		<link rel="alternate" type="text/html" href="https://www.marcelpost.com/wiki/index.php?title=Wifi-hotspot&amp;diff=3750&amp;oldid=prev"/>
		<updated>2024-11-08T03:23:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;experimental setup, use at your own risk!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lots of random info here, just so I have a central place to keep configs, tips, links, etc..&lt;br /&gt;
&lt;br /&gt;
===What&amp;#039;s this about?===&lt;br /&gt;
&lt;br /&gt;
The wireless range extender I bought (D-Link DAP-1530) didn&amp;#039;t quite work the way I wanted with the systems I was using:&lt;br /&gt;
* after boot-up, the extender takes 11 minutes to finally settle if it can&amp;#039;t detect an Internet connection&lt;br /&gt;
* the device I wanted it to connect to is a Linux box that is configured as an access point, but every time I need to reboot the Linux box, the range extender loses its mind and needs a cold restart to regain connectivity with the Linux box.&lt;br /&gt;
&lt;br /&gt;
These issues made me look at rolling my own wifi extender using a raspberry pi.&lt;br /&gt;
&lt;br /&gt;
===What I discovered===&lt;br /&gt;
&lt;br /&gt;
There are a lot of articles and howto&amp;#039;s on setting up a shared hotspot, but many of them use several components (hostapd, dhcpcd, resolveconf, wpa_supplicant, dnsmasq) that all need to be talking to each other the right way. With too many variables, many things can go wrong. Although these solutions may work, the simplicity of a more integrated network managing system like NetworkManager makes a lot more sense to me. The setup below still uses wpa_supplicant and dnsmasq alongside NetworkManager, but the work to get it set up is way less.&lt;br /&gt;
&lt;br /&gt;
* Terminology: a Hotspot is the same as an Access Point; they do the same things.&lt;br /&gt;
* Don&amp;#039;t use iwd, hostapd or dnsmasq(*) but instead use NetworkManager; it&amp;#039;s the modern way to manage network configurations&lt;br /&gt;
* You can safely uninstall iwd, hostapd, dhcpcd, dhclient as NetworkManager has a built-in DHCP and DNS server and can set up Access Points just fine&lt;br /&gt;
* You do not need any editing in /etc/network/interfaces and friends&lt;br /&gt;
* You do not need /etc/hostapd*, or /etc/dhcpcd*, or /etc/dnsmasq* files&lt;br /&gt;
* You do not need resolvconf; the systemd installed version of systemd-resolved is fine and is used by NetworkManager&lt;br /&gt;
* The out-of-the-box NetworkManager does not need any further config files (I&amp;#039;m looking at you /etc/NetworkManager/conf.d/dns.conf with your dns=dnsmasq)&lt;br /&gt;
* Running a wifi-client and an Access Point on the same network card (it&amp;#039;s called AP-STA) may be possible, but try with two separate adapters first&lt;br /&gt;
* learn the basic commands of nmcli; it&amp;#039;s a very nice tool to manipulate the network configurations&lt;br /&gt;
* NetworkManager uses simple key-files which are in plain text readable ascii&lt;br /&gt;
* If you want to manually edit any of the configurations files under /etc/NetworkManager be sure to load the new config with nmcli general reload&lt;br /&gt;
* the creation of a hotspot with NetworkManager has it&amp;#039;s own shortcut &amp;#039;wifi hotspot&amp;#039;, which really simplifies things, see example below&lt;br /&gt;
* You do not need to put any additional configuration in /etc/wpa_supplicant/* (the default wpa_supplicant.conf is fine)&lt;br /&gt;
* once the hotspot has been configured it does not load up automatically, do this from /etc/rc.local (maybe use autoconnect=yes?)&lt;br /&gt;
* the setup created by the scripts shown below creates a NAT-shared wifi extender; i.e. the clients will be on a completely different subnet than the HomeWifi network&lt;br /&gt;
* when the AP (connects to the HomeWifi) and the hotspot (broadcasts its own SSID) are running, you should have two green/connected lines in nmcli con (if using two adapters)&lt;br /&gt;
* Use a USB Wireless adapter that is supported by the Linux kernel out of the box, otherwise you&amp;#039;ll have to compile the drivers for it (doable, example: [[Linux wifi dongles]])&lt;br /&gt;
(*) NetworkManager does use the dnsmasq binary, but it only needs dnsmasq-base and the dnsmasq systemd service should be set to masked/disabled/stopped.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So far I have only been using 2.4Ghz 802.11 bg modes. This is probably less efficient than n mode, but for now I&amp;#039;m documenting just bg mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Network-diagram-wifi-nat-router.png]]&lt;br /&gt;
&lt;br /&gt;
===Sample scripts===&lt;br /&gt;
&lt;br /&gt;
Create the normal client connection to another wifi router&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# use this to create a wifi connection using wlan0 to connect to your Internet-connected home wifi network&lt;br /&gt;
SSID=&amp;quot;HomeWifi&amp;quot;&lt;br /&gt;
IF=&amp;quot;wlan0&amp;quot;&lt;br /&gt;
nmcli con add con-name $SSID type wifi ssid $SSID ifname $IF &lt;br /&gt;
nmcli con mod $SSID 802-11-wireless-security.key-mgmt WPA-PSK &lt;br /&gt;
nmcli con mod $SSID 802-11-wireless-security.psk &amp;quot;secretpassword&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create the hotspot connection&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# use this to create a hotspot (aka Access Point) using wlan1 so other wireless clients can connect and use the internet from wlan0&lt;br /&gt;
# WPA-PSK is implied with &amp;#039;wifi hotspot&amp;#039;&lt;br /&gt;
IF=&amp;quot;wlan1&amp;quot;&lt;br /&gt;
SSID=&amp;quot;HomeWifi-EXT&amp;quot;&lt;br /&gt;
nmcli dev wifi hotspot ssid $SSID password &amp;quot;secretpasswordext&amp;quot; ifname $IF band bg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup port forwarding:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/NetworkManager/dispatcher.d/pre-up/90-modify-nft-firewall&lt;br /&gt;
&lt;br /&gt;
nft flush ruleset&lt;br /&gt;
&lt;br /&gt;
nft -f - &amp;lt;&amp;lt;EOF&lt;br /&gt;
table ip nm-shared-wlan1 {&lt;br /&gt;
        chain nat_postrouting {&lt;br /&gt;
                type nat hook postrouting priority srcnat; policy accept;&lt;br /&gt;
                ip saddr 10.42.0.0/24 ip daddr != 10.42.0.0/24 masquerade&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        chain filter_forward {&lt;br /&gt;
                type filter hook forward priority filter; policy accept;&lt;br /&gt;
                ip daddr 10.42.0.0/24 oifname &amp;quot;wlan1&amp;quot; iifname &amp;quot;wlan0&amp;quot; accept&lt;br /&gt;
                ip saddr 10.42.0.0/24 iifname &amp;quot;wlan1&amp;quot; oifname &amp;quot;wlan0&amp;quot; accept&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        chain prerouting {&lt;br /&gt;
                type nat hook prerouting priority dstnat; policy accept;&lt;br /&gt;
                tcp dport 5901 dnat to 10.42.0.26&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setup client ip address reservations:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/NetworkManager/dnsmasq-shared.d/10-reserved-client-ip-addresses&lt;br /&gt;
dhcp-host=28:11:a8:f4:8d:91,10.42.0.26&lt;br /&gt;
dhcp-host=c0:55:12:da:f3:12,10.42.0.27&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
If things don&amp;#039;t work, try to get as much information as you can:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# show all wireless interfaces&lt;br /&gt;
iwconfig&lt;br /&gt;
&lt;br /&gt;
# show currently configured adapters&lt;br /&gt;
ip a&lt;br /&gt;
&lt;br /&gt;
# show default route&lt;br /&gt;
ip route&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wpa_cli -i &amp;lt;interface&amp;gt; log_level debug # show lots of activity&lt;br /&gt;
&lt;br /&gt;
# show logs (-f or --follow) as they get produced&lt;br /&gt;
journalctl -u NetworkManager -u wpa_supplicant -u systemd-networkd --follow&lt;br /&gt;
&lt;br /&gt;
wpa_cli -i &amp;lt;interface&amp;gt; log-level info # default (not sure if it has to be set back)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check country and permitted wifi bands/frequencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
iw reg get&lt;br /&gt;
iw reg set &amp;lt;CC&amp;gt;&lt;br /&gt;
&lt;br /&gt;
iw phy phy0 info&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/NetworkManager/conf.d/99-wifi.conf&lt;br /&gt;
# disable mac address randomization (optional, I didn&amp;#039;t have to disable it on my system)&lt;br /&gt;
[device-wifi-no-scan-mac-rand]&lt;br /&gt;
wifi.scan-rand-mac-address=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# show DHCP leases obtained by clients on the wlan1 network:&lt;br /&gt;
cat /var/lib/NetworkManager/dnsmasq-wlan1.leases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# show netfilter ip rules&lt;br /&gt;
nft list ruleset&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===TODO===&lt;br /&gt;
* autoconnect hotspot (not with rc.local)&lt;br /&gt;
* connect with 802.11n mode (ideally 40MHz bandwidth)&lt;br /&gt;
* ability to set different wifi channels (if nearby congestion)&lt;br /&gt;
* move from NAT to bridge (DHCP forward and everything on same subnet)&lt;br /&gt;
* have AP_STA (Access Point + Client) on one network adapter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Resources===&lt;br /&gt;
&lt;br /&gt;
General info:&lt;br /&gt;
&lt;br /&gt;
* https://www.raspberrypi.com/tutorials/host-a-hotel-wifi-hotspot/&lt;br /&gt;
* https://wiki.archlinux.org/title/Software_access_point&lt;br /&gt;
* https://wiki.archlinux.org/title/NetworkManager&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
* https://unix.stackexchange.com/questions/612498/hotspot-network-creation-took-too-long-and-failed-activation&lt;br /&gt;
* https://github.com/raspberrypi/bookworm-feedback/issues/220&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>