Kali/OpenVPN/PIA
From charlesreid1
In this scenario, we configure OpenVPN to connect to PIA's VPN servers and make our Kali machine a node on the PIA VPN network.
Setup
These instructions assume you have set up OpenVPN and it has created an interface tun0 at the IP address 10.8.0.1.
See Kali/OpenVPN for setup instructions.
PIA Configuration
Conveniently, PIA provides OpenVPN configuration files to connect to their VPN servers:
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip unzip openvpn.zip -d openvpn
Copy the profile and certs into /etc/openvpn/:
sudo cp openvpn/ca.rsa.2048.crt openvpn/crl.rsa.2048.pem /etc/openvpn/ sudo cp "openvpn/US California.ovpn" /etc/openvpn/US.conf
Test Configuration
To test that your OpenVPN is routing traffic through PIA as expected:
1. Check your IP (one way is to search "whats my ip" on duckduckgo, which will tell you your IP and a geolocation)
2. Start OpenVPN (interactively) with the PIA config file:
openvpn --config /etc/openvpn/US.conf
3. Repeat step 1 and confirm the IP and geolocation have changed
Troubleshooting
Use tcpdump to monitor packets traveling through interfaces.
Interference with other network interfaces
I had two network interfaces, wlan1 (an access point/wifi hotspot) and wlan2 (a wifi connection to the internet), connected via iptables so that hotspot traffic on wlan1 was forwarded through to the wifi connection on wlan2. However, this broke when OpenVPN was started with the PIA config file.
To troubleshoot, run tcpdump and watch the wlan1 interface, which hosts the hotspot:
tcpdump -i wlan1
Now visit duckduckgo.com on a client on the hotspot and ensure you see that traffic passing through.
Flags
| OpenVPN a tool for creating and connecting to virtual private networks.
Creating a Static Key VPN: OpenVPN/Static Key Configuring Your DNS: DNS
|
| Networking pages and notes about computer networks.
Man in the Middle attack vectors on wired networks: Man in the Middle/Wired Packet analysis with Wireshark: Wireshark Packet Analysis Linux networking: Linux/Networking
Using Aircrack: Aircrack Many Ways to Crack a Wifi: Cracking Wifi
Linux/Networking · Linux/SSH · Linux/File Server
Notes on OpenVPN: OpenVPN Setting Up a Static Key VPN: OpenVPN/Static Key
Domain Name Servers: DNS · Linux/DNS IP Version 6: IPv6
Wireshark · SSH · Stunnel · Tor · Ettercap · Aircrack · Tcpdump
Tunnels · HTTP and HTTPS · SSH Tunnels · Linux/SSH
|