<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>openvpn debian Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/openvpn-debian/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sun, 15 Jul 2018 22:46:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Simplest way to install Openvpn Server</title>
		<link>https://www.osradar.com/simplest-way-to-install-openvpn-server/</link>
					<comments>https://www.osradar.com/simplest-way-to-install-openvpn-server/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Thu, 05 Jul 2018 08:16:25 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Openvpn centos]]></category>
		<category><![CDATA[openvpn debian]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=4614</guid>

					<description><![CDATA[<p>Last time was looking to install Openvpn project at my work,  i had checked many tutorials , may methods  many  packages ,   finally i found this wonder script on git . an really cool work and big thanks to the developer. Let me start to tell you about my Environment: Openvpn Server Centos  7.5 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/simplest-way-to-install-openvpn-server/">Simplest way to install Openvpn Server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Last time was looking to install Openvpn project at my work,  i had checked many tutorials , may methods  many  packages ,   finally i found this wonder script on git . an really cool work and big thanks to the developer.</p>
<p>Let me start to tell you about my Environment:</p>
<p><strong>Openvpn Server Centos  7.5</strong></p>
<p>Hostname osradar.com.local</p>
<p>IP= 192.168.2.96</p>
<p><strong>Openvpn Client Debian 9.4 </strong></p>
<p>Hostname  osradar.com.debian</p>
<p>IP  192.168.2.161</p>
<p>&nbsp;</p>
<p>Lets  start the article How to install Openvpn Server in Centos7</p>
<p>First  Download the Openvpn install script  from git.io  and run it</p>
<pre>[root@osradar ~]# wget https://git.io/vpn -O openvpn-install.sh
--2018-07-02 18:27:20-- https://git.io/vpn
Resolving git.io (git.io)... 54.209.18.85, 54.174.44.191, 54.209.64.71, ...
Connecting to git.io (git.io)|54.209.18.85|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.github.com/Nyr/openvpn-install/master/openvpn-install.sh [following]
--2018-07-02 18:27:20-- https://raw.github.com/Nyr/openvpn-install/master/openvpn-install.sh
Resolving raw.github.com (raw.github.com)... 151.101.36.133
Connecting to raw.github.com (raw.github.com)|151.101.36.133|:443... connected.</pre>
<p><strong>Run the  bash  sript</strong></p>
<pre>bash openvpn-install.sh</pre>
<p>Now you have to answer some question to setup correctly  your vpn server</p>
<p><img loading="lazy" class="alignnone size-full wp-image-4617" src="https://www.osradar.com/wp-content/uploads/2018/07/vpn11.png" alt="" width="765" height="252" srcset="https://www.osradar.com/wp-content/uploads/2018/07/vpn11.png 765w, https://www.osradar.com/wp-content/uploads/2018/07/vpn11-300x99.png 300w, https://www.osradar.com/wp-content/uploads/2018/07/vpn11-696x229.png 696w" sizes="(max-width: 765px) 100vw, 765px" /></p>
<p>Please make sure that the correct IP is automatically inserted .</p>
<p>if you get  any extra screen about if your server NATED to  insert the Public IP ,  just ignore it  and leave it empty if its not the case</p>
<p><strong>Now press Enter to select the protocol to use.</strong></p>
<pre>Which protocol do you want for OpenVPN connections?
1) UDP (recommended)
2) TCP
Protocol [1-2]: 1</pre>
<p><strong>Keep  the standard port 1194</strong></p>
<pre>What port do you want OpenVPN listening to?
&lt;strong&gt;Port: 1194&lt;/strong&gt;</pre>
<p><strong>Use google DNS settings</strong></p>
<pre>Which DNS do you want to use with the VPN?
1) Current system resolvers
2) 1.1.1.1
3) Google
4) OpenDNS
5) Verisign
DNS [1-5]: 3</pre>
<p>Create Certificate name, in my case called <strong>client</strong></p>
<pre>Finally, tell me your name for the client certificate.
Please, use one word only, no special characters.
Client name: client</pre>
<p><strong>Now press Enter to start the installation</strong></p>
<pre>Okay, that was all I needed. We are ready to set up your OpenVPN server now.
Press any key to continue...
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 32 kB 00:00:00
* base: mirror.ams1.nl.leaseweb.net
* elrepo: mirrors.coreix.net
* epel: mirrors.coreix.net
* extras: mirror.ams1.nl.leaseweb.net
* updates: mirror.ams1.nl.leaseweb.net
epel | 3.2 kB 00:00:00
(1/3): epel/x86_64/group_gz | 88 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 927 kB 00:00:00
(3/3): epel/x86_64/primary | 3.5 MB 00:00:00
epel 12608/12608
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ams1.nl.leaseweb.net
* elrepo: mirrors.coreix.net
* epel: mirror.de.leaseweb.net
* extras: mirror.ams1.nl.leaseweb.net
* updates: mirror.ams1.nl.leaseweb.net
Package iptables-1.4.21-24.1.el7_5.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-12.el7.x86_64 already installed and latest version
Package ca-certificates-2018.2.22-70.0.el7_5.noarch already installed and latest version
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package openvpn.x86_64 0:2.4.6-1.el7 will be installed
--&gt; Processing Dependency: libpkcs11-helper.so.1()(64bit) for package: openvpn-2.4.6-1.el7.x86_64
--&gt; Running transaction check
---&gt; Package pkcs11-helper.x86_64 0:1.11-3.el7 will be installed
--&gt; Finished Dependency Resolution</pre>
<pre>Dependencies Resolved

