From charlesreid1

Revision as of 00:31, 2 December 2019 by Admin (talk | contribs)

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.


Flags