How to Build an OpenVPN Access Point Pt 2 - Hak5 2018

Hak5

How to Build an OpenVPN Access Point Pt 2 - Hak5 2018

Part two of Building an OpenVPN access point, this time on Hak5.

Recap: We've been building an VPN WiFi hotspot using OpenWRT and OpenVPN.

Last week we setup the OpenVPN Access Server and setup user accounts.

Today we're going to work on the access-point side of things in OpenWRT by setting up the openvpn client, configuring the IP routing and testing the connection with WiFi devices.


SCP client.opvn to pineapple
SSH to pineapple
Get pineapple online
opkg update
opkg install openvpn-openssl
route
openvpn client.ovpn
route

#Setup forwarding for clients

iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o tun0 -j MASQUERADE
iptables -A FORWARD -s 172.16.42.0/24 -o tun0 -j ACCEPT
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i tun0 -j ACCEPT

#demo clients
Test connection

apt-get update
apt-get install php5-cli