<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/ DTD/wml_1.1.xml">

<wml>
<head>
<meta http-equiv="cache-control" content="max-age=180,private" />
</head>
<card title="PPTP,L2TP,OpenVPN之VPN三合一安装包(更新本地完整安装包)">
<p>
作者:<a href="index.php?action=showuser&amp;userid=1&amp;hash=">admin</a><br />时间:2013-08-21 09:01<br />分类:<a href="index.php?action=list&amp;cid=3&amp;hash=">电脑技术</a><br />内容:
PPTP,L2TP,OpenVPN之VPN三合一安装包(更新本地完整安装包)


 

#注意本地址在墙外
wget -c http://nchc.dl.sourceforge.net/project/vpn3in1/vpn3in1.tar.gz
tar zxvf vpn3in1.tar.gz
cd vpn3in1/
./vpn3in1.sh 2&gt;&amp;1 | tee vpn3in1.log
#注意本地址在墙外
2012.8.25更新：本地完整安装包
2012.3.19更新：添加对自定义下载安装包地址的支持，例如可以这样安装

wget http://www.yishanhome.com/wp-content/uploads/2011/06/vpn3in1.sh;sh vpn3in1.sh http://china123.10dig.net
china123.10dig.net部分就是自定义下载包存放的地址。
2011.8.5更新：添加对centos 6.0支持
2011.7.2更新：添加验证已安装mysql的root用户密码是否正确；添加Daloradius，RadiusManager，apache。详细安装可以看图示。
2011.5.8更新：添加可选使用本机freeradius服务或者使用远程freeradius服务器，如果使用远程则不会在本机安装freeradius及mysql服务；
提高Mysql是否安装识别，去除Nginx，phpMyAdmin,daloradius安装,这些功能建议单独安装，还原OPENVPN端口为1194。
数据库缺点： L2TP不能记录callingstationid，OPENVPN使用UDP端口不能记录acctstoptime
根据palfans修改而成，http://www.palfans.net/3-in-1-vpn-package/

开启mysql远程帐号脚本
mysql -u root -proot;
grant all on *.* to username@'%' identified by 'password';
flush privileges;
其中 all 指定相关的操作， *.*说明数据库和表名， username表示用户名，&lsquo;%&rsquo;这里写Host名称，允许所有就用&lsquo;%&rsquo;，&lsquo;password&rsquo;是密码。这里改成相应的值后进行操作就可以开启远程帐号访问

修改VPN服务器radius认证为远程服务器
修改参数在VPN服务器运行下面脚本

radius_server=&quot;radius服务器IP&quot;
secret_key=&quot;yishanhome.com&quot;
etc_dir=&quot;/usr/local/etc&quot;
sed -i -e &quot;s/name=127.0.0.1/name=$radius_server/&quot; /etc/openvpn/radiusplugin.cnf
sed -i -e &quot;s/sharedsecret=testpw/sharedsecret=$secret_key/&quot; /etc/openvpn/radiusplugin.cnf
sed -i -e &quot;s/localhost:1812/$radius_server:1812/&quot; $etc_dir/radiusclient/radiusclient.conf
sed -i -e &quot;s/localhost:1813/$radius_server:1813/&quot; $etc_dir/radiusclient/radiusclient.conf
mv -f $etc_dir/radiusclient/servers $etc_dir/radiusclient/servers.bak
cat &gt;&gt; $etc_dir/radiusclient/servers &lt;&lt;EOF
$radius_server $secret_key
EOF
修改参数在radius服务器运行下面脚本

client_ip=&quot;VPN服务器IP&quot;
secret_key=&quot;yishanhome.com&quot;
etc_dir=&quot;/usr/local/etc&quot;
iptables -A INPUT -i eth0 -p udp -s $client_ip --dport 1812 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -s $client_ip --dport 1813 -j ACCEPT
cat &gt;&gt; $etc_dir/raddb/clients.conf &lt;&lt;EOF
client localhost {
 ipaddr = $client_ip
 secret = $secret_key
 require_message_authenticator = no
 nastype  = other
}
EOF
安装LNMP
wget -c http://soft.vpser.net/lnmp/lnmp0.9-full.tar.gz
tar zxvf lnmp0.9-full.tar.gz
cd lnmp0.9-full/
./centos.sh 2&gt;&amp;1 | tee lnmp.log

 


 


SSH安装Radius Manager 3.9.0(集成中文及破解)
 




 




 



测试环境 centos 5.5。快速安装 apache，php，ioncube，mysql，freeradius 2.1.8，radiusmanage 3.9.0。
请注意，radiusmanage依旧是采用自动修改mac地址进行破解。安装完成后需要重启服务器生效！


wget http://www.yishanhome.com/wp-content/uploads/2011/05/radiusmanager.sh;sh radiusmanager.sh

后台管理 http://你的IP/admin.php 默认管理员帐号 admin 密码 1111
代码如下:

?View Code BASH
 



官方演示 http://radmandemo.dmasoftlab.com/admin.php 帐号：admin 密码：1111


 
</p><p>
<a href="index.php?action=login&amp;hash=">立即登陆发表评论</a><br />
</p>
<p><a href="index.php?action=list&amp;hash=">返回日志列表</a><br /><a href="index.php?action=index&amp;hash=">返回主页</a></p>
</card>
</wml>
