SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
** ## description is written on page 3
Steps to follow to install OpenVpn on CentOS:
1. Install CentOS on server.
2. Update CentOS “yum update –y”
3. Enable epel repo
• wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
• wget http://rpms.famillecollet.com/enterprise/remi-release-6*.rpm
• sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
4. yum install screen openvpn nano rsync tar curl bridge-utils python logrotate –y ##
5. Bridging
echo '
tap="tap0 tap1 tap2 tap3"
brctl addbr br0
brctl addif br0 eth1 #this is the local lan port
for t in $tap; do
openvpn --mktun --dev $t
done
for t in $tap; do
brctl addif br0 $t
done
for t in $tap; do
ifconfig $t 0.0.0.0 promisc up
done
/usr/bin/screen -d -m ping 10.8.1.1'>/etc/rc.local **
chkconfig NetworkManager off
chkconfig network on
chkconfig logrotate on
chkconfig sshd on
chkconfig openvpn on
service NetworkManager stop
service network stop
service sshd restart
cd /etc/sysconfig/network-scripts
** ## description is written on page 3
tap=“tap0 tap1 tap2 tap3”
brctl addbr br0
brctl addif br0 eth1
for t in $tap; do
openvpn --mktun --dev $t
done
for t in $tap; do
brctl addif br0 $t
done
for t in $tap; do
ifconfig $t 0.0.0.0 promisc up
done
/usr/bin/screen -d -m ping 10.8.1.1 -y
echo "
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
DNS1=8.8.8.8
GATEWAY=172.16.0.2 #local ip addr of endian firewall
IPADDR= xxx.xxx.xxx.xxx #virtual ip address of openvpn server
NETMASK=255.240.0.0
ONBOOT=yes
SEARCH=nccl.iitbhu.ac.in" > ifcfg-br0 **
echo "
TYPE=Ethernet
BOOTPROTO=none
IPADDR=xxx.xxx.xxx.xxx #local ip addr ex. 10.3.101.xxx
PREFIX=8
GATEWAY=10.3.101.1
DNS1=8.8.8.8
DEFROUTE=no
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
ONBOOT=yes
HWADDR=xx:xx:xx:xx:xx:xx #get eth0 hardware addr from ifconfig
" > ifcfg-eth0 **
echo "
HWADDR= xx:xx:xx:xx:xx:xx #get eth1 hardware addr from ifconfig
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
ONBOOT=yes
BRIDGE=br0" >ifcfg-eth1 ** #connected to firewall
** ## description is written on page 3
6. Copy easy-rsa scripts to openvpn folder /etc/openvpn/
7. add execute permission to all scripts of easy-rsa “cd /etc/openvpn/eas*” “ chmod a+x *”
8. Modify “vars” file according to the use. Set dh parameter to 1024. “gedit vars”
9. run vars file “source ./vars” “./clean-all”
10. Build dh parameter using “./build-dh”
11. Build CA using “./build-ca _nameOfCA_”
12. Build server using “./build-key-server _nameOfServer_”
13. Build client key using “./build-key _nameOfClient_”
14. “iptables-restore</root/iptables-working” (copy iptables-working file to root). This file could
to saved to any folder, after saving go to same directly in terminal and use above command.
15. “chkconfig openvpn on”
16. “chkconfig ssh on”
17. “rm –rf /etc/sysconfig/network-scripts/ifcfg-A*”
18. “nano /etc/sysconfig/selinux” Edit enforcing to permissive and reboot
If network do not work, then use “service NetworkManager restart” “service network restart”
Keys are all written in “/etc/openvpn/easy-rsa/keys”. Copy required ca.crt, server.key, server.crt,
dh1024.pem file to “/etc/openvpn”.
** these scripts are to be written on the file given at the last line. If the command do not work
fine used “gedit _pathNameGivenAtLastLine_” given after ‘>’ symbol.
## If openvpn do not get installed even after enable epel repo then follow this webpage
http://www.drmagu.com/openvpn-introduction-and-installation-on-centos-432.htm
** ## description is written on page 3
19. Write server config file as follows:
proto tcp #tcp protocol used
dev tap’x’ #edit virtual port for each file 0,1,2,3
local 10.3.101.22 #local ip of server **
port X #port used i.e 1194, 1195, 1196, 1197
server-bridge 172.16.0.1 255.240.0.0 172.18.x.x 172.18.x.x **
ifconfig-pool-persist ipp0.txt #ensure that particular ip is given to a person
and change ipp’x’.txt i.e 0,1,2,3
push "route 172.16.0.0 255.240.0.0"
push "route 10.0.0.0 255.0.0.0"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"
push "redirect-gateway def1 bypass-dhcp"
ca ca.crt #CA certificate file name
cert server00.crt #Server certificate file name
key server00.key #Server key file name
dh dh1024.pem #dh file name
client-to-client
keepalive 5 100
comp-lzo
max-clients 5
persist-key
persist-tun
status openvpn-status-1194.log
log-append openvpn.log
verb 4
## save file as server-‘x’.conf in /etc/openvpn folder
#1194,1195,1196,1197
** ## description is written on page 3
20. W
r
i
t
e
c
l
i
e
n
t
c
o
n
f
i
g
f
i
l
e
a
s
f
o
l
l
o
w
s
:
client
dev tap
proto tcp
remote 10.3.101.22 1194 **
remote 10.3.101.22 1195 **
remote 10.3.101.22 1196 **
remote 10.3.101.22 1197 **
remote-random
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 3
ca ca.crt
key test.key
cert test.crt
## save file as client.ovpn for windows users and client.conf for linus users
## This file along with the client-cert, client-key and ca.crt are needed by
user. This configuration file is common for all the users
## these files you will find in /etc/openvpn/easy-rsa/key
** ## description is written on page 3