======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
openvpn x86_64 2.4.6-1.el7 epel 518 k
Installing for dependencies:
pkcs11-helper x86_64 1.11-3.el7 epel 56 k

Transaction Summary
======================================================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 574 k
Installed size: 1.3 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/openvpn-2.4.6-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for openvpn-2.4.6-1.el7.x86_64.rpm is not installed
(1/2): openvpn-2.4.6-1.el7.x86_64.rpm | 518 kB 00:00:00
(2/2): pkcs11-helper-1.11-3.el7.x86_64.rpm | 56 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------
Total 1.2 MB/s | 574 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) &lt;epel@fedoraproject.org&gt;"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-11.noarch (@extras)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : pkcs11-helper-1.11-3.el7.x86_64 1/2
Installing : openvpn-2.4.6-1.el7.x86_64 2/2
Verifying : pkcs11-helper-1.11-3.el7.x86_64 1/2
Verifying : openvpn-2.4.6-1.el7.x86_64 2/2

Installed:
openvpn.x86_64 0:2.4.6-1.el7

Dependency Installed:
pkcs11-helper.x86_64 0:1.11-3.el7

Complete!

init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /etc/openvpn/easy-rsa/pki

Generating a 2048 bit RSA private key
.......................+++
.............................+++
writing new private key to '/etc/openvpn/easy-rsa/pki/private/ca.key.GI75Zi700x'
-----
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
...............+...+.............................+...............................+...................................................+................................+.............................+.............................................................................+............................+............................................................................................+.................................................................................................................++*++*

DH parameters of size 2048 created at /etc/openvpn/easy-rsa/pki/dh.pem

Generating a 2048 bit RSA private key
........................+++
...........+++
writing new private key to '/etc/openvpn/easy-rsa/pki/private/server.key.9t5t1ZJKWW'
-----
Using configuration from ./openssl-easyrsa.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName :ASN.1 12:'server'
Certificate is to be certified until Jun 29 22:47:39 2028 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated
Generating a 2048 bit RSA private key
...................................................+++
...........+++
writing new private key to '/etc/openvpn/easy-rsa/pki/private/client.key.vx8ObymU8Y'
-----
Using configuration from ./openssl-easyrsa.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName :ASN.1 12:'client'
Certificate is to be certified until Jun 29 22:47:39 2028 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated
Using configuration from ./openssl-easyrsa.cnf

An updated CRL has been created.
CRL file: /etc/openvpn/easy-rsa/pki/crl.pem

645
success
success
success
success
success
success
453
Created symlink from /etc/systemd/system/multi-user.target.wants/openvpn@server.service to /usr/lib/systemd/system/openvpn@.service.
Finished!
Your client configuration is available at: /root/client.ovpn
If you want to add more clients, you simply need to run this script again!</pre>
<p><strong>Important :</strong></p>
<p>Please  be sure that the port UDP 1194 allowed on firewalld</p>
<pre>[root@osradar ~]# firewall-cmd --permanent --add-port=1194/udp

success


