Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wlucha/openvpn-wifi-access-point-for-raspberry-pi

OpenVPN Wifi Access Point for Raspberry Pi
https://github.com/wlucha/openvpn-wifi-access-point-for-raspberry-pi

Last synced: about 1 month ago
JSON representation

OpenVPN Wifi Access Point for Raspberry Pi

Awesome Lists containing this project

README

        

# OpenVPN-Wifi-Access-Point-for-Raspberry-Pi
OpenVPN Wifi Access Point for Raspberry Pi

*This is a bash script based on "Hotspot – WiFi Access Point" from JACEK TOKAR.*

*Link to the original script: http://raspberry-at-home.com/hotspot-wifi-access-point/*

Description

This script installs a Wifi Access Point on your Raspberry Pi which tunnels your traffic through OpenVPN.

Additionally it's possible to install VPNBOOK.com OpenVPN certificates.

Hardware


- Raspberry Pi Version 1 or 2
- Ethernet cable
- WiFi adapter - Not all WiFi adapters work
- SD Card (4GB or greater) with Raspbian on it
- Power supply for your Pi & a Micro USB cable
- USB Console cable (optional) - this makes it a little easier to debug the system
- Case for your Pi (optional)
- A SD or MicroSD card reader (optional)

Preparations


- Install the OS (Raspbian) onto your SD card
- Boot the Pi and configure
- Don't forget to change the default password for the 'pi' acccount!
- Set up and test the Ethernet and Wifi connection

Installation


- Download the script to your Raspberry Pi
- `chmod +x openvpn_gateway.sh`
- `sudo ./openvpn_gateway.sh`

Troubleshooting


- `sudo service hostapd status`
- `sudo service isc-dhcp-server status`
- `sudo hostapd -d /etc/hostapd/hostapd.conf`
- `iw list`
- For some reason, sometimes tun1 is used instead tun0, therefore you need to change the iptables rules to:
- `sudo iptables --flush`
- `sudo iptables --list`
- `sudo iptables -t nat -A POSTROUTING -o tun1 -j MASQUERADE`
- `sudo iptables -A FORWARD -i tun1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT`
- `sudo iptables -A FORWARD -i wlan0 -o tun1 -j ACCEPT`