<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Openvpn on nagg.eu</title><link>https://nagg.eu/tags/openvpn/</link><description>Recent content in Openvpn on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 11 May 2018 12:29:10 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/openvpn/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenVPN: tun tap invalid argument (code=22)</title><link>https://nagg.eu/openvpn-tun-tap-invalid-argument-code22/</link><pubDate>Fri, 11 May 2018 12:29:10 +0000</pubDate><guid>https://nagg.eu/openvpn-tun-tap-invalid-argument-code22/</guid><description>&lt;p&gt;After upgrading my OpenVPN server to CentOS 7.5 I had trouble connecting to it.&lt;br&gt;
Specifically, I had two different issues:&lt;br&gt;
** the laptop, which is running Fedora 28, was able to connect just fine but
DNS resolution was broken.&lt;br&gt;
** OpenVPN for Android was also connecting just fine but reporting a weird
error: &lt;code&gt;OpenVPN: tun tap invalid argument (code=22)&lt;/code&gt;.&lt;br&gt;
The first one was caused by me because after the CentOS upgrade procedure was
completed I also run &lt;code&gt;yum autoremove&lt;/code&gt; which deleted dnsmasq; the solution was
fairly simple, reinstall and reconfigure &lt;a href="https://nagg.eu/openvpn-server-and-centos/"&gt;dnsmasq&lt;/a&gt;.&lt;br&gt;
For the second issue the solution was to enable comp-lzo and voilà, everything
started working again.&lt;/p&gt;</description></item><item><title>OpenVPN server and CentOS</title><link>https://nagg.eu/openvpn-server-and-centos/</link><pubDate>Sun, 19 May 2013 17:52:52 +0000</pubDate><guid>https://nagg.eu/openvpn-server-and-centos/</guid><description>&lt;p&gt;OpenVPN is the de facto standard VPN free open source software; it is widely
used, tested, well documented and also included in the CentOS repos (EPEL).&lt;/p&gt;
&lt;h2 id="-server-side-configuration"&gt;.:. Server side configuration&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum install openvpn easy-rsa dnsmasq
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When yum is done installing the required packages, copy the sample config file.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;cp /usr/share/doc/openvpn-*/sample/sample-config-files/server.conf /etc/openvpn
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Uncomment/edit the following lines in /etc/openvpn/server.conf:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh4096.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push &amp;#34;redirect-gateway def1&amp;#34;
push &amp;#34;dhcp-option DNS 10.8.0.1&amp;#34;
keepalive 10 120
tls-auth ta.key 0 # This file is secret
key-direction 0
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
auth SHA512
cipher AES-256-GCM
#comp-lzo # Disable LZO compression
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log # disable log, optional
;log-append openvpn.log # disable log, optional
user nobody
group nobody
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now, create two folders easy-rsa/keys in /etc/openvpn and copy some files into
them:&lt;/p&gt;</description></item></channel></rss>