How to create an Access Point from the current WiFi connection?
can an adapter have both a hotspot and be connected to a WiFi network at the same time?
Yes , it's possible to create a hotspot wifi from the same wifi connection
How do I share the Internet of the currently connected network over a hotspot in Linux?
You should use create_ap
Install the dependencies :
sudo apt-get install dnsmasq haveged hostapd build-essential
To install create_ap
run:
git clone https://github.com/oblique/create_ap
cd create_ap
sudo make install
enable/start the service:
service create_ap start
To check the status run:
service create_ap status
Using the systemd
features (it is not available on Ubuntu 14.04):
sudo systemctl start create_ap.service
sudo systemctl enable create_ap.service
Create the AP
To create your access point run:
sudo create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
Update for Ubuntu 14.04:
the
hostapd
version in Ubuntu 14.04 is buggy and doesn't work properly. To get AP-Hotspot to work withhostapd
in Ubuntu 14.04, you need to downgradehostapd
and useapt
to hold the package so it's not upgraded.
Remove the current version of hostapd
:
sudo apt-get remove hostapd
64bit
cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd
32bit
cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd