servers
How to enable IP Forwarding in Linux
By default any modern Linux distributions will have IP Forwarding disabled. This is normally a good idea, as most peoples will not need IP Forwarding, but if we are setting up a Linux router/gateway or maybe a VPN server (pptp or ipsec) or just a plain dial-in server then we will need to enable forwarding. [...]
PHP Accelerators
PHP Accelerators/Cachers will boost the performance of your PHP applications, by caching the compiled form of php scripts to avoid the overhead of parsing and compiling the code every time the page is loaded. A PHP accelerator typically reduces server load and increases the speed of your PHP code by 1-10 times. Normally you will [...]
How to Identify MySQL slow queries
Normally from my experience if we take the most ‘expensive’ 10 queries and we optimize them properly (maybe running them more efficiently, or maybe they are just missing a simple index to perform properly), then we will immediately see the result on the overall mysql performance. Then we can iterate this process and optimize the [...]
How to disable the HTTP TRACE method
Normally you will have this enabled by default, but if you want to test if it is really enabled on your server you just have to telnet on the port your web server is running and request for “TRACE / HTTP/1.0†if you get a positive reply it means TRACE is enabled on your system. [...]
How to Secure Memcached
Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is a great piece of software that was designed with performance in mind. Still, memcached has little (or should I say none?) security features built-in. If we run [...]
How to Mount remote folders via SSH
This document describes how to install and use sshfs, a FUSE based filesystem that uses SSH to mount remote folders. Since it is based on FUSE (userspace filesystem framework for Linux) your kernel will need to have the fuse module available. FUSE is included in kernel newer than 2.6.14, so I will assume that you [...]
How to Disable Cacti web interface persistent mysql connections
Cacti uses for its web interface persistent mysql connections to the mysql server. Normally this is fine and you would not care about it, but if you want to disable this and make cacti use regular mysql connections (and properly close each of its open mysql calls) here is what you need to do: edit: [...]
How to Discover the web server software and version of a remote server
This can be achieved in many ways, but the simplest one in my opinion is to use a basic telnet connection on port 80 to the remote server and issue a regular request like “HEAD / HTTP/1.0†(I will use HEAD because we don’t care about the content): telnet remote_server.com 80 Trying remote_server.com… Connected to [...]
How to Set up a PPTP VPN server on Debian Etch
PPTP is known to be less secure than other VPN software, but if you need a quick solution for a VPN server that will connect out of the box from Windows workstations PPTP is the obvious choice. This post will show how easy it is to setup a pptp vnp server on Debian Etch. A [...]
How to Increase PHP memory limit
If you have seen an error like “Fatal Error: PHP Allowed Memory Size Exhausted†in apache logs or in your browser, this means that PHP has exhausted the maximum memory limit. This post will show 3 different ways on how you can increase the php memory limit and also explain when you should use them. [...]
How to Backup your MySQL databases manually with mysqldump
MySQL provides us the tool required to do this: mysqldump. As the name implies, this can make a dump of one database or even to all the databases on the server. You can see all the options on its help manual or on the mysql site. Basically this is used like: mysqldump [OPTIONS] database [tables] [...]
PIX Terminology and Background Information
Cisco PIX Firewall BasicsThe following diagram shows a multi-port PIX connected to various networks. Cisco PIX Firewall Basics PIX terminology: we generally refer to the user segment as the Inside subnet. The interface connected to the Internet router is the outside subnet. As shown, we probably have DMZ (De-Militarized Zone) subnet, the subnet where we [...]
How to Configuring Cisco PIX to Use a Syslog Server
Most Cisco devices use the syslog protocol to manage system logs and alerts. But unlike their PC and server counterparts, Cisco devices lack large internal storage space for storing these logs. To overcome this limitation, Cisco devices offer the following two options: * Internal buffer— The device’s operating system allocates a small part of memory [...]