Contenu connexe

Tendances

Openstack kilo installation using rdo
Openstack kilo installation using rdoOpenstack kilo installation using rdo
Openstack kilo installation using rdo
Narasimha sreeram
 
Lamp configuration u buntu 10.04
Lamp configuration   u buntu 10.04Lamp configuration   u buntu 10.04
Lamp configuration u buntu 10.04
mikehie
 
Programming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nanoProgramming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nano
Yi-Chiao
 

Tendances (20)

Cluster setup multinode_aws
Cluster setup multinode_awsCluster setup multinode_aws
Cluster setup multinode_aws
 
Puppet
PuppetPuppet
Puppet
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 
using Virtualbox NAT and shared folder
using Virtualbox NAT and shared folderusing Virtualbox NAT and shared folder
using Virtualbox NAT and shared folder
 
Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編
 
Openstack kilo installation using rdo
Openstack kilo installation using rdoOpenstack kilo installation using rdo
Openstack kilo installation using rdo
 
How to twist a IPv6 over Bluetooth (6lowpan)
How to twist a IPv6 over Bluetooth (6lowpan) How to twist a IPv6 over Bluetooth (6lowpan)
How to twist a IPv6 over Bluetooth (6lowpan)
 
nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry manager
 
Lamp configuration u buntu 10.04
Lamp configuration   u buntu 10.04Lamp configuration   u buntu 10.04
Lamp configuration u buntu 10.04
 
Openstack installation using rdo
Openstack installation using rdoOpenstack installation using rdo
Openstack installation using rdo
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
 
Programming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nanoProgramming OpenRISC on Altera De0_nano
Programming OpenRISC on Altera De0_nano
 
Install zpanel on linux server in 5 minutes
Install zpanel on linux server in 5 minutesInstall zpanel on linux server in 5 minutes
Install zpanel on linux server in 5 minutes
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virsh
 
Ahmed vic
Ahmed vicAhmed vic
Ahmed vic
 
Openstack installation using rdo multi node
Openstack installation using rdo multi nodeOpenstack installation using rdo multi node
Openstack installation using rdo multi node
 
Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Great Hiroshima with Python 170830
Great Hiroshima with Python 170830
 
