Quantcast
Image

Search Results for: repo

How to protect against DoS attacks in Apache

By  •  November 28, 2023

Denial of Service (DoS) attacks aim to render a server or network resource unavailable, overwhelming it with a flood of traffic. This can cause serious problems for websites and …
Read More

How to install and configure Apache on openSUSE or SLES

By  •  November 28, 2023

The Apache HTTP Server, colloquially known as Apache, is one of the most widely-used web server software. It is open-source and has been a favorite for many system administrators …
Read More

How to install and set up Apache on CentOS, Red Hat, or Fedora

By  •  November 28, 2023

The Apache HTTP Server, commonly referred to as Apache, is one of the most widely used web servers around the world. It provides many powerful features, including dynamically loadable …
Read More

How to protect against DoS attacks in Apache

By  •  November 28, 2023

Denial of Service (DoS) attacks aim to render a server or network resource unavailable, overwhelming it with a flood of traffic. This can cause serious problems for websites and …
Read More

How to protect against DoS attacks in Apache

By  •  November 28, 2023

Denial of Service (DoS) attacks aim to render a server or network resource unavailable, overwhelming it with a flood of traffic. This can cause serious problems for websites and …
Read More

How to analyze Apache log for security with Scalp

By  •  May 28, 2023

Scalp! is a log analyzer for the Apache web server that looks for security problems. It reads the Apache log and perform log analysis for possible attacks against rulesets provided by PHP-IDS project. It is available for download from GitHub.

Scalp! is currently written in Python though the writer claims he’s now working on C++ version of it. Current Python can only analyze a maximum of 10000 lines of log, and seems to be a bit slow. The C++ version is aimed to overcome the problems.

When being run without any parameters, Scalp will look for access_log and default_filter.xml files in the current directory, and produce the report to the standard output. access_log is the Apache log file, and default_filter.xml is the filter rules available from the PHPIDS project. Running the program as the following will use the Apache log file at /var/log/apache2/access.log and the PHPIDS ruleset from ~/default_filter.xml;

$ python scalp.py --log /var/log/apache2/access.log --filters ~/default_filter.xml

To overcome the 10000 lines limitation of the program, a Linux program called split can be run as in the example below as a log splitter, and Scalp! is then run against all the splitted log;

$ split -l 10000  /var/log/apache2/access.log

How to install Git client in Ubuntu

By  •  May 28, 2023

Git is a by far the most widely used distributed version control system while being free and open source.

Despite the popularity, it’s not installed by default in Ubuntu. You can install the program by following these steps;

  1. Update apt‘s package list

    $ sudo apt -y update
  2. Install git-core package

    $ sudo apt -y install git-core
  3. Test by running git from the command line

    $ git
    usage: git [--version] [--help] [-C <path>] [-c name=value]
               [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
               [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
               [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
               <command> [<args>]
    
    These are common Git commands used in various situations:
    
    start a working area (see also: git help tutorial)
       clone      Clone a repository into a new directory
       init       Create an empty Git repository or reinitialize an existing one
    ------ snipped ------

If you prefer to use GUI-based Git client, you can choose any of the following packages to install via apt;

  • gitk
  • giggle
  • git-cola
  • git-gui
  • gitg

How to install SSH server in Ubuntu

By  •  May 28, 2023

Ubuntu does not come with SSH server installed by default but could be installed and enabled easily with the following steps from the comand line;

  1. Update package list from the repository.

    sudo apt -y update
  2. Install openssh-server package.

    sudo apt install -y openssh-server
  3. Check if sshd server is running.

    sudo systemctl status ssh
  4. Optionally, disable sshd from running by default during system bootup.

    sudo systemctl disable ssh
  5. sshd could be re-enabled at later times.

    sudo systemctl enable ssh

How to extract rar file in Linux

By  •  May 28, 2023

rar is a proprietary file format for file archival and developed by WinRAR. It provides Winrar to extract rar files in Windows and unrar for Linux.


Read More

How to check hard-drive’s health status in Linux

By  •  May 28, 2023

SMART or Self-Monitoring, Analysis, and Reporting Technology is used to monitor the hard drives for reliability. Hard drive’s failure can be anticipated and appropriate action can be taken before the hard drive fail completely.

To check your hard drive’s health status in Linux, the tool smartctl can be used. It is available in the smartmontools package, and in Ubuntu running the command at the terminal will install the package

sudo apt-get install smartmontools

Assuming your hard drive is /dev/sda, running the following command will return the SMART’s health status of your hard drive

sudo smartctl -H /dev/sda

A healthy hard drive will return the following output

smartctl 5.40 2010-03-16 r3077 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

The following is an example output of a problematic hard drive

smartctl 5.40 2010-03-16 r3077 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

Log Sense failed, IE page [scsi response fails sanity test]
Top
OnlineWebTools