Create a SOCKS proxy on a Linux server with SSH to bypass content filters

Are you on a network with limited access? Is someone filtering your internet traffic, limiting your abilities? Well, if you have SSH access to any server, you can probably set up your own SOCKS5 proxy and tunnel all your traffic over SSH.

From that point on, what you do on your laptop/computer is sent encrypted to the SOCKS5 proxy (your SSH server) and that server sends the traffic to the outside. It’s an SSH tunnel on steroids through which you can easily pass HTTP and HTTPs traffic. And it isn’t even that hard. This guide is for Linux/Mac OSX users that have direct access to a terminal, but the same logic applies to PuTTy on Windows too.

Apache vs Nginx: Practical Considerations

Apache and Nginx are the two most common open source web servers in the world. Together, they are responsible for serving over 50% of traffic on the internet. Both solutions are capable of handling diverse workloads and working with other software to provide a complete web stack.

While Apache and Nginx share many qualities, they should not be thought of as entirely interchangeable. Each excels in its own way and it is important to understand the situations where you may need to reevaluate your web server of choice. This article will be devoted to a discussion of how each server stacks up in various areas.

Bash script to block an IP address in linux

In order to block an IP or a class of IPs on your Linux server you need to use iptables tools (administration tool for IPv4 packet filtering and NAT) and netfilter firewall. First you need to log into shell as root user.

To block an IP address you need to type the command as follows:
./drop IP

You can also unblock an IP by suppling -r parameter:
./drop -r IP
Continue reading…

Enable or Disable PIN Sign-in for Domain Users in Windows 8 and 8.1

Enable or Disable PIN Sign-in for Domain Users using a REG File
  1. Download PIN_Sign-in_for_Domain_Users or Disable_Domain_PIN_Sign-in.reg file.
  2. Save the .reg file to your desktop.
  3. Double click/tap on the downloaded .reg file to merge it.
  4. If prompted, click/tap on Run, Yes (UAC), Yes, and OK.
  5. When finished, you can delete the downloaded .reg file if you like.

Continue reading…

Ștergere error_log din /home

Dacă dorești vreodată să ștergi fișierele error_log de ​​la toate site-urile găzduite pe server, și ai acces la server prin intermediul SSH, următoarea comandă va elimina în liniște aceste fișiere:

find /home/ -type f -name error_log -delete

Write-access of a folder to all users

To best share with multiple users who should be able to write in /var/www, it should be assigned a common group. For example the default group for web content on Ubuntu and Debian is www-data. Make sure all the users who need write access to /var/www are in this group.

sudo usermod -a -G www-data

Then set the correct permissions on /var/www.

sudo chgrp -R www-data /var/www sudo chmod -R g+w /var/www 

Additionally, you should make the directory and all directories below it „set GID”, so that all new files and directories created under /var/www are owned by the www-data group.

sudo find /var/www -type d -exec chmod 2775 {} \; 

Find all files in /var/www and add read and write permission for owner and group:

sudo find /var/www -type f -exec chmod ug+rw {} \;