Zookeper
ZookeperZookeper
Zookeper
 
LinuxをインストールしてWebサーバーを立ち上げてみよう【OSC2018 Tokyo/Spring】
LinuxをインストールしてWebサーバーを立ち上げてみよう【OSC2018 Tokyo/Spring】LinuxをインストールしてWebサーバーを立ち上げてみよう【OSC2018 Tokyo/Spring】
LinuxをインストールしてWebサーバーを立ち上げてみよう【OSC2018 Tokyo/Spring】
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 

Similaire à 3 manual installation of open vpn

X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 

Similaire à 3 manual installation of open vpn (20)

OpenVPN
OpenVPNOpenVPN
OpenVPN
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Alta disponibilidad en GNU/Linux
Alta disponibilidad en GNU/LinuxAlta disponibilidad en GNU/Linux
Alta disponibilidad en GNU/Linux
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
DNS (BIND) on CentOS
DNS (BIND) on CentOSDNS (BIND) on CentOS
DNS (BIND) on CentOS
 
Openvpn
OpenvpnOpenvpn
Openvpn
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
 
NAS Botnet Revealed - Mining Bitcoin
NAS Botnet Revealed - Mining Bitcoin NAS Botnet Revealed - Mining Bitcoin
NAS Botnet Revealed - Mining Bitcoin
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions
 
Kickstart
KickstartKickstart
Kickstart
 
Testing your infrastructure with litmus
Testing your infrastructure with litmusTesting your infrastructure with litmus
Testing your infrastructure with litmus
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptx
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm Nodes
 
PENYELESAIAN SOAL UKK/UPK TAHUN 2018 Paket 3 oleh Walid Umar
PENYELESAIAN SOAL UKK/UPK TAHUN 2018 Paket 3 oleh Walid UmarPENYELESAIAN SOAL UKK/UPK TAHUN 2018 Paket 3 oleh Walid Umar
PENYELESAIAN SOAL UKK/UPK TAHUN 2018 Paket 3 oleh Walid Umar
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
 
2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch
 

Dernier

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 

