VISTA Performance Improvements

piat

Ran across these couple of tips on the Internet the other day, and thought I would pass them along…

First, my own tip, make sure you have the latest video driver installed…  chances are pretty good that your video card is the lowest  ranked item in your preformance index, its amazing what a new driver can do for the performance and stability of your system (not always a good thing, but in general its a good idea to keep your driver updated).

Second, disk performance…  Vista has advanced output caching support for SATA drives…  if you have a batter backup, or are on a laptop…  Go into device manager, and right click on your disks, select properties, then on the policies tab, mark the “Enable Write Caching” and “Enable Advanced Performance” options.

Lastly, I would recommend disabling the network “auto tuning” feature, its supposed to dynamically adjust the packet size for network performance, but lets face it, our home networks are not what this was targeted at.  Its actually hurting your network performance, by trying to tune it…  Open an administrative command prompt, and type….   “netsh int tcp set global autotuninglevel=normal”

The attached article also talks about how to disable UAP, the popup asking for administrative permission when you do a task that requires it…  I run with UAP enabled, but I realize most people despise it…  There is a nice tool out there…  Tweak UAC to help kill the feature, if you are in need of that, this should help you get it done (http://www.tweak-uac.com/)

No Comments Posted in windows
Tagged , , ,
Discover a web servers OS
Discovering a webservers version info with telnet

Discovering a webservers version info with telnet

Discover a web servers OS and software version

Looking to discover a little more about a remote web server you can use telnet to open an http request. In this case we will  issue a regular request like “HEAD / HTTP/1.0” (I will use HEAD because we don’t care about the content)

[root@desktop]# telnet
telnet> open
(to) prepayisland.com 80
Trying 64.71.228.251...
Connected to prepayisland.com.
Escape character is '^]'.
HEAD / HTTP/1.0 <------Type this and hit ENTER twice

HTTP/1.1 200 OK
Date: Sun, 02 Nov 2008 01:27:55 GMT
Server: Apache/1.3.41 (Unix) PHP/5.2.5 mod_throttle/3.1.2 mod_psoft_traffic/0.2 mod_ssl/2.8.31 OpenSSL/0.9.8b
Last-Modified: Wed, 05 Mar 2008 22:46:47 GMT
ETag: "9b025f-a82-47cf22d7"
Accept-Ranges: bytes
Content-Length: 2690
Connection: close
Content-Type: text/html

Connection closed by foreign host.
[root@desktop]#
[root@desktop]#

From this it is simple to discover that this web server is using Apache/1.3.41 on UNIX with PHP 5.2.5 ETC…

More on how to hide this comming soon

No Comments Posted in How To, Linux
Tagged , , , , , ,
Add, view, edit and configure route and static route on Linux Fedora Core – Linux Server Configuration

Step by step guide on add, view, edit and configure static route on Linux Fedora Core.

The article below show the step by step to display route, configure route, adding and edit route and static route on Linux Fedora Core using Linux netstat command and route command.

Step-by-step how to display or view routing table on Linux Fedora Core machine.

Using Linux ‘netstat‘ command to display or view kernel IP routing table.

[root@linux hack]# netstat -r

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

203.106.93.64 * 255.255.255.224 U 0 0 0 eth0
10.2.0.0 * 255.255.0.0 U 0 0 0 eth1
10.3.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.6.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.7.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.4.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.5.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.10.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.8.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
10.9.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
default 203.106.93.93 0.0.0.0 UG 0 0 0 eth0
[root@linux hack]# netstat -nr

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

203.106.93.64 0.0.0.0 255.255.255.224 U 0 0 0 eth0
10.2.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
10.3.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.6.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.7.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.4.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.5.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.10.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.8.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
10.9.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
0.0.0.0 203.106.93.93 0.0.0.0 UG 0 0 0 eth0

Using Linux ‘route‘ command to display kernel IP routing table.

[root@linux hack]# /sbin/route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

203.106.93.64 * 255.255.255.224 U 0 0 0 eth0
10.2.0.0 * 255.255.0.0 U 0 0 0 eth1
10.3.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.6.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.7.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.4.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.5.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.10.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
10.8.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
10.9.0.0 10.2.0.2 255.255.0.0 UG 0 0 0 eth1
default 203.106.93.93 0.0.0.0 UG 0 0 0 eth0

Step-by-step how to add/change default route on Linux Fedora Core machine.

You can add default route on your Linux machine by using route command.

[root@linux hack]# route add default gw 10.10.0.1 eth0

Add or edit the default gateway on /etc/sysconfig/network file, to make sure your default is preserve after your system boot.

Configuration example on network file:

NETWORKING=yes
HOSTNAME=fedora.hacking.com
GATEWAY=203.106.93.93

Or you can place the (# route add default gw 10.10.0.1 eth0) command to the rc.local script file. This rc.local script file is located under /etc/rc.d/rc.local. This rc.local script file are design to run at the end of each boot time.

Step-by-step how to add static route on Linux Fedora Core machine.

The route add command below show the example to add network and host to the routing table.

[root@linux hack]# route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.2.0.1 eth0

[root@linux hack]# route add -host 10.10.0.5 netmask 255.255.0.0 gw 10.2.0.1 eth0

To verify the current change to the routing table, execute the route command without any option.

The example below show the command to remove or delete routing form routing table.

[root@linux hack]# route del -net 10.1.0.0 netmask 255.255.0.0 gw 10.2.0.1 eth0

[root@linux hack]# route del -host 10.10.0.5 netmask 255.255.0.0 gw 10.2.0.1 eth0

4. Step-by-step how to add route permanent ( persistent ) on Linux Fedora Core machine.

To make route permanent (persistent as on Windows machine) on Linux Fedora Core machine, place the route add command to the rc.local script file. This rc.local script file is located under /etc/rc.d/rc.local. The rc.local script file are design to run at the end of each boot time.

Configuration example on rc.local script file:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
route add default gw 10.10.0.1 eth0
route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.2.0.1 eth0

or

Using the Network Graphical User Interface to adding permanents / persistent route to Linux fedora Core machine.

  1. Open Network GUI interface:[root@linux hack]# /usr/bin/system-config-network-gui &
  2. Select and highlight the network interface card on the Devices tab, in this example eth0
  3. On the Network Configuration menu, click the button to edit the properties for Ethernet Device.
  4. On the Ethernet Device screen, click on the Route tab.
  5. Click [ Add ] button to add static network routes to your Linux Fedora Core machine.

Note: Example above show route network address is 10.10.0.0, the subnet mask is 255.255.0.0 and the gateway is 10.2.0.2

Step-by-step how to procedure above tested on:

  • Operating System: GNU/Linux Fedora Core 4
  • Kernel Name: Linux
  • Kernel Release: 2.6.11-1.1369_FC4
  • Kernel Version: #1 Thu Jun 2 22:55:56 EDT 2005
  • Machine Hardware: i686
  • Machine Processor: i686
  • Hardware Platform: i386
  • Shell: GNU bash, version 3.00.16(1)-release (i386-redhat-linux-gnu)
  • Installation Type: Full Installation (Custom)
  • SELinux: Disable
No Comments Posted in How To, Linux
Tagged , , , , ,
Squid – Quick Start Guide

baby_squid

Introduction

The Squid 2.5 Quick start Guide is a concise information meant to step you through the basic installation and configuration of Squid 2.5. This document is dedicated for beginners who want a simple Squid setup running in Linux. For detailed configurations please refer our Configuration Manual


Step I – Downloading and compiling Squid

You can download squid source file as a gzipped tar ball (squid-x.y-STABLE.tar.gz) available at http://www.squid-cache.org/ or from ftp://www.squid-cache.org/pub.

Next you have to extract the compressed archive file and change the working directory to squid


tar -xvzf squid-*-src.tar.gz
cd squid -*

Now enter the following commands in order to configure, compile and install squid

./configure
make
make install


This by default, will install in “/usr/local/squid”.

Type ./configure –help to view all available options.


Step II – Basic Configuration

Some basic configurations are to be done. Uncomment and edit the following lines in the configuration file found default at “/usr/local/squid/etc/squid.conf”.

cache_dir this direcitve specifies the cache directory storage format and its size as given below.
cache_dir ufs /usr/local/squid/cache 100 16 256
The value 100 denotes 100MB cache size. This can be adjusted to the required size.

http_port
Check http_port, 3128 is a default.

http_access
By default http_access is denied. The ACL rules should be modified to allow access only to the trusted clients. This is important because it prevents people from stealing your network resources.

cache_effective_user & cache_effective_ group
Set these directive to the user and group by which squid will run. This user should have the permission to read and write in the cache directory and to the log files. .


Step III – Custom configuration based on your network needs

For Configuring squid for proxy

By default, squid is configured as a direct proxy . In order to cache web traffic with squid, the browser must be configured to use the squid proxy. This needs the following information

i. the proxy server’s host name
ii. the port by which the proxy server accepts connections.


For Configuring squid for transparency

Using squid transparently is a two part process, requiring first that squid be configured properly to accept non-proxy requests (performed in the squid module) and second that web traffic gets redirected to the squid port (achieved in three ways namely policy based routing, Using smart switching or by setting squid Box as a gateway).


Getting transparent caching to work requires the following steps

i. For some operating systems, you have to configure and build a version of Squid which can recognize the hijacked connections and discern the destination addresses. For Linux this seems to work automatically. For BSD-based systems, configure squid with the –enable-ipf-transparent option and you have to configure squid as


httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

ii. Next you have to configure your cache host to accept the redirected packets – any IP address, on port 80 – and deliver them to your cache application. This is typically done with IP filtering/forwarding features built into the kernel. In Linux they call this ipfilter (kernel 2.4.x), ipchains (2.2.x) or ipfwadm (2.0.x).


For Configuring squid for Reverse Proxy

To run Squid as an accelerator, you probably want to listen on port 80. And you have to define the machine you are accelerating for. This is done in squid module,

http_port 80
httpd_accel_host visolve.com
httpd_accel_port 81
httpd_accel_single_host on
httpd_accel_with_proxy on

If you are using Squid as an accelerator for a virtual host system, then instead of a ‘hostname’ here you have to use the word virtual as:

http_port 80
httpd_accel_host virtual
httpd_accel_port 81
httpd_accel_with_proxy on
httpd_accel_single_host off


Step IV – Starting Squid

After you’ve finished editing the configuration file, you can start Squid for the first time. First, you must create the swap directories. Do this by running Squid with the -z option:

/usr/local/squid/sbin/squid -z

Once that completes, you can start Squid and try it out. Probably the best thing to do is run it from your terminal and watch the debugging output. Use this command:

/usr/local/squid/sbin/squid -NCd1

If everything is working fine, then your console displays: “Ready to serve requests”.

If you want to run squid in the background, as a daemon process

/usr/local/squid/sbin/squid

You should be a privileged user to start/stop squid..


Step V – To check if Squid is working

Check the cache.log file in your logs directory to find out if squid works correctly. This file contains the informational and error messages that Squid generates at runtime.

No Comments Posted in How To, Linux
Tagged , , , , , , , , ,