Code Illusion is a personal blog, contains personal experience in programming Python, Django, HTML, javascript, jQuery, also some information on freeBSD, Ubuntu, Windows software and tools use, installation and deployment.
Sunday, August 16, 2009
Configure SSH on Cisco SW/RT
Wednesday, August 12, 2009
FreeBSD Nagios Setup
Required Packages: Apache, PHP5, GCC and GD development libs
1-Add user and group
pw groupadd nagios
adduser
Username: nagios
Full name:
Uid (Leave empty for default):
Login group [nagios]:
Login group is nagios. Invite jru into other groups? []:
Login class [default]:
Shell (sh csh tcsh zsh nologin) [sh]: zsh
Home directory [/home/nagios]:
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
.
.
OK? (yes/no): yes
adduser: INFO: Successfully added (nagios) to the user database.
Add another user? (yes/no): no
Goodbye!
---Creating group for web interface
pw groupadd nagcmd
pw groupmod nagcmd -M nagios
pw groupmod nagcmd -m www
pw groupadd root
2-Configure and install
cd /usr/ports/net-mgmt/nagios
make config
make
make install
make install-init
make install-config
make install-commandmod
3-Customaize Configuration
cd /usr/local/etc/nagios
cp cgi.cfg-sample cgi.cfg
cp nagios.cfg-sample nagios.cfg
cp resource.cfg-sample resource.cfg
cd objects
cp commands.cfg-sample commands.cfg
cp printer.cfg-sample printer.cfg
cp localhost.cfg-sample localhost.cfg
cp switch.cfg-sample switch.cfg
cp tempelates.cfg-sample tempelates.cfg
cp timeperiods.cfg-sample timeperiods.cfg
cp contacts.cfg-sample contacts.cfg
vim contacts.cfg –-**change the email address of nagiosadmin
4-Configuring web interface
cd /usr/ports/net-mgmt/nagios
make install-webconf
htpasswd -c /usr/local/etc/nagios/htpasswd.users nagiosadmin
**enter the password and remmember**
apachectl restart
5-Install nagios plugins
cd /usr/ports/net-mgmt/nagios-plugins
make config
make install
6-Configuring of apache httpd.conf
cd /usr/local/etc/apache/
vim httpd.conf
6-a-Add ScriptAlias and Alias
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/etc/nagios/htpasswd.users
Require valid-user
</Directory>
Alias /nagios /usr/local/www/data/nagios/
<Directory "/usr/local/www/data/nagios/">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/etc/nagios/htpasswd.users
Require valid-user
</Directory>
6-b-uncomment out
AddHandler cgi-script .cgi
7-Restart the Apache
apachectl restart
8-Check configuration and start nagios
cd /usr/local/etc/rc.d
--for checing the configuration use
nagios -v /usr/local/etc/nagios/nagios.cfg
--or
./nagios checkconfig
--starting nagios
./nagios start
user/password will show up. Enter the nagiosadmin as user and password you have selected befor.woooo!!
Saturday, August 8, 2009
Tor گمنامی آنلاین
برنامه مجانی و شبکه ای باز(نسل دوم آنین روتینگ ) که کمک میکند تا از حریم خصوصی افراد در مقابل سا یت هایی که تجزیه تحلیل ترافیکی میکنند دفاع کند. از این برنامه میتوان به دو صورت افزونه در فایرفاکس و برنامه مستقل استفاده نمود. برای کمک و ملحق شدن به این شبکه میتوان از هر دو حالت استفاده نمود و به عنوان یک مسیریاب در شبکه تور قرار گرفت. از مهمترین خصو صیات این روش کد شدن اطلاعات در لایههای مختلف میباشد که امنیت اطلاعات را در طول مسیر و در مسیریابها بالا می برد. از این برنامه میتوان به عنوان فیلترشکن استفاده کرد. بنابراین در ایران با استفاده از این برنامه میتوانند به فیس بوک و توییتر و دیگر سایتهای فیلتر شده دسترسی پیدا کرد. همچنین با ملحق شدن به این شبکه میتوان به گستردهتر شدن آن کمک کرد.برای اطلاعات بیشتر و دانلود میتوان از صفحه ویکی پدیا یا وب سایت تور مراجعه کرد