Kali/OpenVPN/PIA: Difference between revisions
From charlesreid1
(Created page with "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. =Flags= {{KaliFlag}} {{OpenVPNFlag}} {{...") |
No edit summary |
||
| Line 1: | Line 1: | ||
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. | 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 <code>tun0</code> at the IP address <code>10.8.0.1</code>. | |||
See [[Kali/OpenVPN]] for setup instructions. | |||
=PIA Configuration= | |||
Conveniently, PIA provides OpenVPN configuration files to connect to their VPN servers: | |||
<pre> | |||
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip | |||
unzip openvpn.zip -d openvpn | |||
</pre> | |||
Copy the profile and certs into <code>/etc/openvpn/</code>: | |||
<pre> | |||
sudo cp openvpn/ca.rsa.2048.crt openvpn/crl.rsa.2048.pem /etc/openvpn/ | |||
sudo cp "openvpn/US California.ovpn" /etc/openvpn/US.conf | |||
</pre> | |||
==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: | |||
<pre> | |||
openvpn --config /etc/openvpn/US.conf | |||
</pre> | |||
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. | |||
Revision as of 00:31, 2 December 2019
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
| 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
|