In October i posted a blog about setting up your OpenVPN server in 2 minutes.
This blog is a addon to your existing configuration to route all traffic over the VPN.
Change server configuration
go to the config file (/etc/openvpn/server.conf) and add the following lines:
push "redirect-gateway def1"
push "dhcp-option DNS "
push "dhcp-option DNS 18.104.22.168"
Restart your OpenVPN daemon
sudo /etc/init.d/openvpn restart
Change client configuration
Change your client config, and add the following line
Change IP Tables
Last thing to do is change your iptables to NAT traffic to the internet. (make sure you have the right to do this or run this as root)
iptables -I FORWARD -i tun0 -o wlan0 \
-s 10.8.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -I FORWARD -m conntrack --ctstate RELATED,ESTABLISHED \
iptables -t nat -I POSTROUTING -o wlan0 \
-s 10.8.0.0/24 -j MASQUERADE
- tun0: your virtual VPN network interface
- eth0: your normal network interface (to make sure you will use the right interface, check with “ifconfig”)
- 10.8.0.0: your VPN network IP range
With this script you can setup a OpenVPN server within 2 minutes. I really want to give credits to the owner of the script, but i don’t have a clue who wrote this.
This how to describes how to configure Kali to use a openVPN for securing your traffic.
Why should u use VPN?
Here’s my top 5 why you want to use a VPN service.
- VPN provides Privacy and hides your own External IP address.
- Use any network (public or private or free (hotspot WiFi) with encryption.
- Login to your home or Work network from anywhere with confidence of encrypted traffic.
- Bypass censorship and content monitoring by goverments.
- Browse and bypass Firewall and censorship policy from Anywhere!
As you can see from the list above, VPN not necessarily hides everything. Search engines like google, bing and yahoo can still recognizes you based on your cookies or account sign-in. So make sure you use tools like Bleachbit (clear browsing data etc) and enable plugins in your browser for tracking and ads (privacy badger, uBlock Origin).
In the example below i’m using IPVanish VPN service, there are lot’s more VPN services. If you really want to be sure of logging, security and availability you can use the comparison chart (click here).