<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://mywiki.romanost.co.il/index.php?action=history&amp;feed=atom&amp;title=OpenWRT</id>
		<title>OpenWRT - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://mywiki.romanost.co.il/index.php?action=history&amp;feed=atom&amp;title=OpenWRT"/>
		<link rel="alternate" type="text/html" href="https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;action=history"/>
		<updated>2026-04-16T14:32:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.4</generator>

	<entry>
		<id>https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;diff=82&amp;oldid=prev</id>
		<title>Meadmin at 14:18, 25 April 2020</title>
		<link rel="alternate" type="text/html" href="https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;diff=82&amp;oldid=prev"/>
				<updated>2020-04-25T14:18:41Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:18, 25 April 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/x509-types/server&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/x509-types/server&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/x509-types/client&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/x509-types/client&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/openssl-easyrsa.cnf&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; mv server /etc/easy-rsa/pki/x509-types/ &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; mv server /etc/easy-rsa/pki/x509-types/ &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; mv client /etc/easy-rsa/pki/x509-types/&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; mv client /etc/easy-rsa/pki/x509-types/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; mv openssl-easyrsa.cnf /etc/easy-rsa/pki/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2. Configure firewall&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2. Configure firewall&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Meadmin</name></author>	</entry>

	<entry>
		<id>https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;diff=79&amp;oldid=prev</id>
		<title>Meadmin at 13:50, 25 April 2020</title>
		<link rel="alternate" type="text/html" href="https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;diff=79&amp;oldid=prev"/>
				<updated>2020-04-25T13:50:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:50, 25 April 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot; &gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;5. Create client configuration file:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;5. Create client configuration file:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; # Fetch IP address&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; # Fetch IP address &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;or update to FQDN&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; #OVPN_SERV=&amp;quot;fqdn.myhome.com&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; OVPN_SERV=`wget -qO- ifconfig.co`&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; OVPN_SERV=`wget -qO- ifconfig.co`&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Meadmin</name></author>	</entry>

	<entry>
		<id>https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;diff=78&amp;oldid=prev</id>
		<title>Meadmin: Created page with &quot;Install OpenVPN on OpenWRT  1. Install packages:  opkg update  opkg install  luci-app-openvpn  opkg install  openvpn-openssl  wget https://raw.githubusercontent.com/OpenVPN/ea...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mywiki.romanost.co.il/index.php?title=OpenWRT&amp;diff=78&amp;oldid=prev"/>
				<updated>2020-04-25T13:39:54Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Install OpenVPN on OpenWRT  1. Install packages:  opkg update  opkg install  luci-app-openvpn  opkg install  openvpn-openssl  wget https://raw.githubusercontent.com/OpenVPN/ea...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Install OpenVPN on OpenWRT&lt;br /&gt;
&lt;br /&gt;
1. Install packages:&lt;br /&gt;
 opkg update&lt;br /&gt;
 opkg install  luci-app-openvpn&lt;br /&gt;
 opkg install  openvpn-openssl&lt;br /&gt;
 wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/easyrsa&lt;br /&gt;
 chmod 755 easyrsa&lt;br /&gt;
 mv easyrsa /usr/bin&lt;br /&gt;
 mkdir -p /etc/easy-rsa/pki/x509-types&lt;br /&gt;
 wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/x509-types/server&lt;br /&gt;
 wget https://raw.githubusercontent.com/OpenVPN/easy-rsa/master/easyrsa3/x509-types/client&lt;br /&gt;
 mv server /etc/easy-rsa/pki/x509-types/ &lt;br /&gt;
 mv client /etc/easy-rsa/pki/x509-types/&lt;br /&gt;
&lt;br /&gt;
2. Configure firewall&lt;br /&gt;
 uci rename firewall.@zone[0]=&amp;quot;lan&amp;quot;&lt;br /&gt;
 uci rename firewall.@zone[1]=&amp;quot;wan&amp;quot;&lt;br /&gt;
 uci rename firewall.@forwarding[0]=&amp;quot;lan_wan&amp;quot;&lt;br /&gt;
 uci del_list firewall.lan.device=&amp;quot;tun0&amp;quot;&lt;br /&gt;
 uci add_list firewall.lan.device=&amp;quot;tun0&amp;quot;&lt;br /&gt;
 uci -q delete firewall.vpn&lt;br /&gt;
 uci set firewall.ovpn=&amp;quot;rule&amp;quot;&lt;br /&gt;
 uci set firewall.ovpn.name=&amp;quot;Allow-OpenVPN&amp;quot;&lt;br /&gt;
 uci set firewall.ovpn.src=&amp;quot;wan&amp;quot;&lt;br /&gt;
 uci set firewall.ovpn.dest_port=&amp;quot;1194&amp;quot;&lt;br /&gt;
 uci set firewall.ovpn.proto=&amp;quot;udp&amp;quot;&lt;br /&gt;
 uci set firewall.ovpn.target=&amp;quot;ACCEPT&amp;quot;&lt;br /&gt;
 uci commit firewall&lt;br /&gt;
 /etc/init.d/firewall restart&lt;br /&gt;
