Archive for September, 2010


September 27, 2010

I”m attempting to install a fresh version of awstats

1) Downloaded version 6.95 from the site.

2) Unzip anywhere you want – awstats

Directory structure is




  • cgi-bin/
  • classes/
  • css/
  • icon/
  • js/

3) File permissions appear to be correct

-rwxr-xr-x 1 root staff 7126 2010-06-06 17:10

-rw-r–r– 1 root staff 60959 2010-06-06 17:10 awstats.model.conf

-rwxr-xr-x 1 root staff 624764 2010-06-06 17:10

drwxr-sr-x 5 root staff 4096 2010-06-06 17:10 lang

drwxr-sr-x 2 root staff 4096 2010-06-06 17:10 lib

drwxr-sr-x 3 root staff 4096 2010-06-06 17:10 plugins

4) I have a site config file in /etc/awstats/

5) My important settings in it are:


LogFormat = 4






6) Add the following with httpd.conf file ( or simply run ) and restarted apache –

# Directives to allow use of AWStats as a CGI
Alias /awstatsclasses “awstats/wwwroot/classes/”
Alias /awstatscss “awstats/wwwroot/css/”
Alias /awstatsicons “awstats/wwwroot/icon/”
ScriptAlias /awstats/ “awstats/wwwroot/cgi-bin/”

[ Here I just use dummy path, replace your awstats location correctly ]
# This is to permit URL access to scripts/files in AWStats directory.
<Directory “awstats/wwwroot”>
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName “Apache AWstat Access”
AuthType Basic
AuthUserFile awstats/awstats.users
Require valid-user

7) Then successfully run awstats/wwwroot/cgi-bin/ -update

8) Run awstats/tools/ -update -awstatsprog=awstats/wwwroot/cgi-bin/ -dir=awstats/data(Optional)

9) Now hit


Rebuilding solaris corrupted boot archive

September 27, 2010

The problem was due to the corrupted boot-archive as a result of hard reboot or power failure. which I rebuilt through failsafe mode. Here is what I did

1. Boot into failsafe through console.
2. Let system to probe / and mount it to /a
3. cd  /a/platform/i86pc
4. mv  boot_archive boot_archive.crash
5. cd
6. bootadm update-archive -f -R  /a               ; this takes few minutes and recreates the boot_archive

7. reboot

These are the actual steps that helped to bring back the box.

Allowing traffic on a paricular host for a differnet network.

September 10, 2010

Consider you have two networks – and Both reside behind firewall ( a gateway machine actually ).Now you want to allow everyone of to listen on only The steps are –

Basically you have to apply both way traffic with iptables on the gateway machine of network.

iptables -R FORWARD 1 -i eth0 -s  -d -j ACCEPT

iptables -R FORWARD 2 -i eth1 -s -d -j ACCEPT

Here, is the ip of gateway machine of 192.168 2.0/24 network.
Please make sure the correct interface ( ethN ) for in and out traffic of every host.

You can use the tcpdump command to verify the traffic flow working or not or where packets reject.

tcpdump -ni eth1 icmp