full.sh 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. #!/bin/bash
  2. ### 🔰 COPYRIGHT © 2021 OnePieceVPN, Inc 🔰 ###
  3. # Mod by PrinceNewbie
  4. # ==================================================
  5. # initialisasi var
  6. export DEBIAN_FRONTEND=noninteractive
  7. OS=`uname -m`;
  8. MYIP=$(wget -qO- ipv4.icanhazip.com);
  9. MYIP2="s/xxxxxxxxx/$MYIP/g";
  10. ANU=$(ip -o $ANU -4 route show to default | awk '{print $5}');
  11. apt-get -y install apt-transport-https lsb-release ca-certificates curl
  12. curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
  13. sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
  14. apt update
  15. # install webserver
  16. cd
  17. rm /etc/nginx/sites-enabled/default
  18. rm /etc/nginx/sites-available/default
  19. wget -O /etc/nginx/nginx.conf "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/nginx.conf"
  20. wget -O /etc/nginx/conf.d/vps.conf "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/vps.conf"
  21. wget -O /etc/nginx/conf.d/monitoring.conf "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/monitoring.conf"
  22. mkdir -p /home/vps/public_html
  23. wget -O /home/vps/public_html/index.php "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/index.php"
  24. sed -i 's/listen = \/run\/php\/php7.3-fpm.sock/listen = 127.0.0.1:9000/g' /etc/php/7.3/fpm/pool.d/www.conf
  25. sed -i $MYIP2 /home/vps/public_html/index.php;
  26. service php7.3-fpm restart
  27. service nginx restart
  28. # OpenVPN monitoring
  29. apt-get install -y gcc libgeoip-dev python-virtualenv python-dev geoip-database-extra uwsgi uwsgi-plugin-python
  30. wget -O /srv/openvpn-monitor.tar "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/openvpn-monitor.tar"
  31. cd /srv
  32. tar xf openvpn-monitor.tar
  33. cd openvpn-monitor
  34. virtualenv .
  35. . bin/activate
  36. pip install -r requirements.txt
  37. wget -O /etc/uwsgi/apps-available/openvpn-monitor.ini "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/openvpn-monitor.ini"
  38. ln -s /etc/uwsgi/apps-available/openvpn-monitor.ini /etc/uwsgi/apps-enabled/
  39. # GeoIP For OpenVPN Monitor
  40. mkdir -p /var/lib/GeoIP
  41. wget -O /var/lib/GeoIP/GeoLite2-City.mmdb.gz "https://raw.githubusercontent.com/irwanmohi/test/master/simpleocs/GeoLite2-City.mmdb.gz"
  42. gzip -d /var/lib/GeoIP/GeoLite2-City.mmdb.gz
  43. # install vnstat gui
  44. cd /home/vps/public_html/
  45. wget https://raw.githubusercontent.com/daybreakersx/premscript/master/vnstat_php_frontend-1.5.1.tar.gz
  46. tar xf vnstat_php_frontend-1.5.1.tar.gz
  47. rm vnstat_php_frontend-1.5.1.tar.gz
  48. mv vnstat_php_frontend-1.5.1 vnstat
  49. cd vnstat
  50. sed -i "s/\$iface_list = array('eth0', 'sixxs');/\$iface_list = array('eth0');/g" config.php
  51. sed -i "s/\$language = 'nl';/\$language = 'en';/g" config.php
  52. sed -i 's/Internal/Internet/g' config.php
  53. sed -i '/SixXS IPv6/d' config.php
  54. cd
  55. # install mrtg
  56. wget -O /etc/snmp/snmpd.conf "https://raw.githubusercontent.com/daybreakersx/premscript/master/snmpd.conf"
  57. wget -O /root/mrtg-mem.sh "https://raw.githubusercontent.com/daybreakersx/premscript/master/mrtg-mem.sh"
  58. chmod +x /root/mrtg-mem.sh
  59. cd /etc/snmp/
  60. sed -i 's/TRAPDRUN=no/TRAPDRUN=yes/g' /etc/default/snmpd
  61. service snmpd restart
  62. snmpwalk -v 1 -c public localhost 1.3.6.1.4.1.2021.10.1.3.1
  63. mkdir -p /home/vps/public_html/mrtg
  64. cfgmaker --zero-speed 100000000 --global 'WorkDir: /home/vps/public_html/mrtg' --output /etc/mrtg.cfg public@localhost
  65. curl "https://raw.githubusercontent.com/daybreakersx/premscript/master/mrtg.conf" >> /etc/mrtg.cfg
  66. sed -i 's/WorkDir: \/var\/www\/mrtg/# WorkDir: \/var\/www\/mrtg/g' /etc/mrtg.cfg
  67. sed -i 's/# Options\[_\]: growright, bits/Options\[_\]: growright/g' /etc/mrtg.cfg
  68. indexmaker --output=/home/vps/public_html/mrtg/index.html /etc/mrtg.cfg
  69. if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi
  70. if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi
  71. if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi
  72. cd
  73. # Install OpenVPN dan Easy-RSA
  74. apt install -y openvpn easy-rsa openssl apache2 ufw
  75. apt install -y iptables iptables-persistent
  76. -
  77. # install openvpn
  78. # wget -O /etc/openvpn/vpn.zip "https://github.com/raw/main/vpn.zip"
  79. # cd /etc/openvpn/
  80. # unzip vpn.zip
  81. # rm -f vpn.zip
  82. cd
  83. # Buat config server TCP 1194
  84. cd /etc/openvpn
  85. cat > /etc/openvpn/server-tcp-1194.conf <<-END
  86. port 1194
  87. proto tcp
  88. dev tun
  89. ca /etc/openvpn/ca.crt
  90. cert /etc/openvpn/server.crt
  91. key /etc/openvpn/server.key
  92. dh /etc/openvpn/dh2048.pem
  93. plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
  94. verify-client-cert none
  95. username-as-common-name
  96. server 10.6.0.0 255.255.255.0
  97. ifconfig-pool-persist ipp.txt
  98. push "redirect-gateway def1 bypass-dhcp"
  99. push "dhcp-option DNS 8.8.8.8"
  100. push "dhcp-option DNS 8.8.4.4"
  101. keepalive 5 30
  102. comp-lzo
  103. persist-key
  104. persist-tun
  105. status server-tcp-1194.log
  106. verb 3
  107. END
  108. # Buat config server TCP 1197
  109. cd /etc/openvpn
  110. cat > /etc/openvpn/server-tcp-1197.conf <<-END
  111. port 1197
  112. proto tcp
  113. dev tun
  114. ca /etc/openvpn/ca.crt
  115. cert /etc/openvpn/server.crt
  116. key /etc/openvpn/server.key
  117. dh /etc/openvpn/dh2048.pem
  118. plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
  119. verify-client-cert none
  120. username-as-common-name
  121. server 10.6.0.0 255.255.255.0
  122. ifconfig-pool-persist ipp.txt
  123. push "redirect-gateway def1 bypass-dhcp"
  124. push "dhcp-option DNS 8.8.8.8"
  125. push "dhcp-option DNS 8.8.4.4"
  126. push "route-method exe"
  127. push "route-delay 2"
  128. keepalive 10 120
  129. comp-lzo
  130. user nobody
  131. group nogroup
  132. persist-key
  133. persist-tun
  134. status server-tcp-1197.log
  135. verb 3
  136. END
  137. # Buat config server UDP 2200
  138. cat > /etc/openvpn/server-udp-2200.conf <<-END
  139. port 2200
  140. proto udp
  141. dev tun
  142. ca /etc/openvpn/ca.crt
  143. cert /etc/openvpn/server.crt
  144. key /etc/openvpn/server.key
  145. dh /etc/openvpn/dh2048.pem
  146. plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
  147. verify-client-cert none
  148. username-as-common-name
  149. server 10.7.0.0 255.255.255.0
  150. ifconfig-pool-persist ipp.txt
  151. push "redirect-gateway def1 bypass-dhcp"
  152. push "dhcp-option DNS 8.8.8.8"
  153. push "dhcp-option DNS 8.8.4.4"
  154. push "route-method exe"
  155. push "route-delay 2"
  156. keepalive 10 120
  157. comp-lzo
  158. user nobody
  159. group nogroup
  160. persist-key
  161. persist-tun
  162. status server-udp-2200.log
  163. verb 3
  164. END
  165. cd
  166. mkdir -p /usr/lib/openvpn/
  167. cp /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so /usr/lib/openvpn/openvpn-plugin-auth-pam.so
  168. # nano /etc/default/openvpn
  169. sed -i 's/#AUTOSTART="all"/AUTOSTART="all"/g' /etc/default/openvpn
  170. # Cari pada baris #AUTOSTART=”all” hilangkan tanda pagar # didepannya sehingga menjadi AUTOSTART=”all”. Save dan keluar dari editor
  171. # restart openvpn dan cek status openvpn
  172. /etc/init.d/openvpn restart
  173. /etc/init.d/openvpn status
  174. # aktifkan ip4 forwarding
  175. echo 1 > /proc/sys/net/ipv4/ip_forward
  176. sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
  177. # edit file sysctl.conf
  178. # nano /etc/sysctl.conf
  179. # Uncomment hilangkan tanda pagar pada #net.ipv4.ip_forward=1
  180. # Konfigurasi dan Setting untuk Client
  181. mkdir clientconfig
  182. cp /etc/openvpn/{server.crt,server.key,ca.crt,ta.key} clientconfig/
  183. cd clientconfig
  184. # Buat config client TCP 1197
  185. cd /etc/openvpn
  186. cat > /etc/openvpn/client-tcp-1197.ovpn <<-END
  187. ############## WELCOME TO OnePieceVPN###############
  188. ### 🔰 COPYRIGHT © 2021 OnePieceVPN, Inc 🔰 ######
  189. ####### DONT FORGET TO SUPPORT US #######
  190. client
  191. dev tun
  192. proto tcp
  193. setenv FRIENDLY_NAME "OnePieceVPN Inc"
  194. remote xxxxxxxxx 1197
  195. remote-cert-tls server
  196. connect-retry infinite
  197. resolv-retry infinite
  198. nobind
  199. persist-key
  200. persist-tun
  201. auth-user-pass
  202. auth none
  203. auth-nocache
  204. cipher none
  205. comp-lzo
  206. redirect-gateway def1
  207. setenv CLIENT_CERT 0
  208. reneg-sec 0
  209. verb 3
  210. http-proxy $MYIP 8080
  211. http-proxy-option VERSION 1.1
  212. http-proxy-option AGENT Chrome/80.0.3987.87
  213. http-proxy-option CUSTOM-HEADER Host bug.com
  214. http-proxy-option CUSTOM-HEADER X-Forward-Host bug.com
  215. http-proxy-option CUSTOM-HEADER X-Forwarded-For bug.com
  216. http-proxy-option CUSTOM-HEADER Referrer bug.com
  217. dhcp-option DNS 8.8.8.8
  218. dhcp-option DNS 8.8.4.4
  219. END
  220. sed -i $MYIP2 /etc/openvpn/client-tcp-1194.ovpn;
  221. # Buat config client UDP 1194
  222. cd /etc/openvpn
  223. cat > /etc/openvpn/client-udp-1194.ovpn <<-END
  224. ############## WELCOME TO ###############
  225. ########## syapik96 ###########
  226. ####### DONT FORGET TO SUPPORT US #######
  227. client
  228. dev tun
  229. proto udp
  230. remote xxxxxxxxx 1194
  231. rremote-cert-tls server
  232. connect-retry infinite
  233. resolv-retry infinite
  234. nobind
  235. persist-key
  236. persist-tun
  237. auth-user-pass
  238. auth none
  239. auth-nocache
  240. cipher none
  241. comp-lzo
  242. redirect-gateway def1
  243. setenv CLIENT_CERT 0
  244. reneg-sec 0
  245. verb 3
  246. http-proxy $MYIP 8080
  247. http-proxy-option VERSION 1.1
  248. http-proxy-option AGENT Chrome/80.0.3987.87
  249. http-proxy-option CUSTOM-HEADER Host bug.com
  250. http-proxy-option CUSTOM-HEADER X-Forward-Host bug.com
  251. http-proxy-option CUSTOM-HEADER X-Forwarded-For bug.com
  252. http-proxy-option CUSTOM-HEADER Referrer bug.com
  253. END
  254. sed -i $MYIP2 /etc/openvpn/client-udp-1194.ovpn;
  255. # Buat config client TCP 1194
  256. cat > /etc/openvpn/client-tcp-1194.ovpn <<-END
  257. ############## WELCOME TO OnePieceVPN ###############
  258. ### 🔰 COPYRIGHT © 2021 OnePieceVPN, Inc 🔰 ######
  259. ####### DONT FORGET TO SUPPORT US #######
  260. client
  261. dev tun
  262. proto tcp
  263. remote xxxxxxxxx 1194
  264. rremote-cert-tls server
  265. connect-retry infinite
  266. resolv-retry infinite
  267. nobind
  268. persist-key
  269. persist-tun
  270. auth-user-pass
  271. auth none
  272. auth-nocache
  273. cipher none
  274. comp-lzo
  275. redirect-gateway def1
  276. setenv CLIENT_CERT 0
  277. reneg-sec 0
  278. verb 3
  279. http-proxy $MYIP 8080
  280. http-proxy-option VERSION 1.1
  281. http-proxy-option AGENT Chrome/80.0.3987.87
  282. http-proxy-option CUSTOM-HEADER Host bug.com
  283. http-proxy-option CUSTOM-HEADER X-Forward-Host bug.com
  284. http-proxy-option CUSTOM-HEADER X-Forwarded-For bug.com
  285. http-proxy-option CUSTOM-HEADER Referrer bug.com
  286. END
  287. sed -i $MYIP2 /etc/openvpn/client-tcp-1194.ovpn;
  288. # Buat config client UDP 2200
  289. cat > /etc/openvpn/client-udp-2200.ovpn <<-END
  290. ############## WELCOME TO OnePieceVPN ###############
  291. ### 🔰 COPYRIGHT © 2021 OnePieceVPN, Inc 🔰 ######
  292. ####### DONT FORGET TO SUPPORT US #######
  293. client
  294. dev tun
  295. proto udp
  296. remote xxxxxxxxx 2200
  297. resolv-retry infinite
  298. route-method exe
  299. nobind
  300. persist-key
  301. persist-tun
  302. auth-user-pass
  303. comp-lzo
  304. verb 3
  305. END
  306. sed -i $MYIP2 /etc/openvpn/client-udp-2200.ovpn;
  307. # Buat config client TCP 2200
  308. cat > /etc/openvpn/client-tcp-2200.ovpn <<-END
  309. ############## WELCOME TO OnePieceVPN ###############
  310. ### 🔰 COPYRIGHT © 2021 OnePieceVPN, Inc 🔰 ######
  311. ####### DONT FORGET TO SUPPORT US #######
  312. client
  313. dev tun
  314. proto tcp
  315. remote xxxxxxxxx 2200
  316. resolv-retry infinite
  317. route-method exe
  318. nobind
  319. persist-key
  320. persist-tun
  321. auth-user-pass
  322. comp-lzo
  323. verb 3
  324. END
  325. sed -i $MYIP2 /etc/openvpn/client-tcp-2200.ovpn;
  326. # Buat config client SSL
  327. cat > /etc/openvpn/client-tcp-ssl.ovpn <<-END
  328. ############## WELCOME TO OnePieceVPN ###############
  329. ### 🔰 COPYRIGHT © 2021 OnePieceVPN, Inc 🔰 ######
  330. ####### DONT FORGET TO SUPPORT US #######
  331. client
  332. dev tun
  333. proto tcp
  334. remote xxxxxxxxx 442
  335. resolv-retry infinite
  336. route-method exe
  337. nobind
  338. persist-key
  339. persist-tun
  340. auth-user-pass
  341. comp-lzo
  342. verb 3
  343. [openvpn]
  344. accept = 127.0.0.1:1194
  345. connect = $MYIP:443
  346. TIMEOUTclose = 0
  347. verify = 0
  348. sni = m.facebook.com
  349. END
  350. sed -i $MYIP2 /etc/openvpn/client-tcp-ssl.ovpn;
  351. cd
  352. # pada tulisan xxx ganti dengan alamat ip address VPS anda
  353. /etc/init.d/openvpn restart
  354. #1197
  355. # masukkan certificatenya ke dalam config client TCP 1197
  356. echo '<ca>' >> /etc/openvpn/client-tcp-1197.ovpn
  357. cat /etc/openvpn/ca.crt >> /etc/openvpn/client-tcp-1197.ovpn
  358. echo '</ca>' >> /etc/openvpn/client-tcp-1197.ovpn
  359. # Copy config OpenVPN client ke home directory root agar mudah didownload ( TCP 1197 )
  360. cp /etc/openvpn/client-tcp-1197.ovpn /home/vps/public_html/client-tcp-1197.ovpn
  361. #1194
  362. # masukkan certificatenya ke dalam config client TCP 1194
  363. echo '<ca>' >> /etc/openvpn/client-tcp-1194.ovpn
  364. cat /etc/openvpn/ca.crt >> /etc/openvpn/client-tcp-1194.ovpn
  365. echo '</ca>' >> /etc/openvpn/client-tcp-1194.ovpn
  366. # Copy config OpenVPN client ke home directory root agar mudah didownload ( TCP 1194 )
  367. cp /etc/openvpn/client-tcp-1194.ovpn /home/vps/public_html/client-tcp-1194.ovpn
  368. #2200
  369. # masukkan certificatenya ke dalam config client UDP 2200
  370. echo '<ca>' >> /etc/openvpn/client-udp-2200.ovpn
  371. cat /etc/openvpn/ca.crt >> /etc/openvpn/client-udp-2200.ovpn
  372. echo '</ca>' >> /etc/openvpn/client-udp-2200.ovpn
  373. # Copy config OpenVPN client ke home directory root agar mudah didownload ( UDP 2200 )
  374. cp /etc/openvpn/client-udp-2200.ovpn /home/vps/public_html/client-udp-2200.ovpn
  375. # masukkan certificatenya ke dalam config client SSL
  376. echo '<ca>' >> /etc/openvpn/client-tcp-ssl.ovpn
  377. cat /etc/openvpn/ca.crt >> /etc/openvpn/client-tcp-ssl.ovpn
  378. echo '</ca>' >> /etc/openvpn/client-tcp-ssl.ovpn
  379. # Copy config OpenVPN client ke home directory root agar mudah didownload ( SSL )
  380. cp /etc/openvpn/client-tcp-ssl.ovpn /home/vps/public_html/client-tcp-ssl.ovpn
  381. #firewall untuk memperbolehkan akses UDP dan akses jalur TCP
  382. iptables -t nat -I POSTROUTING -s 10.6.0.0/24 -o $ANU -j MASQUERADE
  383. iptables -t nat -I POSTROUTING -s 10.7.0.0/24 -o $ANU -j MASQUERADE
  384. iptables-save > /etc/iptables.up.rules
  385. chmod +x /etc/iptables.up.rules
  386. iptables-restore -t < /etc/iptables.up.rules
  387. # enable port for client connect server via config
  388. iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
  389. iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 1194 -j ACCEPT
  390. iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 1197 -j ACCEPT
  391. iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 2200 -j ACCEPT
  392. iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
  393. iptables -I INPUT 6 -m state --state NEW -m udp -p udp --dport 443 -j ACCEPT
  394. iptables -I INPUT 6 -m state --state NEW -m udp -p udp --dport 1194 -j ACCEPT
  395. iptables -I INPUT 6 -m state --state NEW -m udp -p udp --dport 1197 -j ACCEPT
  396. iptables -I INPUT 6 -m state --state NEW -m udp -p udp --dport 8080 -j ACCEPT
  397. iptables -I INPUT 6 -m state --state NEW -m udp -p udp --dport 2200 -j ACCEPT
  398. iptables-save > /etc/iptables.up.rules
  399. iptables-restore -t < /etc/iptables.up.rules
  400. netfilter-persistent save
  401. netfilter-persistent reload
  402. # add dns server ipv4
  403. echo "nameserver 8.8.8.8" > /etc/resolv.conf
  404. echo "nameserver 8.8.4.4" >> /etc/resolv.conf
  405. sed -i '$ i\echo "nameserver 8.8.8.8" > /etc/resolv.conf' /etc/rc.local
  406. sed -i '$ i\echo "nameserver 8.8.4.4" >> /etc/resolv.conf' /etc/rc.local
  407. # Restart service openvpn
  408. systemctl enable openvpn
  409. systemctl start openvpn
  410. /etc/init.d/openvpn restart
  411. # Restore iptables
  412. cat > /etc/network/if-up.d/iptables <<-END
  413. iptables-restore < /etc/iptables.up.rules
  414. iptables -t nat -A POSTROUTING -s 10.6.0.0/24 -o $ANU -j SNAT --to xxxxxxxxx
  415. iptables -t nat -A POSTROUTING -s 10.7.0.0/24 -o $ANU -j SNAT --to xxxxxxxxx
  416. END
  417. sed -i $MYIP2 /etc/network/if-up.d/iptables
  418. chmod +x /etc/network/if-up.d/iptables
  419. # restart opevpn
  420. /etc/init.d/openvpn restart
  421. # finishing
  422. cd
  423. chown -R www-data:www-data /home/vps/public_html
  424. /etc/init.d/nginx restart
  425. /etc/init.d/openvpn restart
  426. /etc/init.d/cron restart
  427. /etc/init.d/ssh restart
  428. /etc/init.d/dropbear restart
  429. /etc/init.d/fail2ban restart
  430. /etc/init.d/stunnel4 restart
  431. service php7.3-fpm restart
  432. service uwsgi restart
  433. systemctl daemon-reload
  434. service squid restart
  435. service pptpd restart
  436. /etc/init.d/webmin restart
  437. # clearing history
  438. rm -rf ~/.bash_history && history -c
  439. echo "unset HISTFILE" >> /etc/profile
  440. # remove unnecessary files
  441. apt -y autoremove
  442. apt -y autoclean
  443. apt -y clean
  444. # Delete script
  445. history -c
  446. rm -f /root/vpn.sh