&lt;br /&gt;
3. Create Certificates:&lt;br /&gt;
 export EASYRSA_PKI=&amp;quot;/etc/easy-rsa/pki&amp;quot; &lt;br /&gt;
 export EASYRSA_REQ_CN=&amp;quot;ovpnca&amp;quot;&lt;br /&gt;
 # Remove and re-initialize the PKI directory&lt;br /&gt;
 easyrsa --batch init-pki&lt;br /&gt;
 # Generate DH parameters&lt;br /&gt;
 easyrsa --batch gen-dh&lt;br /&gt;
 # Create a new CA&lt;br /&gt;
 easyrsa --batch build-ca nopass&lt;br /&gt;
 # Generate a keypair and sign locally for a server&lt;br /&gt;
 easyrsa --batch build-server-full server nopass&lt;br /&gt;
 # Generate a keypair and sign locally for a client &lt;br /&gt;
 easyrsa --batch build-client-full client nopass&lt;br /&gt;
&lt;br /&gt;
4. Configure VPN server:&lt;br /&gt;
 # Generate TLS PSK&lt;br /&gt;
 OVPN_PKI=&amp;quot;/etc/easy-rsa/pki&amp;quot;&lt;br /&gt;
 openvpn --genkey --secret ${OVPN_PKI}/tc.pem&lt;br /&gt;
 &lt;br /&gt;
 # Configuration parameters&lt;br /&gt;
 OVPN_DIR=&amp;quot;/etc/openvpn&amp;quot;&lt;br /&gt;
 OVPN_PKI=&amp;quot;/etc/easy-rsa/pki&amp;quot;&lt;br /&gt;
 OVPN_DEV=&amp;quot;$(uci get firewall.lan.device | sed -e &amp;quot;s/^.*\s//&amp;quot;)&amp;quot;&lt;br /&gt;
 OVPN_PORT=&amp;quot;$(uci get firewall.ovpn.dest_port)&amp;quot;&lt;br /&gt;
 OVPN_PROTO=&amp;quot;$(uci get firewall.ovpn.proto)&amp;quot;&lt;br /&gt;
 OVPN_POOL=&amp;quot;192.168.8.0 255.255.255.0&amp;quot;&lt;br /&gt;
 OVPN_DNS=&amp;quot;${OVPN_POOL%.* *}.1&amp;quot;&lt;br /&gt;
 OVPN_DOMAIN=&amp;quot;$(uci get dhcp.@dnsmasq[0].domain)&amp;quot;&lt;br /&gt;
 OVPN_DH=&amp;quot;$(cat ${OVPN_PKI}/dh.pem)&amp;quot;&lt;br /&gt;
 OVPN_TC=&amp;quot;$(sed -e &amp;quot;/^#/d;/^\w/N;s/\n//&amp;quot; ${OVPN_PKI}/tc.pem)&amp;quot;&lt;br /&gt;
 OVPN_CA=&amp;quot;$(openssl x509 -in ${OVPN_PKI}/ca.crt)&amp;quot;&lt;br /&gt;
 NL=$&amp;#039;\n&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
 # Configure VPN server&lt;br /&gt;
 umask u=rw,g=,o=&lt;br /&gt;
 grep -l -r -e &amp;quot;TLS Web Server Auth&amp;quot; &amp;quot;${OVPN_PKI}/issued&amp;quot; \&lt;br /&gt;
 | sed -e &amp;quot;s/^.*\///;s/\.\w*$//&amp;quot; \&lt;br /&gt;
 | while read -r OVPN_ID&lt;br /&gt;
 do&lt;br /&gt;
 OVPN_CERT=&amp;quot;$(openssl x509 -in ${OVPN_PKI}/issued/${OVPN_ID}.crt)&amp;quot;&lt;br /&gt;
 OVPN_KEY=&amp;quot;$(cat ${OVPN_PKI}/private/${OVPN_ID}.key)&amp;quot;&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; ${OVPN_DIR}/${OVPN_ID}.conf&lt;br /&gt;
 verb 3&lt;br /&gt;
 user nobody&lt;br /&gt;
 group nogroup&lt;br /&gt;
 dev ${OVPN_DEV}&lt;br /&gt;
 port ${OVPN_PORT}&lt;br /&gt;
 proto ${OVPN_PROTO}&lt;br /&gt;
 server ${OVPN_POOL}&lt;br /&gt;
 topology subnet&lt;br /&gt;
 client-to-client&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 persist-tun&lt;br /&gt;
 persist-key&lt;br /&gt;
 push &amp;quot;dhcp-option DNS ${OVPN_DNS}&amp;quot;&lt;br /&gt;
 push &amp;quot;dhcp-option DOMAIN ${OVPN_DOMAIN}&amp;quot;&lt;br /&gt;
 push &amp;quot;redirect-gateway def1&amp;quot;&lt;br /&gt;
 push &amp;quot;persist-tun&amp;quot;&lt;br /&gt;
 push &amp;quot;persist-key&amp;quot;&lt;br /&gt;
 &amp;lt;dh&amp;gt;${NL}${OVPN_DH}${NL}&amp;lt;/dh&amp;gt;&lt;br /&gt;
 &amp;lt;tls-auth&amp;gt;${NL}${OVPN_TC}${NL}&amp;lt;/tls-auth&amp;gt;&lt;br /&gt;
 &amp;lt;ca&amp;gt;${NL}${OVPN_CA}${NL}&amp;lt;/ca&amp;gt;&lt;br /&gt;
 &amp;lt;cert&amp;gt;${NL}${OVPN_CERT}${NL}&amp;lt;/cert&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;${NL}${OVPN_KEY}${NL}&amp;lt;/key&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
 done&lt;br /&gt;
 /etc/init.d/openvpn restart&lt;br /&gt;
&lt;br /&gt;
5. Create client configuration file:&lt;br /&gt;
&lt;br /&gt;
 # Fetch IP address&lt;br /&gt;
 OVPN_SERV=`wget -qO- ifconfig.co`&lt;br /&gt;
 &lt;br /&gt;
 # Configuration parameters&lt;br /&gt;
 OVPN_DIR=&amp;quot;/etc/openvpn&amp;quot;&lt;br /&gt;
 OVPN_PKI=&amp;quot;/etc/easy-rsa/pki&amp;quot;&lt;br /&gt;
 OVPN_DEV=&amp;quot;$(uci get firewall.lan.device | sed -e &amp;quot;s/^.*\s//&amp;quot;)&amp;quot;&lt;br /&gt;
 OVPN_PORT=&amp;quot;$(uci get firewall.ovpn.dest_port)&amp;quot;&lt;br /&gt;
 OVPN_PROTO=&amp;quot;$(uci get firewall.ovpn.proto)&amp;quot;&lt;br /&gt;
 OVPN_TC=&amp;quot;$(sed -e &amp;quot;/^#/d;/^\w/N;s/\n//&amp;quot; ${OVPN_PKI}/tc.pem)&amp;quot;&lt;br /&gt;
 OVPN_CA=&amp;quot;$(openssl x509 -in ${OVPN_PKI}/ca.crt)&amp;quot;&lt;br /&gt;
 NL=$&amp;#039;\n&amp;#039;&lt;br /&gt;
  &lt;br /&gt;
 # Generate VPN client profiles&lt;br /&gt;
 umask u=rw,g=,o=&lt;br /&gt;
 grep -l -r -e &amp;quot;TLS Web Client Auth&amp;quot; &amp;quot;${OVPN_PKI}/issued&amp;quot; \&lt;br /&gt;
 | sed -e &amp;quot;s/^.*\///;s/\.\w*$//&amp;quot; \&lt;br /&gt;
 | while read -r OVPN_ID&lt;br /&gt;
 do&lt;br /&gt;
 OVPN_CERT=&amp;quot;$(openssl x509 -in ${OVPN_PKI}/issued/${OVPN_ID}.crt)&amp;quot;&lt;br /&gt;
 OVPN_KEY=&amp;quot;$(cat ${OVPN_PKI}/private/${OVPN_ID}.key)&amp;quot;&lt;br /&gt;
 cat &amp;lt;&amp;lt; EOF &amp;gt; ${OVPN_DIR}/${OVPN_ID}.ovpn&lt;br /&gt;
 verb 3&lt;br /&gt;
 dev ${OVPN_DEV%%[0-9]*}&lt;br /&gt;
 nobind&lt;br /&gt;
 client&lt;br /&gt;
 remote ${OVPN_SERV} ${OVPN_PORT} ${OVPN_PROTO}&lt;br /&gt;
 auth-nocache&lt;br /&gt;
 remote-cert-tls server&lt;br /&gt;
 &amp;lt;tls-auth&amp;gt;${NL}${OVPN_TC}${NL}&amp;lt;/tls-auth&amp;gt;&lt;br /&gt;
 &amp;lt;ca&amp;gt;${NL}${OVPN_CA}${NL}&amp;lt;/ca&amp;gt;&lt;br /&gt;
 &amp;lt;cert&amp;gt;${NL}${OVPN_CERT}${NL}&amp;lt;/cert&amp;gt;&lt;br /&gt;
 &amp;lt;key&amp;gt;${NL}${OVPN_KEY}${NL}&amp;lt;/key&amp;gt;&lt;br /&gt;
 EOF&lt;br /&gt;
 done&lt;br /&gt;
 ls ${OVPN_DIR}/*.ovpn&lt;/div&gt;</summary>
		<author><name>Meadmin</name></author>	</entry>

	</feed>