https://github.com/codfrm/stushare
校园网 openvpn 和 影视播放
https://github.com/codfrm/stushare
openvpn php radius
Last synced: about 1 month ago
JSON representation
校园网 openvpn 和 影视播放
- Host: GitHub
- URL: https://github.com/codfrm/stushare
- Owner: CodFrm
- Created: 2017-06-05T11:47:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-08T11:29:23.000Z (over 5 years ago)
- Last Synced: 2025-03-24T08:08:31.948Z (about 2 months ago)
- Topics: openvpn, php, radius
- Language: PHP
- Homepage:
- Size: 14.2 MB
- Stars: 12
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stuShare
[校园网分享计划](https://github.com/CodFrm/stuShare)# 搭建openVPN+STURadius认证
STURadius 为本项目定制radius(233)
## 配置openVPN
### 安装openVPN
CentOSyum install openvpn
### 生成服务器证书
```
wget https://github.com/OpenVPN/easy-rsa/archive/master.zipunzip master.zip
mv easy-rsa-mater/ easy-rsa/
cp -R easy-rsa/ /etc/openvpn/
cd /etc/openvpn/easy-rsa/easyrsa3/
cp vars.example vars
```
`nano vars 修改下面字段,然后修改,最后wq保存`
```
set_var EASYRSA_REQ_COUNTRY "CN"set_var EASYRSA_REQ_PROVINCE "BJ"
set_var EASYRSA_REQ_CITY "BeiJing"
set_var EASYRSA_REQ_ORG "stuShare"
set_var EASYRSA_REQ_EMAIL "[email protected]"
set_var EASYRSA_REQ_OU "stuShare"
cd /etc/openvpn/easy-rsa/easyrsa3/
./easyrsa build-ca
./easyrsa gen-req server nopass
./easyrsa sign server server
./easyrsa gen-dh
```
`修改server.conf配置`
```
cp /usr/share/doc/openvpn-2.3.14/sample/sample-config-files/server.conf /etc/openvpn
```### 配置STURadius
认证程序在radius文件夹中main.py 修改mysql配置
```
配置openvpn的radius插件
wget http://www.nongnu.org/radiusplugin/radiusplugin_v2.1a_beta1.tar.gztar xf radiusplugin_v2.1a_beta1.tar.gz
cd radiusplugin_v2.1a_beta1
yum install libgcrypt-devel -y
make
cp radiusplugin.so /etc/openvpn/
cp radiusplugin.cnf /etc/openvpn/
```
`配置radius文件`
`导入数据库文件`
`开启nat转发和iptables配置`
`firewall不知道配置,推荐关闭firewall开启iptables`
```
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j MASQUERADEiptables -Z
iptables -F
iptables -X
```## 将本项目克隆至本地
git clone https://github.com/CodFrm/stuShare.git
在 icf/config.php 中修改配置
### 微信支付监控
python 启动 stuShare中的wspay.py文件,还需配置回调url进行安装,然后就完成啦