Enable Hotspot Service on Startup
masterTo ensure the hotspot service starts automatically on system boot using your saved configuration, enable the create_ap service with systemd.
systemctl enable create_aprepository·master·Indexed 26 days ago
https://github.com/lakinduakash/linux-wifi-hotspotA tool to share a wifi connection or network interface as a hotspot on Linux, supporting simultaneous wifi connectivity, VPN tunneling, and QR code sharing. It provides both a GUI (wihotspot) and a CLI (create_ap) and is available for Debian, Ubuntu, Arch Linux, and Fedora.
To ensure the hotspot service starts automatically on system boot using your saved configuration, enable the create_ap service with systemd.
systemctl enable create_apwihotspot command in your terminal.wihotspotRealtek's driver uses the wireless-extensions (wext) subsystem, whereas standard hostapd requires nl80211. You must install a patched version of hostapd to support these drivers.
For ArchLinux:
Install hostapd-rtl871xdrv from the AUR (e.g., using yaourt).
For other distributions:
hostapd-2.2 source.rtlxdrv.patch.CONFIG_DRIVER_RTW=y.# ArchLinux
yaourt -S hostapd-rtl871xdrv
# Other distributions
git clone https://github.com/pritambaral/hostapd-rtl871xdrv.git
wget http://w1.fi/releases/hostapd-2.2.tar.gz
tar zxvf hostapd-2.2.tar.gz
cd hostapd-2.2
patch -p1 -i ../hostapd-rtl871xdrv/rtlxdrv.patch
cp ../hostapd-rtl871xdrv/driver_* src/drivers
cd hostapd
cp defconfig .config
echo CONFIG_DRIVER_RTW=y >> .config
make
make installIf you installed from source, you can remove the application using the following command:
sudo make uninstallYou can install Linux Wifi Hotspot on Debian or Ubuntu-based systems using the official PPA or by downloading the latest Debian package from the GitHub releases page.
sudo add-apt-repository ppa:lakinduakash/lwh
sudo apt update
sudo apt install linux-wifi-hotspotwihotspot GUI and select the virtual interface created by your VPN (commonly tun0) as the internet source.The following dependencies are required for create_ap to function:
General Dependencies:
bashutil-linux (for getopt)procps or procps-nghostapdiproute2iwiwconfig (only if iw cannot recognize your adapter)haveged (optional)Dependencies for 'NATed' or 'None' Internet sharing methods:
dnsmasqiptablesThe create_ap command allows you to create an Access Point (AP) with various configurations including encryption, internet sharing methods, and client isolation.
Basic Usage Patterns:
create_ap <wifi_interface> <internet_interface> <SSID>create_ap <wifi_interface> <internet_interface> <SSID> <Passphrase>-n flag.-m bridge flag.wlan0 wlan0).--isolate-clients flag to prevent communication between connected clients.# WPA + WPA2 passphrase
create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
# AP without Internet sharing
create_ap -n wlan0 MyAccessPoint MyPassPhrase
# Bridged Internet sharing
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
# Client Isolation
create_ap --isolate-clients wlan0 eth0 MyAccessPoint MyPassPhraseLinux Wifi Hotspot is available in the AUR. You can install it using an AUR helper like yay.
yay -S linux-wifi-hotspotThe mainline Linux kernel driver often performs poorly with 8192 adapters. To install a fixed version of the Realtek driver using DKMS, execute the following commands:
/etc/modprobe.d.Note: This is specifically for Realtek adapters with the 8192 chipset.
git clone https://github.com/pvaret/rtl8192cu-fixes.git
dkms add rtl8192cu-fixes
dkms install 8192cu/1.9
cp rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d
cp rtl8192cu-fixes/8192cu-disable-power-management.conf /etc/modprobe.dBefore installing the specialized Realtek driver, you must install build dependencies and remove the existing hostapd package to avoid conflicts.
For ArchLinux:
pacman -S base-devel linux-headers dkms git
pacman -R hostapdFor Debian, Ubuntu, or Debian-based distributions:
apt-get install build-essential linux-headers-generic dkms git
apt-get remove hostapd
apt-get build-dep hostapd# ArchLinux
pacman -S base-devel linux-headers dkms git
pacman -R hostapd
# Debian/Ubuntu
apt-get install build-essential linux-headers-generic dkms git
apt-get remove hostapd
apt-get build-dep hostapdTo install the create_ap script from the source repository, clone the repository, navigate to the script directory, and run make install.
git clone https://github.com/lakinduakash/linux-wifi-hotspot
cd linux-wifi-hotspot/src/scripts
make install