Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vpnsetup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
Zhang Huanjie
vpnsetup
Commits
9691eead
Verified
Commit
9691eead
authored
5 months ago
by
Zhang Huanjie
Browse files
Options
Downloads
Patches
Plain Diff
change instsll.txt
parent
1b48d3b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.txt
+35
-31
35 additions, 31 deletions
install.txt
with
35 additions
and
31 deletions
install.txt
+
35
−
31
View file @
9691eead
...
...
@@ -2,42 +2,46 @@
# curl https://raw.githubusercontent.com/bg6cq/vpnsetup/master/install.txt | sh
#install packages
cd /etc/yum.repos.d
mv CentOS-Vault.repo CentOS-Valut.repo.save
curl http://ip.ustc.edu.cn/CentOS-Valut.repo.6 > CentOS-Vault.repo
#change the eth? style
cp -f /etc/default/grub /etc/default/grub.bak
sed -i -e 's/quiet"/quiet net.ifnames=0"/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
cd /etc
rm -f localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai localtime
#curl http://ctos.ustc.edu.cn/epel.repo.6 > epel.repo
#cd /etc/pki/rpm-gpg/
#curl http://mirrors.ustc.edu.cn/epel/RPM-GPG-KEY-EPEL-6 > RPM-GPG-KEY-EPEL
#enable Devel rep
sed -i -e "s/enabled=0/enabled=1" /etc/yum.repos.d/Rocky-Devel.repo
#change logrotate.conf
sed -i -e "s/rotate 4/rotate 40/" /etc/logrotate.conf
#install packages
yum update -y
yum install -y gcc git lz4-devel openssl-devel dialog tcpdump
ntpdate libpcap-devel
yum install -y
telnet bind-utils traceroute gd-devel httpd
yum install -y gcc git lz4-devel openssl-devel dialog tcpdump
telnet traceroute gd-devel httpd
yum install -y
make libpcap-devel lm_sensors bind-utils net-tools
chkconfig httpd on
echo "HWMON_MODULES=coretemp" >> /etc/sysconfig/lm_sensors
echo "MODULE_0=coretemp" >> /etc/sysconfig/lm_sensors
#change network setting
s
ed -i -e "s/dhcp/static/" /etc/sysconfig/network-scripts/ifcfg-eth0
systemctl enable httpd.service
s
ystemctl enable lm_sensors.service
#install ethudp
cd /usr/src
git clone https://git
hub.com/bg6cq
/ethudp.git
git clone https://git
.ustc.edu.cn/james
/ethudp.git
cd ethudp
make
#install udptest
cd /usr/src
git clone https://github.com/bg6cq/udptest.git
cd udptest
make
#install vpnsetup
cd /usr/src
git clone https://git
hub.com/bg6cq
/vpnsetup.git
git clone https://git
.ustc.edu.cn/james
/vpnsetup.git
cd /usr/src/vpnsetup
make
ln -s /usr/src/vpnsetup/ethudp /etc/
ln -s /usr/src/vpnsetup/vpnsetup.sh /bin/vpnsetup
cp -f rc.firewall /etc/rc.d
grep vpnrestart.sh /etc/rc.local
if [ $? -eq 0 ];
then
...
...
@@ -47,16 +51,13 @@ else
echo /usr/src/vpnsetup/vpnrestart.sh >> /etc/rc.local
echo "/usr/src/traffic/iftrafficd &" >> /etc/rc.local
echo "setenforce 0" >> /etc/rc.local
echo "/etc/rc.d/rc.firewall" >> /etc/rc.local
fi
ln -s /usr/src/vpnsetup/vpnsetup.sh /bin/vpnsetup
/bin/cp -f iptables /etc/sysconfig
pwd
echo "-k 1234 -p 1234 -enc aes-128" > /etc/ethudp/SITE/OPT
cat /sys/class/net/eth0/address | tr 'a-f' 'A-F'|tr -d ':' > /etc/ethudp/SITE/SN
crontab crontab.txt
#install sshkey
mkdir /root/.ssh
chmod og-rwx /root/.ssh
cat authorized_keys >> /root/.ssh/authorized_keys
...
...
@@ -64,17 +65,20 @@ chmod og-rwx /root/.ssh/authorized_keys
/sbin/restorecon -r /root/.ssh
cd /usr/src
git clone https://git
hub.com/bg6cq
/traffic.git
git clone https://git
.ustc.edu.cn/james
/traffic.git
cd /usr/src/traffic
make
cp traffic.html /var/www/html/index.html
cd /usr/src/vpnsetup
git remote add local ssh://root@202.141.160.125:22222/git/vpnsetup.git
#git checkout -b
#cd /usr/src/vpnsetup
#git remote add local ssh://root@202.141.160.125:22222/git/vpnsetup.git
#git checkout -b
#vi /etc/ethudp/SITE/INDEX
systemctl disable NetworkManager.service
systemctl stop NetworkManager.service
/usr/src/vpnsetup/vpnrestart.sh
ip link show dev eth0
sync
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment