## 1. Project Overview & Quickstart (lakinduakash/linux-wifi-hotspot)
## File: README.md
## Linux Wifi Hotspot
[](https://app.fossa.com/projects/git%2Bgithub.com%2Flakinduakash%2Flinux-wifi-hotspot?ref=badge_shield)
### What's new
* Use aa-complain instead of complain to fix the permission issue for dnsmasq
* Fix some 5Ghz band not working issue
* Compatible with iw 6.7
#### Project Update
Hi everyone — I've been inactive on this project for a while due to other commitments. I'm now actively looking for contributors and maintainers to help keep the project alive and growing.
If you're interested in contributing — whether it's fixing bugs, improving documentation, or developing new features — please open an issue to introduce yourself.
I'm also open to adding trusted collaborators with commit access who demonstrate consistent contributions and interest.
Thanks for being part of the community and keeping Linux-WiFi-Hotspot going!
### Features
* Share your wifi like in Windows - Use wifi and enable hotspot at the same time.
* Share a wifi access point from any network interface
* [Create a hotspot with VPN](#vpn-hotspot) - The hotspot has the traffic tunnelled through VPN. Useful for devices with no VPN app support like TV or gaming consoles.
* Share wifi via QR code
* MAC filter
* View connected devices
* Includes Both command line and GUI.
* Support both 2.4GHz and 5GHz (Need to be compatible with your wifi adapter). Ex: You have connected to the 5GHz network and share a connection with 2.4GHz.
* Customise wifi Channel, Change MAC address, etc.
* Hide SSID
* customize gateway IP address
* Enable IEEE 80211n, IEEE 80211ac and IEEE 80211ax modes
### Command line help and documentation
Read [Command line help and documentation here](src/scripts/README.md).
If you only need the command line without GUI run `make install-cli-only` as the root user.
### Notes
- Sometimes there are troubles with **5Ghz bands** due to some vendor restrictions. If you cannot start the hotspot while you are connected to the 5Ghz band, Unselect **Auto** and select **2.4Ghz** in frequency selection.
- If any problems with **RealTeK Wifi Adapters** see [this](docs/howto/realtek.md)
- **Unable to allocate IP: firewalld issue:** Please check for potential fixes: [#209](https://github.com/lakinduakash/linux-wifi-hotspot/issues/209) [#166](https://github.com/lakinduakash/linux-wifi-hotspot/issues/166)
## Installation
#### Debian/Ubuntu
Download the Debian package from the latest [release](https://github.com/lakinduakash/linux-wifi-hotspot/releases/latest)
**OR**
Good news! I was able to restore keys, new versions will be available via the PPA
```bash
sudo add-apt-repository ppa:lakinduakash/lwh
sudo apt update
sudo apt install linux-wifi-hotspot
```
#### Arch based distributions
Linux Wifi Hotspot is available as an [AUR package](https://aur.archlinux.org/packages/linux-wifi-hotspot/). You can install it manually or with your favorite AUR helper.
For example, if you use `yay` you can do:
`yay -S linux-wifi-hotspot`
### Fedora based distributions
copr based repo is available for Fedora
```bash
sudo dnf copr enable zinix01/linux-wifi-hotspot
sudo dnf install linux-wifi-hotspot
```
## Dependencies
#### General
* bash
* util-linux (for getopt)
* procps or procps-ng
* hostapd
* iproute2
* iw
* iwconfig (you only need this if 'iw' can not recognize your adapter)
* haveged (optional)
_Make sure you have those dependencies by typing them in terminal. If any of dependencies fail
install it using your distro's package manager_
#### For 'NATed' or 'None' Internet sharing method
* dnsmasq
* iptables
#### To build from source
* make
* gcc and g++
* build-essential
* pkg-config
* gtk
* libgtk-3-dev
* libqrencode-dev (for qr code generation)
* libpng-dev (for qr code generation)
On Ubuntu or Debian install dependencies by,
```bash
sudo apt install -y libgtk-3-dev build-essential gcc g++ pkg-config make hostapd libqrencode-dev libpng-dev
```
On Fedora/CentOS/Red Hat Enterprise Linux/Rocky Linux/Oracle Linux
```bash
sudo dnf install -y gtk3-devel gcc gcc-c++ kernel-devel pkg-config make hostapd qrencode-devel libpng-devel
```
## Installation
git clone https://github.com/lakinduakash/linux-wifi-hotspot
cd linux-wifi-hotspot
#build binaries
make
#install
sudo make install
## Uninstallation
sudo make uninstall
## Running
You can launch the GUI by searching for "Wifi Hotspot" in the Application Menu
or using the terminal with:
wihotspot
Create VPN Hotspot
After connecting to VPN, Open `wihotspot` GUI. Select the virtual interface created by the VPN. In this case it is `tun0`
## Run on Startup
The `wihotspot` GUI uses `create_ap` to create and manage access points. This service and core logic were originally created by
[@oblique](http://github.com/oblique), and are now maintained in this
repository.
Start the hotspot service on startup (using your saved configuration) with:
systemctl enable create_ap
## Contributing
If you found a bug or you have an idea about improving this make an issue. Even a small contribution makes the open source world more beautiful.
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for more info.
## Disclaimer
Icons made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/)
## Stargazers over time
[](https://starchart.cc/lakinduakash/linux-wifi-hotspot)
## License
FreeBSD
Copyright (c) 2013, oblique
Copyright (c) 2024, lakinduakash
[](https://app.fossa.com/projects/git%2Bgithub.com%2Flakinduakash%2Flinux-wifi-hotspot?ref=badge_large)
---
## File: docs/howto/realtek.md
## Try this first
If you are facing any problems with Realtek adapters (e.g. Edimax EW-7811Un)
first try to run create_ap with `-w 2` (i.e. use WPA2 only) or use it
without passphrase. If you are still facing any problems or you want to
also use WPA1, then follow the instructions below.
NOTE: The instructions below are only valid for Realtek adapters with 8192 chipset.
## Before installation
If you're using ArchLinux, run:
```
pacman -S base-devel linux-headers dkms git
pacman -R hostapd
```
If you're using Debian, Ubuntu, or any Debian-based distribution, run:
```
apt-get install build-essential linux-headers-generic dkms git
apt-get remove hostapd
apt-get build-dep hostapd
```
## Install driver
The driver in the mainline of Linux kernel doesn't work well with the 8192 adapters.
For this reason you need to install the driver that is provided from Realtek. Their
driver can not be compiled with newer kernels, but since it was an open-source
release under GPL license some people were able to fixed it and make it compile.
With the following commands you can install a fixed version of Realtek's driver:
```
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.d
```
After installation, unload the previous driver and load the new one, or just reboot.
## Install hostapd
Realtek's driver is using an old subsystem which is called `wireless-extensions`
(or `wext`). Hostapd works only with the new subsystem (which is called `nl80211`).
For this reason Realtek wrote a patch for hostapd. You can install it with the
following commands:
If you have ArchLinux install [hostapd-rtl871xdrv](https://aur.archlinux.org/packages/hostapd-rtl871xdrv)
from AUR or just run:
```
yaourt -S hostapd-rtl871xdrv
```
If you're using any other distribution, run:
```
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 install
```
---
## File: src/scripts/README.md
## Features
- Create an AP (Access Point) at any channel.
- Choose one of the following encryptions: WPA, WPA2, WPA/WPA2, Open (no encryption).
- Hide your SSID.
- Disable communication between clients (client isolation).
- IEEE 802.11n & 802.11ac support
- Internet sharing methods: NATed or Bridged or None (no Internet sharing).
- Choose the AP Gateway IP (only for 'NATed' and 'None' Internet sharing methods).
- You can create an AP with the same interface you are getting your Internet connection.
- You can pass your SSID and password through pipe or through arguments (see examples).
- Optionally assign IP addresses to specified hosts via dnsmasq's `dhcp-host` configuration option.
## Dependencies
### General
- bash (to run this script)
- util-linux (for getopt)
- procps or procps-ng
- hostapd
- iproute2
- iw
- iwconfig (you only need this if 'iw' can not recognize your adapter)
- haveged (optional)
### For 'NATed' or 'None' Internet sharing method
- dnsmasq
- iptables
## Installation
### Generic
git clone https://github.com/lakinduakash/linux-wifi-hotspot
cd linux-wifi-hotspot/src/scripts
make install
### ArchLinux
pacman -S create_ap
### Gentoo
emerge layman
layman -f -a jorgicio
emerge net-wireless/create_ap
## Examples
### No passphrase (open network):
create_ap wlan0 eth0 MyAccessPoint
### 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
### Bridged Internet sharing (pre-configured bridge interface):
create_ap -m bridge wlan0 br0 MyAccessPoint MyPassPhrase
### Internet sharing from the same WiFi interface:
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
### Choose a different WiFi adapter driver
create_ap --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase
### No passphrase (open network) using pipe:
echo -e "MyAccessPoint" | create_ap wlan0 eth0
### WPA + WPA2 passphrase using pipe:
echo -e "MyAccessPoint\nMyPassPhrase" | create_ap wlan0 eth0
### Enable IEEE 802.11n
create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase
### Client Isolation:
create_ap --isolate-clients wlan0 eth0 MyAccessPoint MyPassPhrase
### Assign IP address to a hosts listed in /etc/hosts:
create_ap --dhcp-hosts "host1 host2" wlan0 eth0 MyAccessPoint MyPassPhrase
### Assign IP address to two hosts not listed in /etc/hosts:
create_ap --dhcp-hosts "host1,192.168.12.2 host2,192.168.12.3" wlan0 eth0 MyAccessPoint MyPassPhrase
Use a space to separate multiple `dhcp-host` definitions. Reference [dnsmasq.conf.example](https://github.com/imp/dnsmasq/blob/770bce967cfc9967273d0acfb3ea018fb7b17522/dnsmasq.conf.example#L238) for other valid ways to define hosts, such as by MAC address.
## Systemd service
Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage) service
### Start service immediately:
systemctl start create_ap
### Start on boot:
systemctl enable create_ap
## License
FreeBSD
- Copyright (c) 2013, oblique
- Copyright (c) 2019, lakinduakash
---
## File: util/debian/README.md
# Debian Build Docker Image
The Dockerfile in this directory can be used to build the debian package for this project.
1. `docker build . -t linux-wifi-hotspot-deb`
2. `docker run -it linux-wifi-hotspot-deb`
3. `cd /root`
All build artifacts will be located in the `/root` directory.
4. Use `docker cp` to copy the desired artifacts out of the container.
## 2. Official Technical Reference & Guides (lakinduakash/lakinduakash.github.io)
# Get started building your personal website
### Showcase your software development skills
This repository gives you the code you'll need to kickstart a personal website that showcases your work as a software developer. And when you manage the code in a GitHub repository, it will automatically render a webpage with the owner's profile information, including a photo, bio, and repositories.
Your personal website is waiting to be personalized, though. It includes space to highlight your specific areas of interest in software development, like languages or industries. And it's standing by to publish your next great blog post.
It's all possible using the combination of [Jekyll](https://jekyllrb.com/docs/) (for building your website), [GitHub Pages](https://pages.github.com/) (for hosting your website), and [GitHub's API](https://developer.github.com/v3/) (for automatically populating your website with content).
## Installation
### Fork the `github/personal-website` repo
You'll be making your own copy of the "personal website starter" repository so you have your own project to customize. A "fork" is a copy of a repository. So select "Fork" atop [the `github/personal-website` repository](https://github.com/github/personal-website).
Once you've found a home for your forked repository, it's yours. You're the owner, so you're ready to publish, if you wish.
### Install in your local development environment
If you want to manage your website in a local web development environment, you'll be using [Ruby](https://jekyllrb.com/docs/installation/).
Once you've found a home for your forked repository, **[clone it](https://help.github.com/articles/cloning-a-repository/)**.
#### Install Jekyll
Jekyll is a [Ruby Gem](https://jekyllrb.com/docs/ruby-101/#gems) that can be installed on most systems.
1. Install a full [Ruby development environment](https://jekyllrb.com/docs/installation/)
2. Install Jekyll and [bundler](https://jekyllrb.com/docs/ruby-101/#bundler) [gems](https://jekyllrb.com/docs/ruby-101/#gems)
```
gem install jekyll bundler
```
3. Change into your new directory
```
cd personal-website
```
4. Install missing gems
```
bundle install
```
5. Build the site and make it available on a local server
```
bundle exec jekyll serve
```
You should see something like:
```
Configuration file: /octocat/personal-website/_config.yml
Source: /octocat/personal-website
Destination: /octocat/_site
Incremental build: disabled. Enable with --incremental
Generating...
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
done in 14.729 seconds.
Auto-regeneration: enabled for '/octocat/personal-website'
Server address: http://127.0.0.1:4000
Server running... press ctrl-c to stop.
```
Don't worry about the "No GitHub API authentication could be found" message. [API authentication is only necessary](https://github.com/jekyll/github-metadata/blob/master/docs/authentication.md) if you intend to display more detailed metadata, like a branch name.
6. Now browse to [http://localhost:4000](http://localhost:4000)
### Publish
When you host your personal website's code on GitHub, you get the support of free hosting through GitHub Pages.
**The fastest approach** is to rename your repository `username.github.io`, where `username` is your GitHub username (or organization name). Then, the next time you push any changes to your repository's `master` branch, they'll be accessible on the web at your `username.github.io` address.
**If you want to use a custom domain**, you'll want to add it to your repository's "Custom domain" settings on github.com. And then register and/or [configure your domain with a DNS provider](https://help.github.com/articles/quick-start-setting-up-a-custom-domain/).
## Customization
It's your website, and you control the source code. So you can customize everything, if you like. But we've provided a handful of quick customizations for you to consider as you get your website off the ground.
### Quick configuration changes
Most customizations can be done in a matter of seconds, by revising your repository's `_config.yml` file. Just remember to restart your local server each time you save new changes so your Jekyll-powered website rebuilds correctly:
1. Shut down your server by entering the keyboard command CTRL+c
2. Restart your server: `bundle exec jekyll serve`
#### Layout
Your website will display in a two-column layout by default on larger-screen devices, with your photo, name, and basic information displayed in a left-aligned "sidebar." You can quickly switch to a "stacked" single-column layout by changing the line in your `_config.yml` file that reads `layout: sidebar` to `layout: stacked`.
#### Style
Your website appears with a "light" white and gray background by default, with dark text. You can quickly switch to a "dark" background with white text by changing the line in your `_config.yml` file that reads `style: light` to `style: dark`.
#### Projects
The "My Projects" section of your website is generated by default with your nine most recently "pushed" repositories. It also excludes repositories that you forked, by default. But each of these parameters can be quickly customized in your repository's `_config.yml` file, under the `projects` dictionary line.
Parameters include:
- `sort_by`: The method by which repositories are sorted. Options include `pushed` and `stars`.
- `limit`: The maximum number of repositories that will be displayed in the "My Projects" section of your website. Out of the box, this number is set to `9`.
- `exclude`:
- `forks`: When `true`, repositories you've forked will be excluded from the listing.
- `projects`: A list the repository names you want to exclude from the listing.
#### Topics
Your website comes pre-configured with three topics (e.g. "Web design" and "Sass") that appear in a section titled "My Interests." These are also stored in your repository's `_config.yml` file, where you can define each topic's name and two other optional details:
- `web_url`: The web address you'd like to your topic to link to (e.g. `https://github.com/topics/sass`).
- `image_url`: The web address of an (ideally square) image that you'd like to appear with your topic.
#### Social media
Your website supports linking and sharing to social media services you're using, including Behance, Dribbble, Facebook, LinkedIn, Medium, Stack Overflow, Twitter, and YouTube. To identify the services you use:
1. Edit your repository's `_config.yml` file.
2. Edit the `social_media` dictionary line, and represent the services you like in a simple `key: value` form:
```
social_media:
behance: your_username
dribbble: your_username
facebook: your_username
hackerrank: your_username
instagram: your_username
keybase: your_username
linkedin: your_username
medium: your_username
stackoverflow: your_user_id
telegram: your_username
twitter: your_username
unsplash: your_username
vk: your_username
website: http://your_website_url
youtube: your_username
```
Links to your profile for each of the services you define will appear in the `` of your website, appended to your bio. And if those services support sharing, any blog posts that you publish will include links to share that post using each social media service.
**Note**: This feature is supported by two files in your repository:
- `/_data/social_media.yml`: Defines each of the supported services, including variable name, display name, URL path, and SVG icon.
- `/_includes/social_media_share_url.html`: Outputs the share URL required for any of the supported social media services that support sharing URLs.
If you're interested in adding a social media service that's not already supported in this repo, you can edit these two files to build that support.
## Adding pages
To **add a page** to your website (e.g. detailed resume):
1. Create a new `.html` or `.md` file at the root of your repository.
2. Give it a filename that you want to be used in the page's URL (e.g. `http://yoursite.dev/filename`).
3. At the start of your file, include the following [front matter](https://jekyllrb.com/docs/front-matter/):
```
---
layout: default
---
```
## Adding blog posts
To **add a blog post** to your website:
1. Create a new `.md` file in your repository's `/_posts/` directory.
2. Give it a filename using the following format:
```
YEAR-MONTH-DAY-title.MARKUP
```
3. At the start of your file, include the following [front matter](https://jekyllrb.com/docs/front-matter/):
```
---
title: "The title of my blog post"
---
```
Your website comes with a placeholder blog post that you can reference. Notably, its [front matter](https://jekyllrb.com/docs/front-matter/) declares `published` as `false`, so that it won't appear on your website.
While you can define a `layout` in the front matter, your website is pre-configured to assign the `post` layout to all of the posts in your `/_posts/` directory. So you don't have to declare that in your posts.
Jekyll's conventions for authoring and managing blog posts is very flexible. You can [learn more in Jekyll's documentation for "Posts."](https://jekyllrb.com/docs/posts/)
## Content and templates
To give you a sound foundation to start your personal website, your repository includes a handful of "includes" -- dynamic `.html` files that are re-used throughout your website. They're all stored in the `/_includes/` directory.
There are the usual suspects, like `header.html` and `footer.html`. But there are few more worth pointing out:
- `interests.html`: A heading and dynamic list of "My Interests," which is populated with the [topics](#topics) you list in your `_config.yml`.
- `masthead.html`: A collection of your avatar, name, bio, and other metadata that's displayed prominently on all your webpages to help identify what the website is about.
- `post-card.html`: A compact, summarized presentation of a blog post, re-used to display a listing of your latest blog posts.
- `projects.html`: A heading and dynamic list of "My Projects," which is populated with a listing of your newest GitHub repositories.
- `repo-card.html`: A compact, summarized presentation of a repository, re-used to display a listing of your GitHub repositories.
- `thoughts.html`: A heading and dynamic list of "My Thoughts," which is populated with a listing of your latest blog posts.
- `topic-card.html`: A compact, summarized presentation of a topic (defined in your `_config.yml`), re-used to display a listing of your interests.
### Layouts
Your repository comes with three layouts:
- **default**: Not used by any of the built-in pages or posts, but useful for any new pages you create.
- **home**: Used by your `index.html` homepage to display listings of your projects, interests, and (optionally) your blog posts.
- **post**: Used by default by the posts in your `/_posts/` directory.
Jekyll's convention for defining layouts is very flexible. You can [learn more about customizing your layouts in the Jekyll "Layouts" docs.](https://jekyllrb.com/docs/layouts/)
## Styles
Your website is pre-configured to use [GitHub's very flexible CSS framework called "Primer,"](https://styleguide.github.com/primer/). It's currently referenced within your `styles.scss` file, using the CSS import at-rule:
```
@import url('https://unpkg.com/primer/build/build.css');
```
You are, of course, welcome to remove it or replace it with another framework. Just bear in mind that the HTML that your website came pre-packaged with references multiple Primer "utility classes" to define things like column widths, margins, and background colors.
You also have the option to add on to and extend Primer's styles by adding custom CSS to your `/assets/styles.scss` Sass stylesheet. By editing this file, you can customize your website's color scheme, typography, and more.
## License
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
rebuilt #14