3 manual installation of open vpn

  • 1. ** ## description is written on page 3 Steps to follow to install OpenVpn on CentOS: 1. Install CentOS on server. 2. Update CentOS “yum update –y” 3. Enable epel repo • wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm • wget http://rpms.famillecollet.com/enterprise/remi-release-6*.rpm • sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm 4. yum install screen openvpn nano rsync tar curl bridge-utils python logrotate –y ## 5. Bridging echo ' tap="tap0 tap1 tap2 tap3" brctl addbr br0 brctl addif br0 eth1 #this is the local lan port for t in $tap; do openvpn --mktun --dev $t done for t in $tap; do brctl addif br0 $t done for t in $tap; do ifconfig $t 0.0.0.0 promisc up done /usr/bin/screen -d -m ping 10.8.1.1'>/etc/rc.local ** chkconfig NetworkManager off chkconfig network on chkconfig logrotate on chkconfig sshd on chkconfig openvpn on service NetworkManager stop service network stop service sshd restart cd /etc/sysconfig/network-scripts
  • 2. ** ## description is written on page 3 tap=“tap0 tap1 tap2 tap3” brctl addbr br0 brctl addif br0 eth1 for t in $tap; do openvpn --mktun --dev $t done for t in $tap; do brctl addif br0 $t done for t in $tap; do ifconfig $t 0.0.0.0 promisc up done /usr/bin/screen -d -m ping 10.8.1.1 -y echo " DEVICE=br0 TYPE=Bridge BOOTPROTO=static DNS1=8.8.8.8 GATEWAY=172.16.0.2 #local ip addr of endian firewall IPADDR= xxx.xxx.xxx.xxx #virtual ip address of openvpn server NETMASK=255.240.0.0 ONBOOT=yes SEARCH=nccl.iitbhu.ac.in" > ifcfg-br0 ** echo " TYPE=Ethernet BOOTPROTO=none IPADDR=xxx.xxx.xxx.xxx #local ip addr ex. 10.3.101.xxx PREFIX=8 GATEWAY=10.3.101.1 DNS1=8.8.8.8 DEFROUTE=no IPV4_FAILURE_FATAL=yes IPV6INIT=no ONBOOT=yes HWADDR=xx:xx:xx:xx:xx:xx #get eth0 hardware addr from ifconfig " > ifcfg-eth0 ** echo " HWADDR= xx:xx:xx:xx:xx:xx #get eth1 hardware addr from ifconfig TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no ONBOOT=yes BRIDGE=br0" >ifcfg-eth1 ** #connected to firewall
  • 3. ** ## description is written on page 3 6. Copy easy-rsa scripts to openvpn folder /etc/openvpn/ 7. add execute permission to all scripts of easy-rsa “cd /etc/openvpn/eas*” “ chmod a+x *” 8. Modify “vars” file according to the use. Set dh parameter to 1024. “gedit vars” 9. run vars file “source ./vars” “./clean-all” 10. Build dh parameter using “./build-dh” 11. Build CA using “./build-ca _nameOfCA_” 12. Build server using “./build-key-server _nameOfServer_” 13. Build client key using “./build-key _nameOfClient_” 14. “iptables-restore</root/iptables-working” (copy iptables-working file to root). This file could to saved to any folder, after saving go to same directly in terminal and use above command. 15. “chkconfig openvpn on” 16. “chkconfig ssh on” 17. “rm –rf /etc/sysconfig/network-scripts/ifcfg-A*” 18. “nano /etc/sysconfig/selinux” Edit enforcing to permissive and reboot If network do not work, then use “service NetworkManager restart” “service network restart” Keys are all written in “/etc/openvpn/easy-rsa/keys”. Copy required ca.crt, server.key, server.crt, dh1024.pem file to “/etc/openvpn”. ** these scripts are to be written on the file given at the last line. If the command do not work fine used “gedit _pathNameGivenAtLastLine_” given after ‘>’ symbol. ## If openvpn do not get installed even after enable epel repo then follow this webpage http://www.drmagu.com/openvpn-introduction-and-installation-on-centos-432.htm
  • 4. ** ## description is written on page 3 19. Write server config file as follows: proto tcp #tcp protocol used dev tap’x’ #edit virtual port for each file 0,1,2,3 local 10.3.101.22 #local ip of server ** port X #port used i.e 1194, 1195, 1196, 1197 server-bridge 172.16.0.1 255.240.0.0 172.18.x.x 172.18.x.x ** ifconfig-pool-persist ipp0.txt #ensure that particular ip is given to a person and change ipp’x’.txt i.e 0,1,2,3 push "route 172.16.0.0 255.240.0.0" push "route 10.0.0.0 255.0.0.0" push "dhcp-option DNS 208.67.220.220" push "dhcp-option DNS 208.67.222.222" push "redirect-gateway def1 bypass-dhcp" ca ca.crt #CA certificate file name cert server00.crt #Server certificate file name key server00.key #Server key file name dh dh1024.pem #dh file name client-to-client keepalive 5 100 comp-lzo max-clients 5 persist-key persist-tun status openvpn-status-1194.log log-append openvpn.log verb 4 ## save file as server-‘x’.conf in /etc/openvpn folder #1194,1195,1196,1197
  • 5. ** ## description is written on page 3 20. W r i t e c l i e n t c o n f i g f i l e a s f o l l o w s : client dev tap proto tcp remote 10.3.101.22 1194 ** remote 10.3.101.22 1195 ** remote 10.3.101.22 1196 ** remote 10.3.101.22 1197 ** remote-random resolv-retry infinite nobind persist-key persist-tun comp-lzo verb 3 ca ca.crt key test.key cert test.crt ## save file as client.ovpn for windows users and client.conf for linus users ## This file along with the client-cert, client-key and ca.crt are needed by user. This configuration file is common for all the users ## these files you will find in /etc/openvpn/easy-rsa/key
  • 6. ** ## description is written on page 3