Skip to content

Instantly share code, notes, and snippets.

View nu11secur1ty's full-sized avatar
:octocat:
root@kali:~# 🐫Perl

nu11secur1ty nu11secur1ty

:octocat:
root@kali:~# 🐫Perl
View GitHub Profile

#To create the logical volume, we will use:

lvcreate -L 3G -n lvstuff vgpool

The -L command designates the size of the logical volume, in this case 3 GB, and the -n command names the volume. Vgpool is referenced so that the lvcreate command knows what volume to get the space from.

#Format and Mount the Logical Volume One final step is to format the new logical volume with a file system.

@nu11secur1ty
nu11secur1ty / fstab.md
Last active April 11, 2016 14:55
fstab file on a typical Linux system.
# device-spec   mount-point     fs-type      options                                          dump pass
LABEL=/         /               ext4         defaults                                            1 1
/dev/sda6       none            swap         defaults                                            0 0
none            /dev/pts        devpts       gid=5,mode=620                                      0 0
none            /proc           proc         defaults                                            0 0
none            /dev/shm        tmpfs        defaults                                            0 0

# Removable media

Linux Runlevels Explained

A runlevel is one of the modes that a Unix -based operating system will run in. Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine. Conventionally, seven runlevels exist, numbered from zero to six.

After the Linux kernel has booted, the init program reads the /etc/inittab file to determine the behavior for each runlevel. Unless the user specifies another value as a kernel boot parameter, the system will attempt to enter (start) the default runlevel. Standard run levels for Red Hat based distributions Run Level Mode Action

0 Halt Shuts down system
@nu11secur1ty
nu11secur1ty / create a self-signed SSL Certificate.md
Last active April 4, 2016 14:40
How to create a self-signed SSL Certificate

Overview

The following is an extremely simplified view of how SSL is implemented and what part the certificate plays in the entire process.

Normal web traffic is sent unencrypted over the Internet. That is, anyone with access to the right tools can snoop all of that traffic. Obviously, this can lead to problems, especially where security and privacy is necessary, such as in credit card data and bank transactions. The Secure Socket Layer is used to encrypt the data stream between the web server and the web client (the browser).

SSL makes use of what is known as asymmetric cryptography, commonly referred to as public key cryptography (PKI). With public key cryptography, two keys are created, one public, one private. Anything encrypted with either key can only be decrypted with its corresponding key. Thus if a message or data stream were encrypted with the server's private key, it can be decrypted only using its corresponding public key, ensuring that the data only could have come from the serve

@nu11secur1ty
nu11secur1ty / Add remote host to nagios server.md
Last active March 29, 2016 15:47
Add remote host to nagios server

##Add remote host to Nagios server

###On Remote Host ####Pre-requisite #####Below listed package should be installed i.gcc ii. xinetd iii.openssl

#####Step 1

@nu11secur1ty
nu11secur1ty / chromedriver.sh
Created March 29, 2016 07:02 — forked from mikesmullin/chromedriver.sh
easily install chromedriver on linux/osx
sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
@nu11secur1ty
nu11secur1ty / Solution for repository - locally-mounted DVD on Red Hat Enterprise Linux 7.md
Last active December 22, 2022 13:04
Set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 7

Environment

Red Hat Enterprise Linux 7 Issue

How to set up yum repository to use locally-mounted DVD with Red Hat Enterprise Linux (RHEL) 7
Would like to upgrade server from RHEL 7.x to RHEL 7.y
Have a secure environment that will never be connected to the internet, but still needs to be updated
Way to update the packages on server, with no satellite server and servers disconnected from internet
@nu11secur1ty
nu11secur1ty / EPEL Repository CentOS 6.5.md
Last active March 1, 2016 08:13
Install & Enable EPEL Repository on CentOS 6.5

EPEL Repository on CentOS 6.5

Extra Packages for Enterprise Linux (EPEL)

#References:

https://fedoraproject.org/wiki/EPEL
http://www.shellhacks.com/en/Adding-EPEL-Repository-on-CentOS-RHEL
https://fedoraproject.org/keys
@nu11secur1ty
nu11secur1ty / install_nagios.sh
Last active February 4, 2016 00:39
Install Nagios 4.x on CentOs 6.5
#!/bin/bash
######################################
# copyright@nu11secur1ty #
######################################
# Stop iptables
/etc/init.d/iptables stop
yum install wget
cd ~
# you can change if you want!
@nu11secur1ty
nu11secur1ty / Bonding Interfaces.md
Last active April 6, 2016 13:10
Channel Bonding Interfaces CentOs 6

Warning:

The use of direct cable connections without network switches is not supported for bonding. 
The failover mechanisms described here will not work as expected without the presence of network switches. 
See the Red Hat Knowledgebase article Why is bonding in not supported with direct connection using crossover cables? for more information. 

Note:

The active-backup, balance-tlb and balance-alb modes do not require any specific configuration of the switch. 
Other bonding modes require configuring the switch to aggregate the links.