Setup OpenVPN CentOS 32Bit



Postingan ini khusus untuk anda yang ingin belajar Instalasi openvpn di Server (VPS) kususnya CentOS 32bit.
How to :
Akses Root SSH dengan menggunakan puTTy atau Bitvise Tunnelier, Terus masukin command yang ada dibawah ini baik-baik.

yum install gcc make
wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install rpm-build
yum install autoconf.noarch
yum install zlib-devel
yum install pam-devel
yum install openssl-devel
rpmbuild --rebuild lzo-1.08-4.rf.src.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/lzo-*.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install openvpn
cp -r /usr/share/doc/openvpn-2.2.0/easy-rsa/ /etc/openvpn/
cd /etc/openvpn/easy-rsa/2.0
chmod 755 *
source ./vars
./vars
./clean-all
./build-ca
./build-key-server server
./build-dh
cp /etc/openvpn/easy-rsa/2.0/keys /etc/openvpn/keys -R
cd /etc/openvpn
vi 443.conf

Tekan tombol [ i ] pada keyboard dan Masukan Configurasi Server pada step ini.

Contoh Configurasi Server :

local IPSERVER
port 443
proto tcp
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.11.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "route-method exe"
push "route-delay 2"
keepalive 5 30
cipher AES-128-CBC
comp-lzo
persist-key
persist-tun
status server-vpn.log
verb 3

Tekan tombol Esc pada keyboard dan teruskan dengan mengetik perintah :wq [ENTER]
selanjutnya restart openvpn.

service openvpn restart
chkconfig openvpn on
nano /etc/sysctl.conf

Set default Value 0 menjadi 1

find net.ipv4.ip_forward  and give value = 1

catatan : apabila ada pesan error pada saat menjalankan perintah nano. install dulu nano nya dengan comand :
yum install nano 
lanjut ke setingan iptables
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 10.11.0.0/24  -j SNAT --to IPSERVER
service iptables save
service iptables restart
chkconfig iptables on

Selesai... sekarang anda tinggal kopas file certificate [ca.crt] dengan menggunakan Software FTP. file certificate ini nantinya yang akan dipake disisi client agar dapat terhubung ke server VPN yang barusan om install. Dan jangan lupa,.. nanti si file ca.crt ini di jadikan satu folder dengan konfigurasi [ config ] clients pada direktori config di openvpn ( C:\Program Files\OpenVPN\config )

File ca.crt berada di direktori :
/etc/openvpn/keys/
Contoh Config for Clients :

client
proto tcp
persist-key
persist-tun
dev tun
pull
comp-lzo
ns-cert-type server
verb 3
mute 2
mute-replay-warnings
auth-user-pass
redirect-gateway def1
script-security 2
route-method exe
route-delay 2
remote IPSERVER 443
cipher AES-128-CBC
ca ca.crt





1 Response to "Setup OpenVPN CentOS 32Bit"

  1. If you'd like an alternative to randomly dating girls and trying to figure out the right thing to say...

    If you'd rather have women chase YOU, instead of spending your nights prowling around in filthy bars and nightclubs...

    Then I encourage you to view this eye-opening video to uncover a strong little secret that has the potential to get you your very own harem of hot women just 24 hours from now:

    FACEBOOK SEDUCTION SYSTEM...

    ReplyDelete