[root@osradar ~]# firewall-cmd --reload</pre>
<p>&nbsp;</p>
<p>The Client configuration is available at /root/client.ovpn  just use the file from the  other  server</p>
<p>Copy the client certificate  from the server to the Client 192.168.2.161</p>
<pre>[root@osradar ~]# scp /root/client.ovpn root@192.168.2.161:/root
The authenticity of host '192.168.2.161 (192.168.2.161)' can't be established.
ECDSA key fingerprint is SHA256:+ONW5xo/70jQbrkNXmrHivMzv1IpXgl2EwgwluY3clo.
ECDSA key fingerprint is MD5:b6:c6:5e:d7:bd:dc:10:0a:26:99:af:50:ad:4e:3f:bc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.161' (ECDSA) to the list of known hosts.
root@192.168.2.161's password:
client.ovpn 100% 8219 4.1MB/s 00:00
[root@osradar ~]</pre>
<h3><strong>The OpenVPN Client  Configuration</strong></h3>
<p><strong>Install  Openvpn  in Debian/Ubuntu/Mint</strong></p>
<pre>apt-get  install openvpn</pre>
<p><strong>Suse/opensuse</strong></p>
<pre>zypper in openvpn</pre>
<p><strong>Redhat/Centos/Fedora</strong></p>
<pre>yum install openvpn</pre>
<p>Use the Config  vpn file to connect to the server  with bellow  command :</p>
<pre>openvpn --config /etc/openvpn/client.ovp
Wed Jul 4 15:34:29 2018 Unrecognized option or missing or extra parameter(s) in /root/client.ovpn:15: block-outside-dns (2.4.0)
Wed Jul 4 15:34:29 2018 OpenVPN 2.4.0 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 18 2017
Wed Jul 4 15:34:29 2018 library versions: OpenSSL 1.0.2l 25 May 2017, LZO 2.08
Wed Jul 4 15:34:29 2018 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Wed Jul 4 15:34:29 2018 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Wed Jul 4 15:34:29 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]192.168.2.98:1194
Wed Jul 4 15:34:29 2018 Socket Buffers: R=[212992-&gt;212992] S=[212992-&gt;212992]
Wed Jul 4 15:34:29 2018 UDP link local: (not bound)
Wed Jul 4 15:34:29 2018 UDP link remote: [AF_INET]192.168.2.98:1194
Wed Jul 4 15:34:29 2018 TLS: Initial packet from [AF_INET]192.168.2.98:1194, sid=aa7b5176 68f216e4
Wed Jul 4 15:34:29 2018 VERIFY OK: depth=1, CN=ChangeMe
Wed Jul 4 15:34:29 2018 Validating certificate key usage
Wed Jul 4 15:34:29 2018 ++ Certificate has key usage 00a0, expects 00a0
Wed Jul 4 15:34:29 2018 VERIFY KU OK
Wed Jul 4 15:34:29 2018 Validating certificate extended key usage
Wed Jul 4 15:34:29 2018 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Wed Jul 4 15:34:29 2018 VERIFY EKU OK
Wed Jul 4 15:34:29 2018 VERIFY OK: depth=0, CN=server
Wed Jul 4 15:34:29 2018 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Wed Jul 4 15:34:29 2018 [server] Peer Connection Initiated with [AF_INET]192.168.2.98:1194
Wed Jul 4 15:34:30 2018 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Jul 4 15:34:30 2018 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: timers and/or timeouts modified
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: --ifconfig/up options modified
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: route options modified
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: route-related options modified
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: peer-id set
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: adjusting link_mtu to 1625
Wed Jul 4 15:34:30 2018 OPTIONS IMPORT: data channel crypto options modified
Wed Jul 4 15:34:30 2018 Data Channel Encrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Wed Jul 4 15:34:30 2018 Data Channel Decrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Wed Jul 4 15:34:30 2018 ROUTE_GATEWAY 192.168.2.254/255.255.255.0 IFACE=enp0s3 HWADDR=08:00:27:b3:55:7a
Wed Jul 4 15:34:30 2018 TUN/TAP device tun0 opened
Wed Jul 4 15:34:30 2018 TUN/TAP TX queue length set to 100
Wed Jul 4 15:34:30 2018 do_ifconfig, tt-&gt;did_ifconfig_ipv6_setup=0
Wed Jul 4 15:34:30 2018 /sbin/ip link set dev tun0 up mtu 1500
Wed Jul 4 15:34:30 2018 /sbin/ip addr add dev tun0 10.8.0.2/24 broadcast 10.8.0.255
Wed Jul 4 15:34:30 2018 /sbin/ip route add 192.168.2.98/32 dev enp0s3
Wed Jul 4 15:34:30 2018 /sbin/ip route add 0.0.0.0/1 via 10.8.0.1
Wed Jul 4 15:34:30 2018 /sbin/ip route add 128.0.0.0/1 via 10.8.0.1
Wed Jul 4 15:34:30 2018 Initialization Sequence Completed</pre>
<p>The Tun0 vpn interface will be created.</p>
<p>Check it  with command :    ip a</p>
<pre>#ip a 

 inet 10.8.0.2/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::507c:9ab3:15b6:314a/64 scope link flags 800
valid_lft forever preferred_lft forever</pre>
<p>&nbsp;</p>
<p>VPN Server assigned to your Client this  IP  = 10.8.0.2</p>
<p><strong>Now try to  ping the VPN server  10.8.0.1 </strong></p>
<pre>root@debian:~# ping 10.8.0.1 -c4
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=0.549 ms
64 bytes from 10.8.0.1: icmp_seq=2 ttl=64 time=0.960 ms
64 bytes from 10.8.0.1: icmp_seq=3 ttl=64 time=0.974 ms
64 bytes from 10.8.0.1: icmp_seq=4 ttl=64 time=0.994 ms

--- 10.8.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3020ms
rtt min/avg/max/mdev = 0.549/0.869/0.994/0.186 ms
root@debian:~#</pre>
<p>Now your VPN server is ready . congratulations</p>
<p>Cheers!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/simplest-way-to-install-openvpn-server/">Simplest way to install Openvpn Server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/simplest-way-to-install-openvpn-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
