Jump to content

_.:=iTake=:._

Superior Administrator
  • Posts

    1,855
  • Joined

  • Last visited

  • Days Won

    333
  • Donations

    20.00 USD 

Everything posted by _.:=iTake=:._

  1. Algo VPN is a set of Ansible scripts that simplify the setup of a personal IPSEC and Wireguard VPN. It uses the most secure defaults available, works with common cloud providers, and does not require client software on most devices. See our release announcement for more information. Features Supports only IKEv2 with strong crypto (AES-GCM, SHA2, and P-256) and WireGuard Generates Apple profiles to auto-configure iOS and macOS devices Includes a helper script to add and remove users Blocks ads with a local DNS resolver (optional) Sets up limited SSH users for tunneling traffic (optional) Based on current versions of Ubuntu and strongSwan Installs to DigitalOcean, Amazon Lightsail, Amazon EC2, Vultr, Microsoft Azure, Google Compute Engine, Scaleway, OpenStack, or your own Ubuntu 18.04 LTS server Anti-features Does not support legacy cipher suites or protocols like L2TP, IKEv1, or RSA Does not install Tor, OpenVPN, or other risky servers Does not depend on the security of TLS Does not require client software on most platforms Does not claim to provide anonymity or censorship avoidance Does not claim to protect you from the FSB, MSS, DGSE, or FSM Deploy the Algo Server The easiest way to get an Algo server running is to let it set up a new virtual machine in the cloud for you. Setup an account on a cloud hosting provider. Algo supports DigitalOcean (most user friendly), Amazon Lightsail, Amazon EC2, Vultr, Microsoft Azure, Google Compute Engine, Scaleway, and DreamCompute or other OpenStack-based cloud hosting. Download Algo. Unzip it in a convenient location on your local machine. Install Algo's core dependencies. Open the Terminal. The python interpreter you use to deploy Algo must be python2. If you don't know what this means, you're probably fine. cd into the algo-master directory where you unzipped Algo, then run: macOS: $ python -m ensurepip --user $ python -m pip install --user --upgrade virtualenv Linux (deb-based): $ sudo apt-get update && sudo apt-get install \ build-essential \ libssl-dev \ libffi-dev \ python-dev \ python-pip \ python-setuptools \ python-virtualenv -y Linux (rpm-based): See the Pre-Install Documentation for RedHat/CentOS 6.x Windows: See the Windows documentation 4. Install Algo's remaining dependencies. Use the same Terminal window as the previous step and run: $ python -m virtualenv --python=`which python2` env && source env/bin/activate && python -m pip install -U pip virtualenv && python -m pip install -r requirements.txt On macOS, you may be prompted to install cc. You should press accept if so. 5. List the users to create. Open config.cfg in your favorite text editor. Specify the users you wish to create in the userslist. 6. Start the deployment. Return to your terminal. In the Algo directory, run ./algo and follow the instructions. There are several optional features available. None are required for a fully functional VPN server. These optional features are described in greater detail in deploy-from-ansible.md. That's it! You will get the message below when the server deployment process completes. You now have an Algo server on the internet. Take note of the p12 (user certificate) password in case you need it later, it will only be displayed this time. You can now setup clients to connect it, e.g. your iPhone or laptop. Proceed to Configure the VPN Clients below. "\"#----------------------------------------------------------------------#\"", "\"# Congratulations! #\"", "\"# Your Algo server is running. #\"", "\"# Config files and certificates are in the ./configs/ directory. #\"", "\"# Go to [Hidden Content] after connecting #\"", "\"# and ensure that all your traffic passes through the VPN. #\"", "\"# Local DNS resolver 172.16.0.1 #\"", "\"# The p12 and SSH keys password is XXXXXXXX #\"", "\"#----------------------------------------------------------------------#\"", Configure the VPN Clients Certificates and configuration files that users will need are placed in the configs directory. Make sure to secure these files since many contain private keys. All files are saved under a subdirectory named with the IP address of your new Algo VPN server. Apple Devices WireGuard is used to provide VPN services on Apple devices. Algo generates a WireGuard configuration file, wireguard/<username>.conf, and a QR code, wireguard/<username>.png, for each user defined in config.cfg. On iOS, install the WireGuard app from the iOS App Store. Then, use the WireGuard app to scan the QR code or AirDrop the configuration file to the device. On macOS Mojave or later, install the WireGuard app from the Mac App Store. WireGuard will appear in the menu bar once you run the app. Click on the WireGuard icon, choose Import tunnel(s) from file..., then select the appropriate WireGuard configuration file. Enable "Connect on Demand" by editing the tunnel configuration in the WireGuard app. Installing WireGuard is a little more complicated on older version of macOS. See Using macOS as a Client with WireGuard. If you prefer to use the built-in IPSEC VPN on Apple devices, then see Using Apple Devices as a Client with IPSEC. Android Devices WireGuard is used to provide VPN services on Android. Install the WireGuard VPN Client. Import the corresponding wireguard/<name>.conf file to your device, then setup a new connection with it. See the Android setup instructions for more detailed walkthrough. Windows 10 Copy your PowerShell script windows_{username}.ps1 to the Windows client and run the following command as Administrator to configure the VPN connection. powershell -ExecutionPolicy ByPass -File windows_{username}.ps1 -Add For a manual installation, see the Windows setup instructions. Linux Network Manager Clients (e.g., Ubuntu, Debian, or Fedora Desktop) Network Manager does not support AES-GCM. In order to support Linux Desktop clients, choose the "compatible" cryptography during the deploy process and use at least Network Manager 1.4.1. See Issue #263 for more information. Linux strongSwan Clients (e.g., OpenWRT, Ubuntu Server, etc.) Install strongSwan, then copy the included ipsec_user.conf, ipsec_user.secrets, user.crt (user certificate), and user.key (private key) files to your client device. These will require customization based on your exact use case. These files were originally generated with a point-to-point OpenWRT-based VPN in mind.
  2. We have fixed the issue, thanks for reporting...
  3. OpenVPN installer for Debian, Ubuntu, Fedora, CentOS and Arch Linux. This script will let you setup your own secure VPN server in just a few seconds. You can also check out how to setup WireGuard, a simple, safer, faster and more modern VPN protocol. Usage First, get the script and make it executable : curl -O [Hidden Content] chmod +x openvpn-install.sh Then run it : ./openvpn-install.sh You need to run the script as root and have the TUN module enabled. The first time you run it, you'll have to follow the assistant and answer a few questions to setup your VPN server. When OpenVPN is installed, you can run the script again, and you will get the choice to : Add a client Remove a client Uninstall OpenVPN In your home directory, you will have .ovpn files. These are the client configuration files. Download them from your server and connect using your favorite OpenVPN client. Features Installs and configures a ready-to-use OpenVPN server Iptables rules and forwarding managed in a seamless way If needed, the script can cleanly remove OpenVPN, including configuration and iptables rules Customisable encryption settings, enhanced default settings (see Security and Encryption below) OpenVPN 2.4 features, mainly encryption improvements (see Security and Encryption below) Variety of DNS resolvers to be pushed to the clients Choice to use a self-hosted resolver with Unbound (supports already existing Unbound installations) Choice between TCP and UDP NATed IPv6 support Compression disabled by default to prevent VORACLE. LZ4 and LZ0 algorithms available otherwise. Unprivileged mode: run as nobody/nogroup Block DNS leaks on Windows 10 Randomised server certificate name Choice to protect clients with a password (private key encryption) Many other little things! Source: [Hidden Content]
  4. Advanced UFW rules You can also add specific IP address to allow and deny access to all services. Run the following command to allow the IP 192.168.0.200 to access all services on the server: # ufw allow from 192.168.0.200 To deny the IP 192.168.0.200 to access all services on server: # ufw deny from 192.168.0.200 You can allow range of IP address in UFW. Run the following command to allow all the connections from IP 192.168.1.1 to 192.168.1.254: # ufw allow from 192.168.1.0/24 To allow IP address 192.168.1.200 access to port 80 using TCP, run the following linux command: # ufw allow from 192.168.1.200 to any port 80 proto tcp To allow access to tcp and udp port range from 2000 to 3000, run the following linux command: # ufw allow 2000:3000/tcp # ufw allow 2000:3000/udp If you want to block access to port 22 from IP 192.168.0.4 and 192.168.0.10 but allow all other IPs to access to port 22, run the following command: # ufw deny from 192.168.0.4 to any port 22 # ufw deny from 192.168.0.10 to any port 22 # ufw allow from 192.168.0.0/24 to any port 22 To allow HTTP traffic on network interface eth0, run the following linux command: # ufw allow in on eth0 to any port 80 By default UFW allows ping requests. if you want to deny ping request, you will need to edit /etc/ufw/before.rules file: # nano /etc/ufw/before.rules Remove the following lines: -A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT Save the file, when you are finished. If you ever need to Reset UFW, removing all of your rules, you can do so via the following linux command. # ufw reset Configure NAT with UFW If you want to NAT the connections from the external interface to the internal using UFW. Then you can do this by editing /etc/default/ufw and /etc/ufw/before.rules file. First, open /etc/default/ufw file using nano editor: # nano /etc/default/ufw Change the following line: DEFAULT_FORWARD_POLICY="ACCEPT" Next, you will also need to allow ipv4 forwarding. You can do this by editing /etc/ufw/sysctl.conf file: # nano /etc/ufw/sysctl.conf Change the following line: net/ipv4/ip_forward=1 Next, you will need to add NAT to ufw’s configuration file. You can do this by editing /etc/ufw/before.rules file: # nano /etc/ufw/before.rules Add the following lines just before the filter rules: # NAT table rules *nat :POSTROUTING ACCEPT [0:0] # Forward traffic through eth0 - Change to match you out-interface -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE # don't delete the 'COMMIT' line or these nat table rules won't # be processed COMMIT Save the file when you are finished. Then restart UFW with the following linux command: ufw disable ufw enable Configure Port Forwarding with UFW If you want to forward traffic from Public IP eg. 150.129.148.155 port 80 and 443 to another internal server with IP address 192.168.1.120. Then you can do this by editing /etc/default/before.rules: # nano /etc/default/before.rules Change the file as shown below:: PREROUTING ACCEPT [0:0] -A PREROUTING -i eth0 -d 150.129.148.155 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.120:80 -A PREROUTING -i eth0 -d 150.129.148.155 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.120:443 -A POSTROUTING -s 192.168.1.0/24 ! -d 192.168.1.0/24 -j MASQUERADE Next, restart UFW with the following command: # ufw disable # ufw enable Next, you will also need to allow port 80 and 443. You can do this by running the following command: # ufw allow proto tcp from any to 150.129.148.155 port 80 # ufw allow proto tcp from any to 150.129.148.155 port 443
  5. UFW also known as Uncomplicated Firewall is an interface to iptables and is particularly well-suited for host-based firewalls. UFW provide an easy to use interface for beginner user who is unfamiliar with firewall concepts. It is most popular firewall tool originating from Ubuntu. It supports both IPv4 and IPv6. In this tutorial, we will learn how to install and use UFW firewall on Linux. Requirements Any Linux based distribution installed on your system root privileges setup on your system Installing UFW Ubuntu By default, UFW is available in most Ubuntu based distributions. If it is deleted, you can install it by running the following linux command. # apt-get install ufw -y Debian You can install UFW in Debian by running the following linux command: # apt-get install ufw -y CentOS By default, UFW is not available in CentOS repository. So you will need to install the EPEL repository to your system. You can do this by running the following linux command: # yum install epel-release -y Once the EPEL repository is installed, you can install UFW by just running the following linux command: # yum install --enablerepo="epel" ufw -y After installing UFW, start UFW service and enable it to start on boot time by running the following linux command. # ufw enable Next, check the status of UFW with the following linux command. You should see the following output: # ufw status Status: active You can also disable UFW firewall by running the following linux command: # ufw disable Set UFW Default Policy By default, UFW default policy setup to block all incoming traffic and allow all outgoing traffic. You can setup your own default policy with the following linux command. ufw default allow outgoing ufw default deny incoming Add and Delete Firewall Rules You can add rules for allowing incoming and outgoing traffic in two ways, using the port number or using the service name. For example, if you want to allow both incoming and outgoing connections of HTTP service. Then run the following linux command using the service name. ufw allow http Or, run the following command using the port number: ufw allow 80 If you want to filter packets based on TCP or UDP, then run the following command: ufw allow 80/tcp ufw allow 21/udp You can check the status of added rules with the following linux command.ufw status verbose You should see the following output: Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), deny (routed) New profiles: skip To Action From -- ------ ---- 80/tcp ALLOW IN Anywhere 21/udp ALLOW IN Anywhere 80/tcp (v6) ALLOW IN Anywhere (v6) 21/udp (v6) ALLOW IN Anywhere (v6) You can also deny any incoming and outgoing traffic any time with the following commands: # ufw deny 80 # ufw deny 21 If you want to delete allowed rules for HTTP, simply prefix the original rule with delete as shown below: # ufw delete allow http # ufw delete deny 21
  6. In this tutorial we can check how to Configure and Install Varnish on CentOS/Ubuntu server. Varnish is the most powerful open source HTTP engine/reverse HTTP proxy that has the capability to increase the site speed, especially when there is high traffic on the site. Varnish Cache visits your page only once for caching the page and all the future request for that page will be served by varnish cache Install varnish Before installing varnish, we need to add varnish repositories to the server. For Ubuntu Users [iCODE]# curl [Hidden Content] | sudo apt-key add – # apt-get update # apt-get install varnish[/iCODE] For CentOS Users [iCODE]# yum install -y epel-release # yum update # yum install -y varnish[/iCODE] Configuring Varnish on both Ubuntu and CentOS After installation, we need to configure varnish to reduce the load on the server. For Ubuntu Users Search and uncomment the lines under “DAEMON_OPTS” on the varnish configuration file /etc/default/varnish and edit the lines similar to the following. [iCODE]# vi /etc/default/varnish DAEMON_OPTS=”-a :80 \ -T localhost:6082 \ -f /etc/varnish/default.vcl \ -S /etc/varnish/secret \ -s malloc,256m”[/iCODE] After saving this file open varnish default file which tells varnish to look for server content. Edit this file to tell varnish to look for the content on port 8080. The code will be similar to the below example. [iCODE]# vi /etc/varnish/default.vcl backend default { .host = “127.0.0.1”; .port = “8080”; }[/iCODE] For CentOS users. Edit varnish configuration file to change the varnish port. [iCODE]# vi /etc/varnish/varnish.params VARNISH_LISTEN_PORT=80[/iCODE] Save the file and open the default file of varnish to look the content on port 8080. The code should be similar to the following example. [iCODE]# vi /etc/varnish/default.vcl backend default { .host = “127.0.0.1”; .port = “8080”; }[/iCODE] Configure apache to work with varnish By default, apache is listening to port 80. We have to change the port for apache to 8080 to run it behind varnish. For Ubuntu Users. Edit the port.conf file to change apache port to 8080. The file should be similar to the example below. [iCODE]# vi /etc/apache2/ports.conf NameVirtualHost 127.0.0.1:8080 Listen 127.0.0.1:8080[/iCODE] Also, edit the apache configuration file to change the port. [iCODE]# vi /etc/apache2/sites-available/default <VirtualHost 127.0.0.1:8080>[/iCODE] Save this file and restart both services to enable the changes. [iCODE]# service apache2 restart # service varnish restart[/iCODE] For CentOS users Edit apache configuration file to change the port to 8080. [iCODE]# vi /etc/httpd/conf/httpd.conf Listen 8080[/iCODE] Restart both services to reflect the changes. [iCODE]# systemctl restart varnish # systemctl restart httpd[/iCODE] After the installation, you can verify whether the vanish is working or not by using the following command. [iCODE]# curl -I [Hidden Content]] Then the output should be something similar to the following: [iCODE]HTTP/1.1 200 OK Date: Wed, 04 Nov 2015 10:21:07 GMT Server: Apache/2.4.6 (CentOS) Last-Modified: Fri, 02 Oct 2015 10:36:53 GMT ETag: “6c-5211cdbf61c14” Content-Length: 108 Content-Type: text/html; charset=UTF-8 X-Varnish: 32770 Age: 0 Via: 1.1 varnish-v4 Connection: keep-aliveHTTP/1.1 200 OK Date: Wed, 04 Nov 2015 10:21:07 GMT Server: Apache/2.4.6 (CentOS) Last-Modified: Fri, 02 Oct 2015 10:36:53 GMT ETag: “6c-5211cdbf61c14” Content-Length: 108 Content-Type: text/html; charset=UTF-8 X-Varnish: 32770 Age: 0 Via: 1.1 varnish-v4 Connection: keep-alive [/iCODE][/indent]
  7. To install Let’s Encrypt SSL Certificate on CentOS 6/7, please follow the steps below. 1) Make sure that Apache Web Server is already installed in your server. If not, the use the command below to install it. [iCODE]$ yum install httpd[/iCODE] 2) Install the SSL/TLS module. [iCODE]$ yum -y install mod_ssl[/iCODE] 3) Start the apache server by using the following command. [iCODE]$ service httpd start [On RHEL/CentOS 6] $ systemctl start httpd.service [On RHEL/CentOS 7][/iCODE] 4) To install Let’s Encrypt Client, the simplest method is to clone github repository in your filesystem. To install git on your system you must enable Epel repositories first. Use below command for this. [iCODE]$ yum install epel-release[/iCODE] 5) After Epel repos are added in your system, then install the git client using the command below. [iCODE]$ yum install git[/iCODE] 6) Now you have installed all the required dependencies. Next go to /usr/local/ directory and start pulling the Let’s Encrypt client form its official github repository by using the following command [iCODE]$ cd /usr/local/ $ git clone [Hidden Content]] 7) To obtain the SSL Certificate, we need to run Let’s Encrypt script command. For this go to Let’s Encrypt installation directory from /usr/local/letsencrypt and run the letsencrypt-auto command by providing –apache option and the -d flag for every subdomain that needs a certificate. [iCODE]$ cd /usr/local/letsencrypt $ ./letsencrypt-auto –apache -d your_domain.tld[/iCODE] 8) After completing the process, a new window will be displayed and here you can provide an email address that will be used by Let’s Encrypt to recover your lost key or for urgent notices. 9) The next winnow will display the terms of service of the license. Select agree and please hit the Enter key. 10) On the next window Let’s Encrypt will prompt you to select a virtual host. It will not find any virtual host available, so select the ssl.conf file to be automatically modified by Let’s Encrypt client and press Enter to continue. 11) Next, you will see two methods, one is the easy method and the other is the secure method. Choose the easy method for HTTP requests and hit the Enter key to move forward. 12) After completing all these processes, a congratulation message will be displayed on the screen. Press the Enter key to release the prompt. Now you have successfully issued a SSL/TLS certificate for your domain. Now you can start browsing your website using HTTPS protocol. 13) You can test the SSL/TLS certificate of your domain by visiting the bellow link. [iCODE][Hidden Content]]
  8. Step Four — Configure Nginx to Process PHP Pages Now, we have all of the required components installed. The only configuration change we still need to do is tell Nginx to use our PHP processor for dynamic content. We do this on the server block level (server blocks are similar to Apache's virtual hosts). Open the default Nginx server block configuration file by typing: [iCODE]sudo vi /etc/nginx/conf.d/default.conf[/iCODE] Currently, with the comments removed, the Nginx default server block looks like this: [iCODE]/etc/nginx/conf.d/default.conf — original server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }[/iCODE] We need to make some changes to this file for our site. First, we need to add an index.php option as the first value of our index directive to allow PHP index files to be served when a directory is requested We also need to modify the server_name directive to point to our server's domain name or public IP address The actual configuration file includes some commented out lines that define error processing routines. We will uncomment those to include that functionality For the actual PHP processing, we will need to uncomment a portion of another section. We will also need to add a try_files directive to make sure Nginx doesn't pass bad requests to our PHP processor The changes that you need to make are in red in the text below. If you prefer, you may just copy and paste everything, then replace the value of server_name with the appropriate domain name or IP address: [iCODE]/etc/nginx/conf.d/default.conf — updated server { listen 80; server_name server_domain_name_or_IP; # note that these lines are originally from the "location /" block root /usr/share/nginx/html; index index.php index.html index.htm; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }[/iCODE] When you've made the above changes, you can save and close the file. Restart Nginx to make the necessary changes: [iCODE]sudo systemctl restart nginx[/iCODE] Step Five — Test PHP Processing on your Web Server In order to test that our system is configured properly for PHP, we can create a very basic PHP script. We will call this script info.php. In order for Apache to find the file and serve it correctly, it must be saved to a very specific directory, which is called the "web root". In CentOS 7, this directory is located at /usr/share/nginx/html/. We can create the file at that location by typing: [iCODE]sudo vi /usr/share/nginx/html/info.php[/iCODE] This will open a blank file. We want to put the following text, which is valid PHP code, inside the file: [iCODE]Test PHP Script <?php phpinfo(); ?>[/iCODE] When you are finished, save and close the file. Now we can test whether our web server can correctly display content generated by a PHP script. To try this out, we just have to visit this page in our web browser. You'll need your server's public IP address again. The address you want to visit will be: Open in a web browser: [iCODE][Hidden Content]] The page that you come to should look something like this: This page basically gives you information about your server from the perspective of PHP. It is useful for debugging and to ensure that your settings are being applied correctly. If this was successful, then your PHP is working as expected. You probably want to remove this file after this test because it could actually give information about your server to unauthorized users. To do this, you can type this: [iCODE]sudo rm /usr/share/nginx/html/info.php[/iCODE] You can always recreate this page if you need to access the information again later. Conclusion Now that you have a LEMP stack installed, you have many choices for what to do next. Basically, you've installed a platform that will allow you to install most kinds of websites and web software on your server.
  9. Introduction A LEMP software stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the ENginx web server (which replaces the Apache component of a LAMP stack). The site data is stored in a MySQL database (using MariaDB), and dynamic content is processed by PHP. In this guide, we'll get a LEMP stack installed on an CentOS 7 VPS. CentOS will fulfill our first requirement: a Linux operating system. Prerequisites Before you begin with this guide, you should have a separate, non-root user account set up on your server. You can learn how to do this by completing steps 1-4 in the initial server setup for CentOS 7. Note about SELinux: If you run into issues with Nginx not running, make sure the SELinux context of your Nginx configuration files is correct or change the SELinux mode to permissive or disabled. Step One — Install Nginx In order to display web pages to our site visitors, we are going to employ Nginx, a modern, efficient web server. To add the CentOS 7 EPEL repository, open terminal and use the following command: [iCODE]sudo yum install epel-release [/iCODE] Since we are using a sudo command, these operations get executed with root privileges. It will ask you for your regular user's password to verify that you have permission to run commands with root privileges. Now that the Nginx repository is installed on your server, install Nginx using the following yum command: [iCODE]sudo yum install nginx [/iCODE] Afterwards, your web server is installed. Once it is installed, you can start Nginx on your VPS: [iCODE]sudo systemctl start nginx [/iCODE] You can do a spot check right away to verify that everything went as planned by visiting your server's public IP address in your web browser (see the note under the next heading to find out what your public IP address is if you do not have this information already): [iCODE] Open in a web browser: [Hidden Content] [/iCODE] You will see the default CentOS 7 Nginx web page, which is there for informational and testing purposes. It should look something like this: If you see this page, then your web server is now correctly installed. Before continuing, you will want to do is enable Nginx to start on boot. Use the following command to do so: [iCODE]sudo systemctl enable nginx [/iCODE] How To Find Your Server's Public IP Address If you do not know what your server's public IP address is, there are a number of ways you can find it. Usually, this is the address you use to connect to your server through SSH. From the command line, you can find this a few ways. First, you can use the iproute2 tools to get your address by typing this: ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//' This will give you one or two lines back. They are both correct addresses, but your computer may only be able to use one of them, so feel free to try each one. An alternative method is to use an outside party to tell you how it sees your server. You can do this by asking a specific server what your IP address is: [iCODE]curl [Hidden Content]] Regardless of the method you use to get your IP address, you can type it into your web browser's address bar to get to your server. Step Two — Install MySQL (MariaDB) Now that we have our web server up and running, it is time to install MariaDB, a MySQL drop-in replacement. MariaDB is a community-developed fork of the MySQL relational database management system. Basically, it will organize and provide access to databases where our site can store information. Again, we can use yum to acquire and install our software. This time, we'll also install some other "helper" packages that will assist us in getting our components to communicate with each other: [iCODE]sudo yum install mariadb-server mariadb[/iCODE] When the installation is complete, we need to start MariaDB with the following command: [iCODE]sudo systemctl start mariadb[/iCODE] Now that our MySQL database is running, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system a little bit. Start the interactive script by running: [iCODE]sudo mysql_secure_installation[/iCODE] The prompt will ask you for your current root password. Since you just installed MySQL, you most likely won’t have one, so leave it blank by pressing enter. Then the prompt will ask you if you want to set a root password. Go ahead and enter Y, and follow the instuctions: [iCODE]mysql_secure_installation prompts: Enter current password for root (enter for none): OK, successfully used password, moving on...[/iCODE] Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. [iCODE]New password: password Re-enter new password: password Password updated successfully! Reloading privilege tables.. ... Success![/iCODE] For the rest of the questions, you should simply hit the "ENTER" key through each prompt to accept the default values. This will remove some sample users and databases, disable remote root logins, and load these new rules so that MySQL immediately respects the changes we have made. The last thing you will want to do is enable MariaDB to start on boot. Use the following command to do so: [iCODE]sudo systemctl enable mariadb[/iCODE] At this point, your database system is now set up and we can move on. Step Three — Install PHP PHP is the component of our setup that will process code to display dynamic content. It can run scripts, connect to our MySQL databases to get information, and hand the processed content over to our web server to display. We can once again leverage the yum system to install our components. We're going to include the php-mysql and php-fpm packages as well: [iCODE]sudo yum install php php-mysql php-fpm[/iCODE] Configure the PHP Processor We now have our PHP components installed, but we need to make a slight configuration change to make our setup more secure. Open the main php-fpm configuration file with root privileges: [iCODE]sudo vi /etc/php.ini[/iCODE] What we are looking for in this file is the parameter that sets cgi.fix_pathinfo. This will be commented out with a semi-colon ( and set to "1" by default. This is an extremely insecure setting because it tells PHP to attempt to execute the closest file it can find if a PHP file does not match exactly. This basically would allow users to craft PHP requests in a way that would allow them to execute scripts that they shouldn't be allowed to execute. We will change both of these conditions by uncommenting the line and setting it to "0" like this: [iCODE]/etc/php.ini excerpt cgi.fix_pathinfo=0[/iCODE] Save and close the file when you are finished. Next, open the php-fpm configuration file www.conf: [iCODE]sudo vi /etc/php-fpm.d/www.conf[/iCODE] Find the line that specifies the listen parameter, and change it so it looks like the following: [iCODE]/etc/php-php.d/www.conf — 1 of 3 listen = /var/run/php-fpm/php-fpm.sock[/iCODE] Next, find the lines that set the listen.owner and listen.group and uncomment them. They should look like this: [iCODE]/etc/php-php.d/www.conf — 2 of 3 listen.owner = nobody listen.group = nobody[/iCODE] Lastly, find the lines that set the user and group and change their values from "apache" to "nginx": [iCODE]/etc/php-php.d/www.conf — 3 of 3 user = nginx group = nginx[/iCODE] Then save and quit. Now, we just need to start our PHP processor by typing: [iCODE]sudo systemctl start php-fpm[/iCODE] This will implement the change that we made. Next, enable php-fpm to start on boot: [iCODE]sudo systemctl enable php-fpm[/iCODE]
  10. this is exactly what im talking about... thx anyways
  11. why are these girls all fat... Indian men do not care or what.... damn....
  12. In case if you want to stream certain video files to VLC, rather than use a Plex Client here is what you need to do: Go to your server's account details page, and visit the FTP web-link. Navigate to the media file that your are interested in streaming, and copy the link address to that file. For example it might be [iCODE]ftp://username:password@hostip/media/TV%20Shows/ShowName/Season%202/ShowName.S02E02.EpisodeName.720p.mkv[/iCODE] Modify the ftp part of the link to sftp. Replace all %20's with actual spaces. Find your home folder location on the right side of your account's dashboard page. For example it might be [iCODE]/home/hdxx/username[/iCODE] Prepend this path before the /media/ in your link, so your final link would look like: [iCODE]sftp://username:password@host-ip/home/hdxx/username/media/TV Shows/ShowName/Season 2/ShowName.S02E02.EpisodeName.720p.mkv[/iCODE] Paste this link into VLC's Open Network location dialog (File -> Open Network), and enjoy your stream.
  13. Email is a very unreliable way of communication. Once it leaves our mail server it can end up blocked on the ISP level or end up in your spam filter. That's why we offer a secondary form of communication through Pushbullet. Pushbullet is an app available for iOS and Android (and browsers) to receive notifications from third party sources. Let's set it up Go to the Pushbullet website to register an account and download the app. Go to the Bytesized site and press your name in the top right and select settings. You should see a green "Authorise with Pushbullet" button. Press the button and press the big "Approve" button. In a few seconds you should receive a confirmation that you allowed Bytesized access to send you notifications. You can now go back to the settings screen to select which devices you want to be pushed on if you have enabled multiple.
  14. Getting data from other seedboxes A lot of people do change their seedbox provider at some point and would like to keep the data from their old box. Since a lot of people have been asking about how to achieve this, here’s a few tips. Getting everything you previously had somewhere else can involve a few steps. Table of Contents Data RSYNC FTP SSH/SCP Importing the torrents Data First off, you’re going to want to grab all the actual data, the files you want to seed or continue downloading. Theres multiple ways of achiving this. RSYNC Rsync is a powerful tool which can synchronize files across the network (for more info about rsync, type: man rsync into the terminal). To back up files, start rsync on the box where you want your files transferred: [iCODE] screen rsync -avhzS --progress [email protected]:~/torrents/completed ~/torrents/oldbox [/iCODE] Screen will enable you to put the file transfer in the background and check the status of it from time to time (ctrl A D detaches the screen, screen -rd reattaches the screen). More info about SCREEN. where ~/torrents/completed is a completed folder which contains the data on your old box, ~/torrents/oldbox will create folder named oldbox in torrents folder on your new box. All files will go into oldbox folder and you can sort them out when the transfer finishes. Case study: If you want to put everything you have in old box torrents folder and mirror it to a new box: screen rsync -avhzS --progress [email protected]:~/torrents/ ~/torrents/ This will put everything from old box completed folder to new box completed folder, from old box downloading folder to new box downloading folder etc. FTP The simplest way to grab all your stuff is with the command-line utility “wget”, the general syntax for this is: wget --ask-password -r ftp://[email protected]/path You have to substitute username, password, oldbox.com and path with the ftp details from your other slice. If you use a nonstandard port (e.g. not 21), you can specify it, by appending “:portnumber” to the “host” part, for example: “awesomeboxen.com:2121”. If you don’t know what to put in for “path”, try and leave it blank. Wget also supports resuming downloads, so if you accidently close/kill/stop it while downloading, you can use the commandline parameter “-c” to continue the download. Another usefull parameter is “-b”, this sends wget to the backround, hiding it’s activity, and logging progress to a file. Be careful though, it will run even if you don’t “see” it anywhere, if you forget about it or get the wrong path, it could fill up your slice . SSH/SCP You can also copy data to/from the seedboxes via scp, what command you have to execute, depends on which box you are doing it from: (from old box): scp -r * [email protected]:~/ (from our box): scp -r [email protected]:/path/to/whatever . You can, of course, substitute the "" in the first command with whatever you like, if you only want to copy a certain folder for example. also, you can substitute the “.” in the second command by something else, if you want to copy stuff to certain folder. Importing the torrents Chances are, you probably also want to import the torrents from your old seedbox. Use one of the methods described above to get all the data. Depending on the client you’re using on the other box, and your personal settings, the .torrent files could be anywhere. If you’ve got them, you can just load them all into the torrent program of your choice. Make sure the data you copied over is in a place the torrent program can find it, e.g. ~/torrents/completed for the default setup of deluge. You can also check the ~/.session folder, it should contain all torrents you ever downloaded. If all else fails you can find torrents on your slice by using the following command: find ~ -name *.torrent If you want to use black magic you could even try and copying all the state files from deluge. They are located in two locations. [iCODE]A folder called state in ~/.config/deluge/ Multiple files with state extension also located in ~/.config/deluge[/iCODE] Now there is a large chance the state file has paths to a different disk. You can open ~/.config/deluge/state/torrents.state and edit the correct paths in. (as reported by Giopost) To recap, different clients keep current seeding .torrent files in different locations: [iCODE]Deluge: ~/.config/deluge/state rtorrent/rutorrent: ~/.session or ~/.config/rtorrent/session[/iCODE]
  15. WARNING you have Transparent Huge Pages (THP) support enabled On Linux I solved this running those on HOST: echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transparent_hugepage/defrag
  16. Errors and Fixes: WARNING: /proc/sys/net/core/somaxconn is set to the lower value of 128 To fix this warning you have to set a new config to /etc/rc.local so that the setting will persist upon reboot $~: sudo nano /etc/rc.local Add this: sysctl -w net.core.somaxconn=65535 When you reboot the next time, the new setting will be to allow 65535 connections instead of 128 as before
  17. ‘Redis’ is an Open source key-value data store, shared by multiple processes, multiple applications, or multiple Servers. Key values are more complex types like Hashes, Lists, Sets or Sorted Sets. Let’s have a quick look on the installation steps of “Redis” Here we go… Step – 1 First of all we need to switch to superuser & install dependencies: [iCODE] su yum install make gcc wget tcl [/iCODE] Step-2 Download Redis Packages & Unzip. This guide is based on installing Redis 2.8.3: wget [Hidden Content] tar xzvf redis-2.8.3.tar.gz Step-3 Compiling and Installing Redis from the source: cd redis-2.8.3 make make install Step- 4 Starting Redis server by executing the following command without any argument: redis-server Step-5 Check if Redis is working. To check, send a PING command using redis-cli. This will return ‘PONG’ if everything is fine. redis-cli ping PONG Step-6 Add Redis-server to init script. Create a directory to store your Redis config files & data: mkdir -p /etc/redis mkdir -p /var/redis Also we need to create a directory inside “/var/redis” that works as data & a working directory for this Redis instance. mkdir /var/redis/redis Step-7 Copy the template configuration file you’ll find in the root directory of Redis distribution into /etc/redis/ cp redis.conf /etc/redis/redis.conf Edit the configuration file, make sure to perform the following changes: Set daemonize to yes (by default it’s set to ‘No’). Set the pidfile to /var/run/redis.pid Set your preferred loglevel Set the logfile to /var/log/redis.log Set the dir to /var/redis/redis Save and exit from the editor Step-8 Add the Redis init script. vi /etc/init.d/redis And paste the following codes to it #!/bin/sh # # chkconfig: 345 20 80 # description: Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. # Source function library. . /etc/init.d/functions REDISPORT=6379 EXEC=/usr/local/bin/redis-server CLIEXEC=/usr/local/bin/redis-cli PIDFILE=/var/run/redis.pid CONF="/etc/redis/redis.conf" case "$1" in start) if [ -f $PIDFILE ] then echo "$PIDFILE exists, process is already running or crashed" else echo "Starting Redis server..." $EXEC $CONF fi ;; stop) if [ ! -f $PIDFILE ] then echo "$PIDFILE does not exist, process is not running" else PID=$(cat $PIDFILE) echo "Stopping ..." $CLIEXEC -p $REDISPORT shutdown while [ -x /proc/${PID} ] do echo "Waiting for Redis to shutdown ..." sleep 1 done echo "Redis stopped" fi ;; restart) stop start ;; *) echo "Please use start or stop as first argument" ;; esac exit 0 Save the file and exit from the editor. Step-9 Give appropriate permission to the init script chmod u+x /etc/init.d/redis Step-10 To run the Redis server at startup we need to add it to the chkconfig list chkconfig --add redis chkconfig --level 345 redis on Step-11 Finally we are ready to start the Redis Server. /etc/init.d/redis start The redis server will start automatically on system boot. Conclusion: ‘Redis’ also supports datatypes such as Transitions, Publish and Subscribe. ‘Redis’ is considered more powerful than ‘Memcache’. It would be smart to bring ‘Redis’ into practice and put ‘Memcache’ down for a while. We provide one-stop solution by utilizing Redis server with Rails , PHP applications and deploy in cloud services such as AWS to make sure that the application is fully scalable. You can also check the compression of Memcached vs Redis, to know more information on which one to pick for Large web apps? Source: [Hidden Content]
  18. This is a quick guide on how to install both the Redis PHP extension as well as the daemon via SSH Installing the Redis daemon: CentOS 6/RHEL 6 rpm -ivh [Hidden Content] rpm -ivh [Hidden Content] yum -y install redis --enablerepo=remi --disableplugin=priorities chkconfig redis on service redis start CentOS 7/RHEL 7 rpm -ivh [Hidden Content] rpm -ivh [Hidden Content] yum -y install redis --enablerepo=remi --disableplugin=priorities systemctl enable redis systemctl start redis Installing the Redis PHP extension for PHP5.5, PHP5.6 and PHP7.0. for phpver in 55 56 70 ; do cd ~ wget [Hidden Content] tar -xvf redis-*.tgz cd redis* /opt/cpanel/ea-php$phpver/root/usr/bin/phpize ./configure --with-php-config=/opt/cpanel/ea-php$phpver/root/usr/bin/php-config make && make install echo 'extension=redis.so' >> /opt/cpanel/ea-php$phpver/root/etc/php.d/redis.ini cd ~ rm -rf redis* done /scripts/restartsrv_httpd /scripts/restartsrv_apache_php_fpm All done! Check to make sure the PHP extension is loaded in each version of PHP: for phpver in 55 56 70 ; do echo "PHP $phpver" ; /opt/cpanel/ea-php$phpver/root/usr/bin/php -i |grep "Redis Support" done Output should be: PHP 55 Redis Support => enabled PHP 56 Redis Support => enabled PHP 70 Redis Support => enabled Source: [Hidden Content]
  19. Redis stands for Remote DIctionary Server and it is a key-value NoSQL database. Almost all languages including PHP have Redis bindings. In this guide, we will show you how to install Redis server and Redis PHP extension on a cPanel based servers so you can use Redis as a cache backend for your WordPress, Laravel, Drupal or any other PHP based application. 1. Install Redis server Redis is not available in the default CentOS repositories, so we need to enable the EPEL repository and install the Redis package from there. 2. Install the EPEL Repository on CentOS 6 To install the EPEL repository please run the following command: rpm -Uvh [Hidden Content] 3. Install the Redis Package Using Yum Once the repository is enabled, you can install the redis package using Yum: sudo yum install redis 4. Start and Configure the Redis service Start the Redis service and enable it to start on boot with the following commands: service redis restart chkconfig --level 345 redis on 5. Install the EPEL Repository on CentOS 7 Same as with CentOS 6 first install the EPEL repository: yum install epel-release Once the repository is enabled, install the Redis package using Yum: yum install redis Start the Redis service and enable it to start on boot with the following commands: systemctl restart redis systemctl enable redis 6. Install Redis PHP extension Redis PHP extension is not available in EasyApache so we will install the Redis PHP extension using the pecl command. We will also enable Igbinary support which is a drop in replacement for the standard PHP serializer. 7. Install the Redis PHP Extension EasyApache 3 To install the Redis PHP extension issue the following command: yes | pecl install igbinary igbinary-devel redis once the build process is completed, verify the installation using the following command: php -m | grep redis and you should see redis, if there is no output, it means that Redis extension is not installed/loaded. 8. Install the Redis PHP Extension EasyApache 4 EasyApache 4 supports multiple versions of PHP so we need to install the Redis PHP extension on each PHP version. Run the following commands to install and enable the Redis PHP extension on each PHP version you have installed on your server: 9. Install and Enable the Redis PHP Extension on PHP 5.4 yes | /opt/cpanel/ea-php54/root/usr/bin/pecl install igbinary igbinary-devel redis /opt/cpanel/ea-php54/root/usr/bin/php -m | grep redis 10. Install and Enable the Redis PHP Extension on PHP 5.5 yes | /opt/cpanel/ea-php55/root/usr/bin/pecl install igbinary igbinary-devel redis /opt/cpanel/ea-php55/root/usr/bin/php -m | grep redis 11. Install and Enable the Redis PHP Extension on PHP 5.6 yes | /opt/cpanel/ea-php56/root/usr/bin/pecl install igbinary igbinary-devel redis /opt/cpanel/ea-php56/root/usr/bin/php -m | grep redis 12. Install and Enable the Redis PHP Extension on PHP 7.0 yes | /opt/cpanel/ea-php70/root/usr/bin/pecl install igbinary igbinary-devel redis /opt/cpanel/ea-php70/root/usr/bin/php -m | grep redis 13. Install and Enable the Redis PHP Extension on PHP 7.1 yes | /opt/cpanel/ea-php71/root/usr/bin/pecl install igbinary igbinary-devel redis /opt/cpanel/ea-php71/root/usr/bin/php -m | grep redis That’s it. You have successfully installed Redis server and Redis PHP extension on your cPanel VPS Source: [Hidden Content]
  20. the old torrents are cached on itorrents.org, this isn;t an error, files uploaded recently shouldn't send you to cache page... in the link , i see you are downloading a movie from 2003, there is a possibility that torrent might no longer e available on cache server...
  21. Have you tried creating a custom rss link and then adding it.. take a look here [Hidden Content]
×
×
  • Create New...
×
GloTorrents Community Forum
Home
Activities
Sign In
Search
More
×