In my neighborhood, I’m experimenting to give free access to some services, not the full internet but a full access to Wikipedia, maps…
Here are some tips do to the same.
Getting access to the internet may be crucial for our lives, but the commercial providers are here to make money out of it. They don’t event provide disasters nor minimum safety access.
Sometimes even in normal condition, while traveling your roaming will cost you hundreds just to get access to a map or Wikipedia.
With a simple RaspberryPi, a wifi antenna and a good geographical position you can reach hundreds of people.
To serve wifi to others you need to get a wifi USB dongle that can be set in AP mode.
I’m using an Alfa network one.
To enable the AP mode you need to install the package
hostapd. Here is my
ssid=freewifi interface=wlan0 auth_algs=3 channel=7 hw_mode=b logger_stdout=-1 logger_stdout_level=2 country_code=CA
(Always ensure you are using the correct country to avoid disturbing others and look for a free channel.)
You also need a DNS & DCHP provider, install
no-resolv no-poll server=/localnet/10.4.0.1 address=/#/10.4.0.1 interface=wlan0 bind-interfaces dhcp-range=10.4.0.10,10.4.0.200,12h
It means all DNS queries will be intercepted and will respond with the same IP 10.4.0.1, by extend every HTTP request will be redirected to 10.4.0.1.
Enable the same IP on the vlan0 interface.
ifconfig wlan0 10.4.0.1
You are all set, no need for NAT no need for routing, we just want to provide access to Wikipedia.
I’m using Gozim to run a full offline copy of Wikipedia. (For example, make it listen on port 8080)
Install nginx to reverse proxy to your content to a fake domain call
wikipedia.wifi (port 8080) or serve any directories you want to be published.
Another issue while running your own wifi AP is that these days almost all traffic is secured by HTTPS so there is no way to intercept these calls with the right certificates, the users will just get a security error page.
To solve that you need to display a popup page like the one you get when you connect to a Starbucks free wifi network.
I’m working on a set of tool to do just that, uninstall
nginx and give it a shot the project is called WisprGo and the code is on Github too.
It’s a work in progress any help is appreciated.