<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Totti的部落格]]></title> 
<link>https://iam.ittot.com/index.php</link> 
<description><![CDATA[记录我的生活，收集我的收集]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Totti的部落格]]></copyright>
<item>
<link>https://iam.ittot.com/read.php/.htm</link>
<title><![CDATA[buyvm Debian/Ubuntu OpenVZ一键安装PPTP (vpn)教程]]></title> 
<author>Totti &lt;totti5116@163.com&gt;</author>
<category><![CDATA[收集]]></category>
<pubDate>Sat, 01 Dec 2012 10:30:31 +0000</pubDate> 
<guid>https://iam.ittot.com/read.php/.htm</guid> 
<description>
<![CDATA[ 
	<br/>wget <a href="http://www.putdispenserhere.com/wp-content/uploads/pptpinstall.sh" target="_blank">http://www.putdispenserhere.com/wp-content/uploads/pptpinstall.sh</a><br/>chmod +x pptpinstall.sh<br/>./pptpinstall.sh<br/><div class="code">#!/bin/bash<br/># Interactive PoPToP install script on a OpenVZ VPS<br/># Tested on Debian 5, 6, and Ubuntu 11.04<br/># 2011 v1.1<br/># Author: Commander Waffles<br/># http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/<br/><br/>echo &quot;######################################################&quot;<br/>echo &quot;Interactive PoPToP Install Script for OpenVZ VPS&quot;<br/>echo &quot;by Commander Waffles http://www.putdispenserhere.com&quot;<br/>echo &quot;Should work on various deb-based Linux distos.&quot;<br/>echo &quot;Tested on Debian 5, 6, and Ubuntu 11.04&quot;<br/>echo<br/>echo &quot;Make sure to message your provider and have them enable&quot;<br/>echo &quot;IPtables and ppp modules prior to setting up PoPToP.&quot;<br/>echo<br/>echo &quot;You need to set up the server before creating more users.&quot;<br/>echo &quot;A separate user is required per connection or machine.&quot;<br/>echo &quot;######################################################&quot;<br/>echo<br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Select on option:&quot;<br/>echo &quot;1) Set up new PoPToP server AND create one user&quot;<br/>echo &quot;2) Create additional users&quot;<br/>echo &quot;######################################################&quot;<br/>read x<br/>if test $x -eq 1; then<br/>&nbsp;&nbsp;echo &quot;Enter username that you want to create (eg. client1 or john):&quot;<br/>&nbsp;&nbsp;read u<br/>&nbsp;&nbsp;echo &quot;Specify password that you want the server to use:&quot;<br/>&nbsp;&nbsp;read p<br/><br/># get the VPS IP<br/>ip=`ifconfig venet0:0 &#124; grep &#039;inet addr&#039; &#124; awk &#123;&#039;print $2&#039;&#125; &#124; sed s/.*://`<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Downloading and Installing PoPToP&quot;<br/>echo &quot;######################################################&quot;<br/>apt-get update<br/>apt-get install pptpd<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Creating Server Config&quot;<br/>echo &quot;######################################################&quot;<br/>cat &gt; /etc/ppp/pptpd-options &lt;&lt;END<br/>name pptpd<br/>refuse-pap<br/>refuse-chap<br/>refuse-mschap<br/>require-mschap-v2<br/>require-mppe-128<br/>ms-dns 8.8.8.8<br/>ms-dns 8.8.4.4<br/>proxyarp<br/>nodefaultroute<br/>lock<br/>nobsdcomp<br/>END<br/><br/># setting up pptpd.conf<br/>echo &quot;option /etc/ppp/pptpd-options&quot; &gt; /etc/pptpd.conf<br/>echo &quot;logwtmp&quot; &gt;&gt; /etc/pptpd.conf<br/>echo &quot;localip $ip&quot; &gt;&gt; /etc/pptpd.conf<br/>echo &quot;remoteip 10.1.0.1-100&quot; &gt;&gt; /etc/pptpd.conf<br/><br/># adding new user<br/>echo &quot;$u&nbsp;&nbsp;*&nbsp;&nbsp;$p&nbsp;&nbsp;*&quot; &gt;&gt; /etc/ppp/chap-secrets<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Forwarding IPv4 and Enabling it on boot&quot;<br/>echo &quot;######################################################&quot;<br/>cat &gt;&gt; /etc/sysctl.conf &lt;&lt;END<br/>net.ipv4.ip_forward=1<br/>END<br/>sysctl -p<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Updating IPtables Routing and Enabling it on boot&quot;<br/>echo &quot;######################################################&quot;<br/>iptables -t nat -A POSTROUTING -j SNAT --to $ip<br/># saves iptables routing rules and enables them on-boot<br/>iptables-save &gt; /etc/iptables.conf<br/><br/>cat &gt; /etc/network/if-pre-up.d/iptables &lt;&lt;END<br/>#!/bin/sh<br/>iptables-restore &lt; /etc/iptables.conf<br/>END<br/><br/>chmod +x /etc/network/if-pre-up.d/iptables<br/>cat &gt;&gt; /etc/ppp/ip-up &lt;&lt;END<br/>ifconfig ppp0 mtu 1400<br/>END<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Restarting PoPToP&quot;<br/>echo &quot;######################################################&quot;<br/>/etc/init.d/pptpd restart<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Server setup complete!&quot;<br/>echo &quot;Connect to your VPS at $ip with these credentials:&quot;<br/>echo &quot;Username:$u ##### Password: $p&quot;<br/>echo &quot;######################################################&quot;<br/><br/># runs this if option 2 is selected<br/>elif test $x -eq 2; then<br/>&nbsp;&nbsp;echo &quot;Enter username that you want to create (eg. client1 or john):&quot;<br/>&nbsp;&nbsp;read u<br/>&nbsp;&nbsp;echo &quot;Specify password that you want the server to use:&quot;<br/>&nbsp;&nbsp;read p<br/><br/># get the VPS IP<br/>ip=`ifconfig venet0:0 &#124; grep &#039;inet addr&#039; &#124; awk &#123;&#039;print $2&#039;&#125; &#124; sed s/.*://`<br/><br/># adding new user<br/>echo &quot;$u&nbsp;&nbsp;*&nbsp;&nbsp;$p&nbsp;&nbsp;*&quot; &gt;&gt; /etc/ppp/chap-secrets<br/><br/>echo<br/>echo &quot;######################################################&quot;<br/>echo &quot;Addtional user added!&quot;<br/>echo &quot;Connect to your VPS at $ip with these credentials:&quot;<br/>echo &quot;Username:$u ##### Password: $p&quot;<br/>echo &quot;######################################################&quot;<br/><br/>else<br/>echo &quot;Invalid selection, quitting.&quot;<br/>exit<br/>fi</div>
]]>
</description>
</item><item>
<link>https://iam.ittot.com/read.php/.htm#blogcomment</link>
<title><![CDATA[[评论] buyvm Debian/Ubuntu OpenVZ一键安装PPTP (vpn)教程]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://iam.ittot.com/read.php/.htm#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>