<?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>Full HeartDisk &#187; NAT linux CentOS</title>
	<atom:link href="http://www.lewiverdatama.com/tag/nat-linux-centos/feed" rel="self" type="application/rss+xml" />
	<link>http://www.lewiverdatama.com</link>
	<description>repository of my ideas!</description>
	<lastBuildDate>Wed, 30 Nov 2011 03:48:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[troubleshooting] VPN can&#8217;t browsing</title>
		<link>http://www.lewiverdatama.com/tutorial/troubleshooting-vpn-cant-browsing</link>
		<comments>http://www.lewiverdatama.com/tutorial/troubleshooting-vpn-cant-browsing#comments</comments>
		<pubDate>Mon, 12 Jul 2010 16:26:15 +0000</pubDate>
		<dc:creator>Lewi Verdatama</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Fix VPN]]></category>
		<category><![CDATA[NAT linux CentOS]]></category>
		<category><![CDATA[VPN can't browsing]]></category>

		<guid isPermaLink="false">http://www.lewiverdatama.com/?p=201</guid>
		<description><![CDATA[Well, honestly.. i&#8217;ve re-installed my VPS almost for 12 times. All because my vpn server can&#8217;t browsing even it&#8217;s connected to internet (on status). This is my problematic configuration: dev tun port 1194 proto udp ca /etc/openvpn/ca.crt cert /etc/openvpn/server.crt key /etc/openvpn/server.key dh /etc/openvpn/dh1024.pem persist-key persist-tun server 10.8.0.0 255.255.255.0 keepalive 10 30 client-to-client comp-lzo ifconfig-pool-persist ipp.txt [...]]]></description>
			<content:encoded><![CDATA[<p>Well, honestly.. i&#8217;ve re-installed my VPS almost for 12 times. All because my vpn server can&#8217;t browsing even it&#8217;s connected to internet (on status). This is my problematic configuration:</p>
<pre class="brush:bash">dev tun
port 1194
proto udp
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
persist-key
persist-tun
server 10.8.0.0 255.255.255.0
keepalive 10 30
client-to-client
comp-lzo
ifconfig-pool-persist ipp.txt
status /etc/openvpn/openvpn-status.log
verb 3
push "redirect-gateway"
</pre>
<p>and the openvpn client config is below:<span id="more-201"></span></p>
<pre class="brush:bash">dev tun
client
proto udp
persist-tun
persist-key
resolv-retry infinite
mute-replay-warnings
remote REMOTE.HOST 1194
ca /etc/openvpn/ca.crt
cert /etc/openvpn/client1.crt
key /etc/openvpn/client1.key
comp-lzo
verb 3
</pre>
<p><strong>The problem:</strong><br />
Using the above config files I continuously got errors like this on the server syslog:</p>
<blockquote><p>May 1 00:00:00 hostname ovpn-openvpn[22563]: client1/X.Y.Z.W:1194 MULTI: bad source address from client [10.10.1.11], packet dropped</p></blockquote>
<p>where X.Y.Z.W is my public IP and 10.10.1.11 is the Lan IP of the machine that makes the connection to the openvpn server.</p>
<p><strong>The solution:</strong><br />
finally, here&#8217;s the solution for all that problematic configuration:</p>
<p>open your .conf file and edit it! Please add two lines on the bottom below:</p>
<pre class="brush:bash">dev tun
port 1194
proto udp
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
persist-key
persist-tun
server 10.8.0.0 255.255.255.0
keepalive 10 30
client-to-client
comp-lzo
ifconfig-pool-persist ipp.txt
status /etc/openvpn/openvpn-status.log
verb 3
push "redirect-gateway"
client-config-dir ccd
route 10.10.1.0 255.255.255.0</pre>
<p>once again, remember to add the two lines:</p>
<pre class="brush:bash">client-config-dir ccd
route 10.10.1.0 255.255.255.0</pre>
<p>Then I created the <code>/etc/openvpn/ccd/</code> dir and put inside a file named client1 with the following contents:</p>
<pre class="brush:bash"># cat /etc/openvpn/ccd/client1
iroute 10.10.1.0 255.255.255.0</pre>
<p>Client configuration stays the same.</p>
<p>All should be fine now and in your server logs you will now see entries like this:</p>
<blockquote><p>May 1 00:00:00 hostname ovpn-openvpn[27096]: client1/X.Y.Z.W:1194 MULTI: Learn: 10.10.1.11 -&gt; client1/X.Y.Z.W:1194</p></blockquote>
<p>Remember to load you NAT again!<br />
<em>credit to <a href="http://www.void.gr/kargig/blog/2008/05/17/openvpn-multi-bad-source-address-from-client-solution/">VOID</a></em>
<div class="fblike_button" style="margin: 10px 0;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.lewiverdatama.com%2Ftutorial%2Ftroubleshooting-vpn-cant-browsing&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=segoe ui&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:23px"></iframe></div>
]]></content:encoded>
			<wfw:commentRss>http://www.lewiverdatama.com/tutorial/troubleshooting-vpn-cant-browsing/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

