linux poison RSS
linux poison Email
1

How to change DMA settings on Ubuntu

One really common solution to slow, and unreliable playback of DVD is the settings related to DMA which is turn "off" by default.

DMA stands for: Direct Memory Access. DMA allows a piece of hardware to talk directly with the RAM, reading and/or writing independent of the CPU (Central Processing Unit). In other words the hardware can use the system memory, bypassing the CPU, allowing the device to read and write much faster.

By default Ubuntu has DMA turned off (set to 0), this can be changed in the /etc/hdparm.conf file, like so:

1. First make a backup of your hdpram file:
# sudo cp /etc/hdparm.conf /etc/hdparm.conf.original
2. Now edit the file using your favorite text editor, I'm using vi, however you can use the editor of you choice:
# sudo vi /etc/hdparm.conf
3. Now just add the following at the end of the file:
/dev/cdrom {
      dma = on
      }
4. Once you restart your computer you should have DMA turned on.

[Ref: http://geekybits.blogspot.com/2008/01/dma-and-ubuntu.html]
Reblog this post [with Zemanta]
Read more
0

Website downloader for Linux - HTTrack

HTTrack is a free (GPL, free / free software) and easy-to-use offline browser utility.

It allows you to download a World Wide Web site from the Internet to a local directory, building recursively all directories, getting HTML, images, and other files from the server to your computer. HTTrack arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online. HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system.

HTTrack uses a web crawler to download a website. Some parts of the website may not be downloaded by default due to the robots exclusion protocol unless disabled during the program. HTTrack can follow links that are generated with basic JavaScript and inside Applets or Flash, but not complex links (generated using functions or expressions) or server-side image maps.



OpenSuse user can use "1 click" installaer to install HTTrack - here
Fedora  user can install - yum install httrack
Others can download the source code

This video demonstrates the power of HTTrack ...

Read more
0

openSUSE Network Installation/Upgrade Without CD/DVD

Installing or upgrading the opensuse is fairly easy using CD, or net boot CD but many times it happen the we need to install or upgrade the OS using these media, to solve this problem we got a script called setupgrubfornfsinstall 

setupgrubfornfsinstall is a dialog based shell script to prepare remote network installations. The script downloads kernel and initrd of the distribution and creates a boot loader entry for them.

Features:
browse installation sources offered via SLP in your LAN
browse nfs exports (special config file needed then)
support for nfs, ftp and http
install openSUSE from download.opensuse.org
install Fedora from download.fedora.redhat.com
supports both grub and lilo (the latter mostly untested nowadays though)
qemu/kvm support, just run setupgrubfornfsinstall with option —qemu.
supports ssh/vnc installation parameters (SUSE only)

1) Preparing network installation source. use http installation source by mount openSUSE ISO image into apache root folder directory (/srv/www/htdocs/11.1) so, in this case URL becomes - http://172.19.12.36/11.1

2) Download the script, rename it to setupgrubfornfsinstall.sh , make it executable
# chmod +x setupgrubfornfsinstall.sh 

3) execute the script
# ./setupgrubfornfsinstall.sh and follow the instruction

4) Choose either x86 or x86_64 architecture.


5) Choose installation source


6) Specify the URL for you Apache where we have set-up the installation folder

7) Select the proper resolution for installation

And after few more wizard, reboot your computer and choose network installation from GRUB menu and it will start the installation from the specified URL.
Read more
0

How to secure PHP with Suhosin

Suhosin is an advanced protection system for PHP installations. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core. Suhosin comes in two independent parts, that can be used separately or in combination. The first part is a small patch against the PHP core, that implements a few low-level protections against bufferoverflows or format string vulnerabilities and the second part is a powerful PHP extension that implements all the other protections.

Features:

Engine Protection (only with patch)
Protects the internal memory manager against bufferoverflows with Canary and SafeUnlink Protection
Protects Destructors of Zend Hashtables
Protects Destructors of Zend Linked-Lists
Protects the PHP core and extensions against format string vulnerabilities
Protects against errors in certain libc realpath() implementations

Misc Features
Protection Simulation mode
Adds the functions sha256() and sha256_file() to the PHP core
Adds support for CRYPT_BLOWFISH to crypt() on all platforms
Transparent protection of open phpinfo() pages
EXPERIMENTAL SQL database user protection
 
Runtime Protection
Transparent Cookie Encryption
Protects against different kinds of (Remote-)Include Vulnerabilities
disallows Remote URL inclusion (optional: black-/whitelisting)
disallows inclusiong of uploaded files
optionally stops directory traversal attacks
Allows disabling the preg_replace() /e modifier
Allows disabling eval()
Protects against infinite recursion through a configureabel maximum execution depth
Supports per Virtual Host / Directory configureable function black- and whitelists
Supports a separated function black- and whitelist for evaluated code
Protects against HTTP Response Splitting Vulnerabilities
Protects against scripts manipulating the memory_limit
Protects PHP‘s superglobals against extract() and import_request_vars()
Adds protection against newline attacks to mail()
Adds protection against \0 attack on preg_replace()

Session Protection
Transparent encryption of session data
Transparent session hijacking protection
Protection against overlong session identifiers
Protection against malicious chars in session identifiers

Filtering Features
Filters ASCIIZ characters from user input
Ignores GET, POST, COOKIE variables with the following names:
GLOBALS, _COOKIE, _ENV, _FILES, _GET, _POST, _REQUEST
_SERVER, _SESSION, HTTP_COOKIE_VARS, HTTP_ENV_VARS
HTTP_GET_VARS, HTTP_POST_VARS, HTTP_POST_FILES
HTTP_RAW_POST_DATA, HTTP_SERVER_VARS, HTTP_SESSION_VARS
Allows enforcing limits on REQUEST variables or separated by type (GET, POST, COOKIE)
Supports a number of variables per request limit
Supports a maximum length of variable names [with and without indicies]
Supports a maximum length of array indicies
Supports a maximum length of variable values
Supports a maximum depth of arrays
Allows only a configureable number of uploaded files
Supports verification of uploaded files through an external script
Supports automatic banning of uploaded ELF executables
Supports automatic banning of uploaded binary files
Supports automatic stripping of binary content in uploaded files
Configureable action on violation
just block violating variables
send HTTP response code
redirect the browser
execute another PHP script

Logging Features
Supports multiple log devices (syslog, SAPI module error log, external logging script)
Supports freely configureable syslog facility and priority
Supports log device separated selection of alert types to log
Alerts contain filename and linenumber that triggered it
Alerts contain the IP address of the user triggering it
The IP Address can also be extracted from X-Forwarded-For HTTP headers (f.e. for reverse proxy setups)

Installation and Configuration
# cd / tmp
# wget http://download.suhosin.org/suhosin-0.9.27.tgz
# tar xzf suhosin-0.9.23.tgz
# cd suhosin-0.9.23
# ./configure
# make
# make install
The next step is to enable the module in php.ini, editing /etc/php5/apache2/php.ini and adding this line:
extension = suhosin.so
Now just restart Apache and suhosin begin to do it's dirty work:)
For more detail configuration, check here
Read more
2

My Desktop - OpenSuSe 11.1

Read more
Related Posts with Thumbnails