Lately, I have seen the advent of people creating Openvpn servers to alleviate the need for a faster cheaper broadband connection alternative wire free.
People have been offering their services for free to practice server administration. Unfortunately with the demand, services can not keep up with the demand.
So, I have decided to compile a helpful TUT that will ease up your VPN installation, should you choose you try one yourself.
*this TUT is currently not complete, as I have no screenshots to provide you with yet.*
The following files will be needed:
1 OPENVPN script
OpenVPN Script: My personal script - Link ( My Install script is currently more of less the same as the OVPNs on symbianize )
However, you need to upload this script on a location where you can directly download the file on Centos Linux.
OpenVPN Script: Blue module – Link ( This script is good but you will need to edit the configs manually after the script is ran to make it the same as the current OVPNs )
2. Sample Server configs ( Smart and Globe ) -- Link
3. Sample Client configs ( Smart and Globe only ) -- Link
Shall we start
1. First you need to subscribe to a VPS service. There are tons around here. Make sure that you request tun module enabled.
2. Logon to your VPS service with the provided credentials by the provider.
3. Console mode : Shall we ^_^ wink wink :
Type the following:
#this will make sure that you tun module is enabled.
If you receive this message, your TUN/TAP device is ready for use:
cat: /dev/net/tun: File descriptor in bad state
If you receive this message, contact your provider for assistance:
cat: /dev/net/tun: No such file or directory
Method 1 ( Please upload the script that I edited, this is the an enhanced version of Bluemodule’s script )
Wget [the location where you uploaded the script file]
Chmod +x VPNinstall.sh
Method 2 ( Bluemodule )
chmod +x ovpn_install_script.sh
Please run though the steps for the script.
4 . Once done you need to start the services. Call the following function:
5. Now we need to edit the iptables: run the following
# Flush all current rules from iptables
iptables -t nat -F
iptables -t mangle -F
# Allow SSH connections on tcp port 22 (or whatever port you want to use)
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# Set default policies for INPUT, FORWARD and OUTPUT chains
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Set access for localhost
iptables -A INPUT -i lo -j ACCEPT
# Accept packets belonging to established and related connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#Accept connections on PORT for vpn access from clients
iptables -A INPUT -p udp --dport [PORT] -j ACCEPT ---- [ PORT pertains to the port you specified on the server ] – I used 9200
iptables -A INPUT -p udp --dport 443 -j ACCEPT --- for smart Wag na po palitan yun port.
#Apply forwarding for OpenVPN Tunneling
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
If my script was followed do :
iptables -A FORWARD -s 10.10.0.0/24 -j ACCEPT
iptables -A FORWARD -s 10.9.0.0/24 -j ACCEPT
#Use your OpenVPN server's real external IP here
iptables -t nat -A POSTROUTING -o venet0 -j SNAT --to-[WAN IP] [WAN IP ng VPS server mo]
echo 1 > /proc/sys/net/ipv4/ip_forward
6. So It should be ok now. Please keep in mind this ONLY works for GLOBE NOW. You need to create another server.conf on the /etc/openvpn/ folder for the smart connection.
A sample Globe and Smart Server Config can be found here. Link
** BTW: Kada update po ng config, kailangan po mag restart ng service – To do that type # service openvpn restart
7. Now we go to the client configs.
Copy the sample client configs here and edit the WAN IP. -- Link
8. Install Openvpn on the clients and try to connect and you should be good to go.
ENJOY YOUR CONNECTION after ^_^
** This TUT is still under construction and will be for editing, please keep posted for further updates **
*** Credits goes to Bluemodule, and all the people in Symbianize who provide the configs ^_^
I am cooking up another TUT. Mas mabilis at does not require you to use ssh sa computer mo. At kung gagamit ka man saglit na saglit lng po talaga. With pix na din po hopefully matapos ko pag may time ako..