It is currently Sun Dec 22, 2024 5:52 am

News News of Linux specific

Site map of Linux specific » Forum : Linux specific

Linux specific questions/information are gathered here. The main thrust of topics are applied to Centos/RedHat(RH)/Debian/Ubuntu/Gentoo distributives
Forum rules
All information is given AS IS

SSH tunneling notes

Taken from : http://shearer.org/Ssh_tunnelling

-L localhostport:remotehost:remoteport

Specifies that the given localhostport on the local (client) host is
to be forwarded to the given remotehost and remoteport on the remote side.
This works by allocating a socket to listen to localhostport on the local
side, optionally bound to the specified bind_address. Whenever a con-
nection is made to the local port, the connection is forwarded over
the secure channel, and a connection is made to remotehost ...
Read more : SSH tunneling notes | Views : 2789 | Replies : 0


Scripts and GUI-like tools for linux tc (htb,cbq,sfq)

TCSS is a bash script used for traffic management on Linux 2.4 and 2.6 kernels. It supports groups, multiport rules, minimun and burst rates, prioritization and can make use of layer7 filtering too.
http://sourceforge.net/projects/tcss/

WebHTB is a software suite that helps simplify the difficult process of bandwidth allocation, for both upload and download traffic: generates and checks configuration files and displays real time traffic overview for each separate client.

https://www.webhtb.ro/

T-HTB FREE web interface, built ...
Read more : Scripts and GUI-like tools for linux tc (htb,cbq,sfq) | Views : 24865 | Replies : 2


SimpleHTTPServer with Python

Sometimes it can be very handy to download/navigate some files from the server without altering current web server configuration or setup of additional services.
Python default module SimpleHTTPServer allows to do it very easy:
Code: Select all
cd /home

Code: Select all
python -m SimpleHTTPServer

Serving HTTP on 0.0.0.0 port 8000 ...
localhost - - "GET / HTTP/1.1" 200 -
localhost - - code 404, message File not found
localhost - - "GET /favicon.ico HTTP/1.1" ...
Read more : SimpleHTTPServer with Python | Views : 3815 | Replies : 0


ip_conntrack: table full, dropping packet

You can check server current tracked connections with the help of the following command (as root):
Code: Select all
cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count

or
Code: Select all
wc -l /proc/net/ip_conntrack

Code: Select all
cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max

If you want to adjust it, just run the following as root:
Code: Select all
echo 131072 > /proc/sys/net/ipv4/ip_conntrack_max

To make this persistent you have to add a line like 'net.ipv4.ip_conntrack_max=131072' to /etc/sysctl.conf.

http://rackerhacker.com/2008/01/24/ip_conntrack-table-full-dropping-packet/#comment-15408
Some readers may be interested to know what ip_conntrack is in the first place, and why it fills up. If ...
Read more : ip_conntrack: table full, dropping packet | Views : 4408 | Replies : 0


Magic SysRq key

The magic SysRq key (System request (often abbreviated SysRq or Sys Req)) is a key combination understood by the Linux kernel, which allows the user to perform various low level commands regardless of the system's state. It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem.

To be able to use this functionality the CONFIG_MAGIC_SYSRQ option has to be enabled at kernel compile time.

Much like Sun Microsystems's ...
Read more : Magic SysRq key | Views : 3601 | Replies : 0


Capturing with tcpdump for viewing with Wireshark

There are occasions when you want to capture packets using tcpdump rather than wireshark, especially when you want to do a remote capture and do not want the network load associated with running Wireshark remotely (not to mention all the X traffic polluting your capture).

However, the default tcpdump parameters result in a capture file where each packet is truncated, because most versions of tcpdump, will, by default, only capture the first 68 or 96 ...
Read more : Capturing with tcpdump for viewing with Wireshark | Views : 2882 | Replies : 0


Force set MAC address (Centos/Ubuntu)

In Ubuntu, you can explicitly set a MAC address for your network card.
You can either do it manually (Working with MAC Addresses) or use a package called macchanger (GNU MAC Changer).
To manually change your MAC address, for example, for eth0, you do the following:
Code: Select all
sudo vim /etc/network/interfaces

And then you add following line to end of interface being configured (eth0 in this example):
Code: Select all
hwaddress xx:xx:xx:xx:xx:xx

where xx:xx:xx:xx:xx:xx is the MAC address.
So now ...
Read more : Force set MAC address (Centos/Ubuntu) | Views : 4194 | Replies : 0


LSI SAS RAID tools: MegaCLI, MegaRAID (SM,SAS SNMP)

TODO
LSI SAS RAID tools: MegaCLI, MegaRAID Storage Manager, MegaRAID SAS SNMP

http://www.delltechcenter.com/page/Linux+RAID+and+Storage
http://www.bigdbahead.com/?p=574
http://wiki.debian.org/LinuxRaidForAdmins
http://hwraid.le-vert.net/wiki
http://www.lsi.com/Search/Pages/downloads.aspx?k=MegaCLI%20-%20Linux
http://tools.rapidsoft.de/perc/perc-cheat-sheet.html

Determine RAID level:
$raid_level_mapping = array();
$raid_level_mapping = '0';
$raid_level_mapping = '1';
$raid_level_mapping = '5';
$raid_level_mapping = '10';

Source:
http://tools.rapidsoft.de/perc/rs_check ... ss.php.txt
<?php

/**
* PERC5/i RAID check for rs_check package
*
* ...
Read more : LSI SAS RAID tools: MegaCLI, MegaRAID (SM,SAS SNMP) | Views : 5485 | Replies : 0


Download RPM package using yum without installing it

You need to install plugin called yum-downloadonly. This plugin adds a --downloadonly flag to yum so that yum will only download the packages and not install/update them. Following options supported by this plugin:
--downloadonly : don't update, just download a rpm file
--downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp

Code: Select all
yum install yum-downloadonly

Code: Select all
yum update -y --downloadonly


Method # 2: yum-utils.noarch Package

yum-utils is a collection of utilities and examples for ...
Read more : Download RPM package using yum without installing it | Views : 4259 | Replies : 0


Create/Add swap file

Use dd command to create swapfile. Next you need to use mkswap command to set up a Linux swap area on a device or in a file.

1. Use 'fallocate' to create swapfile of desired size:
Code: Select all
fallocate -l 2G /swapfile

Or use 'dd' create 2048MB swap file (1024 * 2048MB = 2097152 block size):
Code: Select all
dd if=/dev/zero of=/swapfile bs=1024 count=2097152

2. Adjust permissions
Code: Select all
chmod 600 /swapfile

3. Set up a Linux swap area:
Code: Select all
mkswap /swapfile

4. ...
Read more : Create/Add swap file | Views : 2846 | Replies : 0


 

Login


Statistics

Total posts 505 • Total topics 442 • Total members 22

cron