🔒 Closed [aᴜᴛᴏsᴄʀɪᴘᴛ] ᴠᴘs & ᴏᴄs ᴘᴀɴᴇʟ ɪɴ ᴏɴᴇ! ᴛᴜᴛᴏʀɪᴀʟ ʙʏ cʟʀᴋᴢ

Status
Not open for further replies.

Attachments

  • Screenshot_20180416-224056.webp
    Screenshot_20180416-224056.webp
    35.4 KB · Views: 11
  • Screenshot_20180416-224103.webp
    Screenshot_20180416-224103.webp
    20.6 KB · Views: 10
vps prep.sh

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Set User information
export _USER="rami"
export _NAME="Rami AlGhanmi"
# Update packages and install required packages
apt-get update
apt-get upgrade --yes
apt-get install --yes sudo apt-transport-https dirmngr python python-simplejson
# Create user if it does not exist
if id "$_USER" >/dev/null 2>&1; then
echo ""
else
adduser --disabled-password --gecos "$_NAME,,," $_USER
#Set user password
echo -n "Enter User Password: "
read -s _PASS
echo "$_USER:$_PASS" | chpasswd
unset _PASS
fi
echo -e "$_USER\tALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers.d/10-admin
chmod 440 /etc/sudoers.d/10-admin
# Cleanup Variables
unset _USER
unset _NAME
echo ""
 
Click mo yung 3 lines sa upper left tas pindutin mo yung katabi nung bookmark ts add storage tas sftp :)

Salamat paps..bukas naman nasakit na ulo ko dito haha..

Di ko na alam sunod na gagawin jan..sana may magturo saken..hehe
 

Attachments

  • Screenshot_2018-04-16-22-27-32.webp
    Screenshot_2018-04-16-22-27-32.webp
    33 KB · Views: 8
  • Screenshot_2018-04-16-20-34-57.webp
    Screenshot_2018-04-16-20-34-57.webp
    28.1 KB · Views: 11
vps prep.sh

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Set User information
export _USER="rami"
export _NAME="Rami AlGhanmi"
# Update packages and install required packages
apt-get update
apt-get upgrade --yes
apt-get install --yes sudo apt-transport-https dirmngr python python-simplejson
# Create user if it does not exist
if id "$_USER" >/dev/null 2>&1; then
echo ""
else
adduser --disabled-password --gecos "$_NAME,,," $_USER
#Set user password
echo -n "Enter User Password: "
read -s _PASS
echo "$_USER:$_PASS" | chpasswd
unset _PASS
fi
echo -e "$_USER\tALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers.d/10-admin
chmod 440 /etc/sudoers.d/10-admin
# Cleanup Variables
unset _USER
unset _NAME
echo ""
may command ka pang allow nang multi log in paps?
 
haist kanina pa yang tanong mo ah haha pwede nga basta naupdate mo na ang webmin package at parser pero kung hindi mo naupdate baliwala din yang server na iaadd mo kasi di magwowork

Sir san ppunta pag iuupdate yan?..bbuksan ko webmin ko? Nakita ko na yung updates pero yung xml::parser di ko makita dun
 
open nginx.conf and replace the SSL section with this:

# Nginx Protection
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
ssl_ecdh_curve secp384r1;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";

Para more secure si nginx tas

Eto na hinihintay niyo latest php packages install

#PHP7

apt-get -y -f install php7.1 php7.1-bcmath php7.1-bz2 php7.1-cli php7.1-common php7.1-curl php7.1-fpm php7.1-gd php7.1-intl php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-opcache php7.1-pspell php7.1-soap php7.1-tidy php7.1-xml php7.1-xmlrpc php7.1-xsl php7.1-zip

Tas para more secure si php

Eto script disable natin si fix_pathinfo

sudo sed -i s/\;cgi\.fix_pathinfo\s*\=\s*1/cgi.fix_pathinfo\=0/ /etc/php/7.1/fpm/php.ini

Then

systemctl restart php7.1-fpm

Then

# PHPMyAdmin

apt-get -y -f update

apt-get -y -f install phpmyadmin

 
Status
Not open for further replies.

About this Thread

  • 6K
    Replies
  • 215K
    Views
  • 685
    Participants
Last reply from:
1achy

Trending Topics

Online now

Members online
1,297
Guests online
1,154
Total visitors
2,451

Forum statistics

Threads
2,271,805
Posts
28,938,170
Members
1,237,855
Latest member
jhunzzz
Back
Top