Creating a Wireless Hotspot using Raspberry Pi 3 with WiFi-to-WiFi Connection Instead of Ethernet-to-WiFi

The inquiry is regarding the transformation of a Raspberry Pi 3 into a device that can enhance weak WiFi signals. This can be achieved by creating a new interface, assigning it a unique MAC address, and connecting it to the network. The connection to the network can be established by assigning an ESSID and using dhclient to obtain an IP address. The desired outcome is to have a WiFi signal amplifier, wireless repeater/extender, or WiFi hotspot.


I am interested in transforming my
Raspberry Pi
3 into an amplified device such as a WiFi hotspot, wireless repeater/extender, or amplifier that can strengthen a weak WiFi signal.

Upon conducting research, I stumbled upon this tutorial. Access it by clicking here.

I attempt to adhere to adityap174’s given response.

  1. Disable the network manager service to prevent any interference it may cause with virtual interfaces.
  2. Use the command “ifconfig wlan0 down” to disable the wlan0 interface.
  3. Establish a new access point interface and allocate it a unique MAC address.
  4. Start the hostapd service on
    access interface
  5. Utilize dnsmasq for assigning IP addresses to the connecting clients on this interface and set the IP of the station interface as the default gateway.
  6. Enable dnsmasq on the access interface.
  7. Generate a fresh
    interface assign
    and utilize it to link the device to the network. This involves segregating the MAC address and assigning an ESSID, followed by obtaining an IP address through the use of DHClient.
  8. Execute iptables command for ip masquerading if required.

Even though I successfully set up the new interface and the AP is visible, I am unable to connect to the AP due to the failure in obtaining the assigned IP address.

The software that I install consists of hostapd and dnsmasq.

My device is configured to utilize wlan0 as a station while myAcc is designated as the access point.

My command:

 sudo systemctl disable NetworkManager.service
 sudo ifconfig wlan0 down up
 sudo iw phy phy0 interface add myAcc type __ap
 sudo ifconfig myAcc hw ether A4:17:FE:6E:00:53
 sudo ifconfig myAcc up
 sudo nano /etc/hostapd/hostapd.conf
 sudo service hostapd start
 sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig  
 sudo nano /etc/dnsmasq.conf 
 sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE  
 sudo iptables -A FORWARD -i wlan0 -o myAcc -m state --state RELATED,ESTABLISHED -j ACCEPT  
 sudo iptables -A FORWARD -i myAcc -o wlan0 -j ACCEPT
 sudo sh -c "iptables-save > /etc/iptables.ipv4.nat
 iptables-restore < /etc/iptables.ipv4.nat 
 sudo service dnsmasq start 

In hostapd.conf:


In dnsmasq.conf:


The value of net.ipv4.ip_forward has been set to 1 in the sysctl.conf file.

Solution 1:

Discover the solution to your inquiry in this post, which sets up
Raspberry PI
along with multiple wireless connections and a single Access Point.

It provides instructions on the specific lines that require editing in both hostapd and dnsmasq.

Solution 2:

Try to install

sudo apt-get install isc-dhcp-server

In order to configure a DHCP server for your access point interface, you can find instructions on how to do so.

Here is the documentation for the ISC DHCP server on the Ubuntu Community website.

Frequently Asked Questions

Posted in Uncategorized