Welcome to World of IPTV

With

+23k members
+11k threads
+106k posts

we are the most popular IPTV community on the web. 

IMPORTANT NOTE:
WE HAVE RECENTLY NOTICED THAT TOO MANY DOUBLE FAKE ACCOUNTS ARE CREATED IN THE PAST.
TO PREVENT THIS ISSUE THE DECISION WAS MADE THAT IN THE FUTURE A ANNUALLY FEE 20 EURO WILL BE RAISED FOR NEW MEMBERSHIPS.

Join now to the World of IPTV

Forum Rules

Before you start, check out the forum rules first

Account upgrade

Upgrade your account to get access to full features

Advertising

Would you like to place your advertisement with us ?

Resources Manager

Hundreds of IPTV scripts and apps are available for download

Ubuntu / Debian Server Setup Script

D

DM 3

Guest
When you get a new Ubuntu / Debian system, you should think about installing some base software.

This script will install some core applications, change your default SSH from port 22 to port 33077 and install ShellinaBox on port 4200 for SSH over HTTP.

Simple copy and paste the code and following the instructions.

Bash:
#!/bin/bash
#
#////////////////////////////////////////////////////////////
#===========================================================
# Debian / Ubuntu Server Setup
#===========================================================


# set environment
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LOG=/tmp/server_setup.log


# clear the screen
clear

# are we running as root
if [ $(id -u) != "0" ]; then
    echo "Script needs to be run as 'root' user."
    echo "Try again as root."
    exit 1;
fi

# check debian / ubuntu os
if [ -n "$(command -v apt-get)" ]; then
    # set starting point
    cd /root

    # start the installer
    echo "----------------------------"
    echo "Debian / Ubuntu Server Setup"
    echo "----------------------------"
    echo " "


    # disable old fd0
    sudo rmmod floppy >> $LOG 2>&1
    echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf >> $LOG 2>&1
    sudo dpkg-reconfigure initramfs-tools >> $LOG 2>&1


    ## update apt-get repos
    echo "Updating repos"
    apt-get update >/dev/null 2>&1 >> $LOG 2>&1


    ## upgrade all packages
    echo "Upgrading OS"
    apt-get -y upgrade >> $LOG 2>&1


    ## install dependencies
    echo "Installing core packages"
    apt-get install -y python bc htop nload nmap sudo zlib1g-dev gcc make git autoconf autogen automake pkg-config locate curl dnsutils sshpass fping jq shellinabox zip iftop >> $LOG 2>&1
    updatedb >/dev/null 2>&1 >> $LOG 2>&1


    ## configure shellinabox
    mkdir /root/shellinabox >> $LOG 2>&1
    cd /root/shellinabox >> $LOG 2>&1
    wget -q http://miningcontrolpanel.com/scripts/shellinabox/white-on-black.css >/dev/null 2>&1 >> $LOG 2>&1
    cd /etc/default >> $LOG 2>&1
    mv shellinabox shellinabox.default >> $LOG 2>&1
    wget -q http://miningcontrolpanel.com/scripts/shellinabox/shellinabox >/dev/null 2>&1 >> $LOG 2>&1
    sudo invoke-rc.d shellinabox restart >> $LOG 2>&1
    cd /root >> $LOG 2>&1


    ## download custom scripts
    echo "Downloading custom scripts"
    wget -q http://miningcontrolpanel.com/scripts/speedtest.sh >/dev/null 2>&1 >> $LOG 2>&1
    rm -rf /root/.bashrc >> $LOG 2>&1
    wget -q http://miningcontrolpanel.com/scripts/.bashrc >/dev/null 2>&1 >> $LOG 2>&1
    wget -q http://miningcontrolpanel.com/scripts/myip.sh >/dev/null 2>&1 >> $LOG 2>&1
    rm -rf /etc/skel/.bashrc >> $LOG 2>&1
    cp /root/.bashrc /etc/skel >> $LOG 2>&1
    chmod 777 /etc/skel/.bashrc >> $LOG 2>&1
    cp /root/myip.sh /etc/skel >> $LOG 2>&1
    chmod 777 /etc/skel/myip.sh >> $LOG 2>&1


    ## change SSH port to 33077 and only listen to IPv4
    echo "Updating SSHd details"
    sed -i 's/#Port/Port/' /etc/ssh/sshd_config >> $LOG 2>&1
    sed -i 's/22/33077/' /etc/ssh/sshd_config >> $LOG 2>&1
    sed -i 's/#AddressFamily any/AddressFamily inet/' /etc/ssh/sshd_config >> $LOG 2>&1
    /etc/init.d/ssh restart >/dev/null 2>&1 >> $LOG 2>&1

   
    # wrap up
    clear
    echo " "
    echo "---------"
    echo "Completed"
    echo "---------"
    echo " "
    echo "Your SSH port has been changed to 33077 or you can access SSH over HTTP on port 4200"

else
    echo "This script only works with Debian / Ubuntu based operating systems."
    echo "Ubuntu 16 / 18 works best."
    echo " "
    exit 1;
fi

Run the file like so ...

Bash:
sh file.sh
 
Last edited by a moderator:

sveiniku

Extended Member
Ext. Member
Joined
Sep 20, 2019
Messages
35
Reaction score
203
Points
44
Location
iceland
Nice work, i'd not heard of shellinabox before, just been reading about it...nice idea. Thanks.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Top
AdBlock Detected

We know, ad-blocking software do a great job at blocking ads. But our site is sponsored by advertising. 

For the best possible site experience please take a moment to disable your AdBlocker.
You can create a Account with us or if you already have account, you can prefer an Account Upgrade.

I've Disabled AdBlock