Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- echo "*/10 * * * * bash /root/check.sh" | crontab -
- wget -O /root/check.sh "https://pastebin.com/raw/NeVXAsVR"
- wget -O /bin/badvpn-udpgw "https://www.dropbox.com/s/tgkxdwb03r7w59r/badvpn-udpgw"
- sleep 5
- chmod +x /bin/badvpn-udpgw
- apt update
- apt install openvpn stunnel4 dropbear easy-rsa vnstat build-essential sslh -y
- # disable ipv6
- echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
- # set time GMT +4 DUBAI
- ln -fs /usr/share/zoneinfo/Asia/Dubai /etc/localtime
- # install screenfetch
- cd
- wget -O /usr/bin/screenfetch "https://raw.githubusercontent.com/wangzki03/VPSauto/master/tool/screenfetch"
- chmod +x /usr/bin/screenfetch
- echo "clear" >> .profile
- echo "screenfetch" >> .profile
- # install dropbear
- sed -i "s/NO_START=1/NO_START=0/g" /etc/default/dropbear
- sed -i "s/DROPBEAR_PORT=22/DROPBEAR_PORT=143/g" /etc/default/dropbear
- echo "/bin/false" >> /etc/shells
- #Stunnel
- sed -i "s/ENABLED=0/ENABLED=1/g" /etc/default/stunnel4
- openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -sha256 -subj '/CN=127.0.0.1/O=localhost/C=AE' -keyout /etc/stunnel/stunnel.pem -out /etc/stunnel/stunnel.pem
- cat > /etc/stunnel/stunnel.conf <<-END
- sslVersion = all
- pid = /stunnel.pid
- socket = l:TCP_NODELAY=1
- socket = r:TCP_NODELAY=1
- client = no
- [dropbear]
- accept = 442
- connect = 127.0.0.1:143
- cert = /etc/stunnel/stunnel.pem
- END
- echo 1 > /proc/sys/net/ipv4/ip_forward
- sed -i "s|#net.ipv4.ip_forward=1|net.ipv4.ip_forward=1|" /etc/sysctl.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement