Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prahladyeri/hotspotd

Simple daemon to create a wifi hotspot on Linux
https://github.com/prahladyeri/hotspotd

Last synced: 5 days ago
JSON representation

Simple daemon to create a wifi hotspot on Linux

Awesome Lists containing this project

README

        

![license](https://img.shields.io/github/license/prahladyeri/hotspotd.svg)
![last-commit](https://img.shields.io/github/last-commit/prahladyeri/hotspotd.svg)
[![patreon](https://img.shields.io/badge/Patreon-brown.svg?logo=patreon)](https://www.patreon.com/prahladyeri)
[![paypal](https://img.shields.io/badge/PayPal-blue.svg?logo=paypal)](https://paypal.me/prahladyeri)
[![follow](https://img.shields.io/twitter/follow/prahladyeri.svg?style=social)](https://twitter.com/prahladyeri)

# Introduction
*Hotspotd* is a small daemon to create a wifi hotspot on linux. It depends on *hostapd* for AP provisioning and *dnsmasq* to assign IP addresses to devices.

Hotspotd works by creating a virtual NAT (Network address transation) table between your connected device and the internet using linux *iptables*.

# Installation
To install hotspotd, just follow these steps:
```
wget https://github.com/prahladyeri/hotspotd/raw/master/dist/hotspotd-latest.tar.gz
tar xvf hotspotd-latest.tar.gz
cd hotspotd-latest/
sudo python setup.py install
```

To uninstall hotspotd, just say:

```sudo python setup.py uninstall```

# Dependencies
* *dnsmasq* (typically pre-installed on most linux distributions)
* *hostapd* for AP provisioning

To install hostapd on ubuntu:

```apt-get install hostapd```

Or on RHEL based distros:

```yum install hostapd```

# Usage

To start hotspot:

```sudo hotspotd start```

To stop hotspot:

```sudo hotspotd stop```

The first time you run hotspotd, it will ask you for configuration values for SSID, password, etc. Alternatively, you may also run:

```sudo hotspotd configure```

# Troubleshooting

* Make sure all dependencies (hostapd, dnsmasq and python 2.7) are installed.

* hotspotd creates the NAT by manipulating iptables rules. So if you have any other firewall software that manipulates the iptables rules (such as the firewalld on fedora), make sure you disable that.

* To create a hotspot, your wifi must support AP mode. To find that out, use this process:

* Find your kernel driver module in use by issuing the below command:

```lspci -k | grep -A 3 -i network```

(example module: ath9k)

* Now, use the below command to find out your wifi capabilities (replace ath9k by your kernel driver):

```modinfo ath9k | grep depend```

* If the above output includes “mac80211” then it means your wifi card will support the AP mode.

# Testing status
This package has been tested on Qualcomm Atheros adapter on the following distros:

* Ubuntu 12.04 LTS
* Ubuntu 14.04 LTS

In theory, it should work with all other distros too (on machines having wifi adapters supported by hostapd), but you will have to try that out and tell me!

# Notes
* Replace `sudo` with `su` or `su -c` if you manage superuser access in that manner.
* PyPI home page could be found at https://pypi.python.org/pypi/hotspotd.
* I need someone to test this daemon across various linux distros. If you are interested in testing of open-source apps, please contact me.

## Donation

Please consider donating if this tool has helped you in any way. You can also hire me through [upwork](https://www.upwork.com/freelancers/~01e977ff45b62e031c) or [fiverr](https://www.fiverr.com/prahladyeri) to get professional support and customization.

- [Donate through PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JM8FUXNFUK6EU)
- [Donate through Patreon](https://www.patreon.com/prahladyeri)