OpenVPN is the open-source VPN (Virtual Private Network) client, used over the PPTP (Point to Point Tunneling Protocol). It allows you to connect to a remote network over a secure, encrypted connection and mask your IP addresses over all ports. Since there is only one "hop," the network speeds are barely effected and are far more secure.
VPNs can protect you from an arsenal of threats. MITM attacks, packet sniffing, internet privacy, etc. They can be more beneficiary than a SSH in some circumstances.
I created a VPN tutorial for Windows previously, but in this Null Byte I want to help the Linux and Unix users who would like to use OpenVPN, but can't due to the overly complicated setup and configuration.
I will be teaching you this under BackTrack 5.
Requirements
- A Unix-based OS
- Root privileges
Let's get started. We will be learning OpenVPN's configuration and setup via the following video guide. The commands in the video are listed directly below it.
Commands
- su
- mkdir vpncfg
- cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* vpncfg/
- cd vpncfg/
- vim vars
- Replace necessary fields in the file.
- source vars
- ./clean-all
- ./build-ca
- ./build-key-server nullbytez
- Sign the certificate.
- ./build-key
- ./build-dh
- mkdir ~/yourkeys
- cd keys/
- cp -v ca.crt
.{crt,key} ~/yourkeys/ - cp -v dh1024.pem nullbytez.{key,crt} ca.crt
- echo "1" > /proc/sys/net/ipv4/ip_forward
- iptables -t nat -A POSTROUTING -s 10.0.69.0/24 -o eth0 -j MASQUERADE -v
- vim /etc/openvpn/openvpn.conf
- openvpn client.conf
After completing all of the steps outlined in the video and in the above commands, you should be connected to the VPN with all connections encrypted. If you need help with some of the commands in the video, or just want to hang out, come say hello in the Null Byte IRC!
Photo by Ars Technica
Comments
No Comments Exist
Be the first, drop a comment!