<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://gentoo-zh.org/extern.php?action=feed&amp;tid=529&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Gentoo-zh / openvpn安装]]></title>
		<link>http://www.gentoo-zh.org/viewtopic.php?id=529</link>
		<description><![CDATA[openvpn安装 最近发表的帖子。]]></description>
		<lastBuildDate>Sun, 13 Nov 2022 09:57:13 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[openvpn安装]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=566#p566</link>
			<description><![CDATA[<p>yum install -y gcc gcc-c++ openssl openssl-devel wget pam pam-devel</p><br /><p>configure: error: lzo enabled but missing<br />需要手工安装lzo，yum安装的无效<br />wget <a href="http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz" rel="nofollow">http://www.oberhumer.com/opensource/lzo … .06.tar.gz</a> <br />tar zxvf lzo-2.06.tar.gz <br />cd lzo-2.06 <br />./configure --prefix=/usr/local/ <br />make &amp;&amp; make install</p><p>wget <a href="https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.gz" rel="nofollow">https://swupdate.openvpn.org/community/ … 4.6.tar.gz</a><br />tar zxf openvpn-2.4.6.tar.gz<br />cd openvpn-2.4.6<br />./configure -prefix=/etc/openvpn<br />make &amp;&amp; make install</p><p>wget <a href="https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.4/EasyRSA-3.0.4.tgz" rel="nofollow">https://github.com/OpenVPN/easy-rsa/rel … -3.0.4.tgz</a><br />tar zxf EasyRSA-3.0.4.tgz<br />cp -rf EasyRSA-3.0.4 /etc/openvpn/easy-rsa</p><p>创建相关证书<br /># ./easyrsa init-pki&#160; &#160;#创建pki<br /># ./easyrsa build-ca&#160; nopass #创建ca<br /># ./easyrsa gen-req server nopass&#160; #创建服务端证书<br /># ./easyrsa sign server server&#160; &#160; &#160;#签约服务端证书<br /># ./easyrsa gen-dh&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;#创建diffie-hellman文件<br /># ./easyrsa gen-req client&#160; &#160; &#160; &#160; &#160;#创建客户端证书<br /># ./easyrsa sign client client&#160; &#160; &#160;#签约客户端证书，根据提示输入服务端ca密码</p><p>echo &quot;net.ipv4.ip_forward = 1&quot; &gt;&gt; /etc/sysctl.conf<br />sysctl -p</p><p>iptables -I INPUT -p udp -m udp --dport 60022 -j ACCEPT<br />iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth1 -j MASQUERADE<br />service iptables save #保存防火墙配置</p>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Sun, 13 Nov 2022 09:57:13 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=566#p566</guid>
		</item>
	</channel>
</rss>
