<?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>Tarotoast's Stuff &#187; fc4</title>
	<atom:link href="http://blog.tarotoast.com/tag/fc4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tarotoast.com</link>
	<description>Personal blog</description>
	<lastBuildDate>Fri, 04 Mar 2011 21:51:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP 5.2.1 on FC4 x86_64 compile note</title>
		<link>http://blog.tarotoast.com/2007/04/21/365/</link>
		<comments>http://blog.tarotoast.com/2007/04/21/365/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 21:22:12 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[Footprints + Diary]]></category>
		<category><![CDATA[Server Diary]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fc4]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/04/21/365/</guid>
		<description><![CDATA[Linking libraries from its default location ln -s /usr/include /opt/include ln -s /usr/lib64 /opt/lib Now configuring with new location: ./configure --prefix=/usr/local --enable-force-cgi-redirect --enable-fastcgi --with-libxml --with-zlib --with-bz2 --with-curl --with-gd --enable-mbstring --with-mysql --with-jpeg-dir=/opt --with-png-dir=/opt --with-mysql=/opt]]></description>
			<content:encoded><![CDATA[<p>Linking libraries from its default location</p>
<pre style="white-space: -moz-pre-wrap; border: 1px inset ; margin: 0px; padding: 6px; width: 400px; text-align: left">
ln -s /usr/include /opt/include
ln -s /usr/lib64 /opt/lib
</pre>
<p>Now configuring with new location:</p>
<pre style="white-space: -moz-pre-wrap; border: 1px inset ; margin: 0px; padding: 6px; width: 400px; text-align: left">
./configure --prefix=/usr/local --enable-force-cgi-redirect --enable-fastcgi --with-libxml --with-zlib --with-bz2 --with-curl  --with-gd --enable-mbstring --with-mysql --with-jpeg-dir=/opt --with-png-dir=/opt --with-mysql=/opt
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/04/21/365/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenVPN on FC4 note</title>
		<link>http://blog.tarotoast.com/2007/04/15/363/</link>
		<comments>http://blog.tarotoast.com/2007/04/15/363/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 21:19:16 +0000</pubDate>
		<dc:creator>tarotoast</dc:creator>
				<category><![CDATA[BSD+Linux]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Server Diary]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fc4]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[openvpn]]></category>

		<guid isPermaLink="false">http://blog.tarotoast.com/2007/04/15/363/</guid>
		<description><![CDATA[Server yum install openvpn cp -R /usr/share/openvpn/easy-rsa /etc/openvpn cd /etc/openvpn/easy-rsa vim vars: # easy-rsa parameter settings # NOTE: If you installed from an RPM, # don't edit this file in place in # /usr/share/openvpn/easy-rsa -- # instead, you should copy the whole # easy-rsa directory to another location # (such as /etc/openvpn) so that your [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Server</strong></p>
<ol>
<li>yum install openvpn</li>
<li>cp -R /usr/share/openvpn/easy-rsa /etc/openvpn</li>
<li>cd /etc/openvpn/easy-rsa</li>
<li>vim vars:
<pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 400px; height: 400px; text-align: left">
# easy-rsa parameter settings
# NOTE: If you installed from an RPM,
# don't edit this file in place in
# /usr/share/openvpn/easy-rsa --
# instead, you should copy the whole
# easy-rsa directory to another location
# (such as /etc/openvpn) so that your
# edits will not be wiped out by a future
# OpenVPN package upgrade.
# This variable should point to
# the top level of the easy-rsa
# tree.

export D=`pwd`

# This variable should point to
# the openssl.cnf file included
# with easy-rsa.

export KEY_CONFIG=$D/openssl.cnf

# Edit this variable to point to
# your soon-to-be-created key
# directory.
#
# WARNING: clean-all will do
# a rm -rf on this directory
# so make sure you define
# it correctly!

export KEY_DIR="/etc/openvpn/keys"

# Issue rm -rf warning

echo NOTE: when you run ./clean-all, I will be doing a rm -rf on $KEY_DIR

# Increase this to 2048 if you
# are paranoid.  This will slow
# down TLS negotiation performance
# as well as the one-time DH parms
# generation process.

export KEY_SIZE=1024

# These are the default values for fields
# which will be placed in the certificate.
# Don't leave any of these fields blank.

export KEY_COUNTRY=US
export KEY_PROVINCE=CA
export KEY_CITY=SANDIEGO
export KEY_ORG="TAROTOAST.COM"
export KEY_EMAIL="chang.peter@gmail.com"</pre>
</li>
<li>chmod 700 *</li>
<li>mkdir /etc/openvpn/keys</li>
<li>make sure in Bash shell (still at /etc/openvpn/easy-rsa directory)</li>
<li>./vars</li>
<li>./clean-all</li>
<li>./build-ca<br />
Enter ROOTCA for common name</li>
<li>./build-key-server server<br />
Enter ROOT for common name</li>
<li>./build-key [computername] &lt;&#8211; repeat for # of computers want to allow connect<br />
Enter [computername] as common name<br />
EX: ./build-key AMD64<br />
EX: ./build-key X40</li>
<li>./build-dh</li>
<li>vim /etc/openvpn/server.conf:
<pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 400px; text-align: left">
port 1194
proto tcp
dev tun
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem
server 10.11.12.0 255.255.255.0
client-config-dir ccd
push "dhcp-option DNS SERVERIP"
push "dhcp-option DNS SERVERDNS"
ifconfig-pool-persist ipp.txt
push "redirect-gateway"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status server-tcp.log
verb 3</pre>
</li>
<li>Create log files: touch /etc/openvpn/server-tcp.log /etc/openvpn/ipp.txt</li>
<li>vim /etc/init.d/openvpn:<br />
Uncomment line 114
<pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 400px; text-align: left">/sbin/modprobe tun &gt;/dev/null 2&gt;&amp;1</pre>
<p>Insert after line 115
<pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 400px; text-align: left">
iptables -t nat -A POSTROUTING -s 10.11.12.3 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.4 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.5 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.6 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.7 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.8 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.9 -j SNAT --to SERVERIP
iptables -t nat -A POSTROUTING -s 10.11.12.10 -j SNAT --to SERVERIP</pre>
</li>
<li>service openvpn start</li>
</ol>
<p><strong>Client (Windows Vista with UAC on)</strong></p>
<ol>
<li>Download and install OpenVPN Gui 1.0.3 with OpenVPN 2.0.9 [<a href="http://openvpn.se/files/install_packages/openvpn-2.0.9-gui-1.0.3-install.exe">Here</a>]</li>
<li>Scary warning will pop up telling you the driver will not work, install it anyway. OpenVPN&#8217;s developers fixed it already.
<li>Make a shortcut on desktop to GUI executable &#8220;C:\Program Files\OpenVPN\bin\openvpn-gui-1.0.3.exe&#8221;</li>
<li>Use WinSCP to download these files onto the client computer:<br />
/etc/openvpn/keys/ca.crt<br />
/etc/openvpn/keys/AMD64.key<br />
/etc/openvpn/keys/AMD64.crt</li>
<li>Put above files along with this VPNServer.ovpn in C:\Program Files\OpenVPN\config<br />
VPNServer.ovpn
<pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 400px; text-align: left">
client
dev tun
proto tcp
remote SERVERIP 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert AMD64.crt
key AMD64.key
ns-cert-type server
push "dhcp-option DNS SERVERIP"
push "dhcp-option DNS SERVERDNSIP"
comp-lzo
verb 3
route-method exe
route-delay 2
</pre>
</li>
<li>Right click on the shortcut to openvpn-gui-1.0.3.exe, select Run As Administrator</li>
<li>On the taskbar, right click the openvpn gui icon, select connect</li>
</ol>
<p>DONE [aha</p>
<p>The above mostly follows [<a href="http://www.webhostingtalk.com/showthread.php?t=595436">this thread</a>] except some minor changes in client side config.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tarotoast.com/2007/04/15/363/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

