Skip to main content

Posts

Bandwidth Limiting Big Files Download - Mikrotik

Here is one of my queues with burst, setup using Winbox. All settings are on the General Tab. Settings are given as tx/rx (upload/download). Name - 2.201/32 Target Address - 192.168.2.201/32 Limit At - 65536/131072 Max Limit - 262144/524288 Burst Limit - 393216/786432 Burst Threshold - 262144/524288 Burst Time - 90/180 This is a Simple queue for the user at IP 192.168.2.201. He is given a basic speed of 64k upload and 128k download. According to the MT manual, this is a guaranteed minimum speed, provided enough bandwidth is available. His maximum sustained speed is 256k upload and 512k download. His speed is allowed to burst as high as 384k upload and 768k download. If his speed goes above the threshold (256/512) and stays there, the burst timer starts. After the allowed time, 90sec for upload and 180sec for download, his speed is throttled back from the burst limit (384/768) to the max limit (256/512) and held there until the traffic flow stops. When the flow stops, the timer...

WSO2Torial: Setting up WSO2 with a valid SSL certificate

WSO2  products can be downloaded from the WSO2 website, installed in a matter of seconds after which you can try out the software. No fees, no contracts and …. no lawyers. What you’ll find when you start up any WSO2 product is that the browser will balk on the certificate that is used to encrypt the connection. This is a so called self-signed certificate and is deemed to be less secure then one from a Certificate authority. How do Certificates work? Without going into too much detail, certificates work using a trust mechanism. Certificates are issued by a so called Certificate Authority like the companies Comodo or Symantec. A certificate issued by them should be trusted since the trust relationship with CA’s is beyond discussion.  The certificate issued guarantees that the site is indeed who it claims to be. Certificates in this sense are used to encrypt the secure https traffic to and from your WSO2 products. To set up HTTPS you will need a valid certificate t...

Give permission to a SSH user only to a specific directory and block terminal access !!

How do I restrict the user to only be able to do anything within that folder? (ie: that folder is the user's root and they cannot view/edit anything higher in the directory tree) Step-1 : adding a new group sudo addgroup sftptsl Step-2 : Create the chroot directory sudo mkdir /var/www/html/user-dir/ sudo chmod g+rx /var/www/html/user-dir/ Step-3 : Create the group-writable directory sudo mkdir -p /var/www/html/user-dir/working-dir1/ sudo chmod g+rwx /var/www/html/user-dir/working-dir1/ Step-4 : Give them both to the new group. sudo chgrp -R sftptsl /var/www/html/user-dir/ Step-5 : create an user and asign to this group  sudo adduser --ingroup sftptsl sftpuser ## group change You can also assign an existing user to the group usermod -g primarygroupname username usermod -G secondarygroupname username -g (primary group assigned to the users) -G (Other groups the user belongs to) ...

SWAP: Allocate swap space in Centos7

Introduction One of the easiest ways to make your server more responsive, and guard against out-of-memory errors in your application, is to add some swap space.  Swap  is an area on a storage drive where the operating system can temporarily store data that it can no longer hold in memory. This gives you the ability to increase the amount of information that your server can keep in its working memory, with some caveats. Reading from and writing to swap is slower than using memory, but it can provide a good safety net for when your server is low on memory. Without swap, a server that runs out of memory may start killing applications to free up memory, or even crash. This can cause you to lose unsaved data or experience downtime. To ensure reliable data access, some applications require swap to function. In this guide, we will cover how to create and enable a swap file on a CentOS 7 server. Note Although swap is generally recommended for systems utilizing traditi...