Step 1: Setup Two PCs connected with your DUT (device under test), in this case your CPE.
PC1 is attached to LAN side and PC2 attached on WAN side
Step 2: Assign addresses to devices.
LAN side PC, PC1 will get the address from the DHCP server insed the DUT.
configure the stative IPs on
PC2: 10.10.10.100
WAN side of DUT 10.10.10.10
Step 3: Check and confirm the connectivity by pinging PC2 from PC1
Step 4: Run the Jperf Application on PC1 and PC2
PC2 will act as server, click the server option and run it
PC1 will act as client, enter the IP of server, 10.10.10.100 and run it.
You will see the LAN-WAN throtuput of your device.
References
http://code.google.com/p/xjperf/
http://openmaniak.com/iperf.php
http://www.smallnetbuilder.com/content/view/30408/235/
http://www.smallnetbuilder.com/content/view/30418/235/
http://www.smallnetbuilder.com/content/view/30388/235/
Networks and System Administration related stuff. Linux and Windows servers administration material and tutorials.
Wednesday, February 25, 2009
Thursday, February 19, 2009
Network Monitoring using Nagios on Debian
Step 1: Installation of Nagios
nagios:/etc/nagios#apt-get install nagios-text
Step 2: Configuration
EDIT /etc/nagios/contacts.cfg AND ADD FOLLOWING
define contact{
contact_name imran
alias imran
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email imran@fizaan.com
}
EDIT /etc/nagios/contactgroups.cfg AND ADD FOLLOWING
define contactgroup{
contactgroup_name server-admin
alias Systems Administrators
members imran
}
EDIT /etc/nagios/hosts.cfg AND ADD YOUR HOSTS WHICH YOU WANT TO MONITOR
define host{
use generic-host
host_name www.fizaan.com
alias website
address 192.168.0.10
check_command check-host-alive
max_check_attempts 20
notification_interval 240
notification_period 24x7
notification_options d,u,r
}
define host{
use generic-host
host_name mail.fizaan.com
alias mail
address 192.168.0.20
check_command check-host-alive
max_check_attempts 20
notification_interval 240
notification_period 24x7
notification_options d,u,r
}
EDIT /etc/nagios/hostgroups.cfg AND ADD FOLLOWING
define hostgroup{
hostgroup_name Linux Servers
alias Servers
contact_groups server-admin
members www.fizaan.com,mail.fizaan.com
}
EDIT /etc/nagios/services AND ADD YOUR SERVICES, e.g
You cand define more than 1 service for each host.
# Service definition
define service{
use generic-service ; Name of service template to use
host_name mail.FIZAAN.com
service_description Total Processes
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 2
contact_groups server-admin
notification_interval 240
notification_period 24x7
notification_options w,u,c,r
check_command check_procs!150!200!RSZDT
}
# Service definition
define service{
use generic-service ; Name of service template to use
host_name www.fizaan.com
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups server-admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
Step 3: Check the syntex error, if every thing ok, it will show following.
nagios:/etc/nagios# nagios -v /etc/nagios/nagios.cfg
.
.
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Step 4: Restart the Nagios
nagios:/etc/nagios#/etc/init.d/nagios restart
Step 5: Open the Site and login
http://192.168.0.5/nagios/
or
http://nagios.fizaan.com/nagios/
username: nagiosadmin
password: provided during installation
Pluging Directory
Following are default plugins installed with Nagios.
nagios:/usr/lib/nagios# cd plugins/
nagios:/usr/lib/nagios/plugins# ls
check_apt check_file_age check_imap check_mrtgtraf check_oracle check_simap check_ups
check_breeze check_flexlm check-imap check_mysql check_overcr check_smtp check_users
check_by_ssh check_fping check_ircd check_mysql_query check_pgsql check_snmp check_wave
check_clamd check_ftp check_jabber check_nagios check_ping check_spop eventhandlers
check_dhcp check_game check_ldap check_nagios_db check_pop check_ssh negate
check_dig check_hpjd check_ldaps check_nntp check_procs check_ssmtp urlize
check_disk check_http check_load check_nntps check_radius check_swap utils.pm
check_disk_smb check_icmp check_log check_nt check_real check_tcp utils.sh
check_dns check_ifoperstatus check_mailq check_ntp check_rpc check_time
check_dummy check_ifstatus check_mrtg check_nwstat check_sensors check_udp
nagios:/usr/lib/nagios/plugins#
Note: Comment out the /etc/nagios/esclations.cfg file
nagios:/etc/nagios#apt-get install nagios-text
Step 2: Configuration
EDIT /etc/nagios/contacts.cfg AND ADD FOLLOWING
define contact{
contact_name imran
alias imran
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email imran@fizaan.com
}
EDIT /etc/nagios/contactgroups.cfg AND ADD FOLLOWING
define contactgroup{
contactgroup_name server-admin
alias Systems Administrators
members imran
}
EDIT /etc/nagios/hosts.cfg AND ADD YOUR HOSTS WHICH YOU WANT TO MONITOR
define host{
use generic-host
host_name www.fizaan.com
alias website
address 192.168.0.10
check_command check-host-alive
max_check_attempts 20
notification_interval 240
notification_period 24x7
notification_options d,u,r
}
define host{
use generic-host
host_name mail.fizaan.com
alias mail
address 192.168.0.20
check_command check-host-alive
max_check_attempts 20
notification_interval 240
notification_period 24x7
notification_options d,u,r
}
EDIT /etc/nagios/hostgroups.cfg AND ADD FOLLOWING
define hostgroup{
hostgroup_name Linux Servers
alias Servers
contact_groups server-admin
members www.fizaan.com,mail.fizaan.com
}
EDIT /etc/nagios/services AND ADD YOUR SERVICES, e.g
You cand define more than 1 service for each host.
# Service definition
define service{
use generic-service ; Name of service template to use
host_name mail.FIZAAN.com
service_description Total Processes
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 2
contact_groups server-admin
notification_interval 240
notification_period 24x7
notification_options w,u,c,r
check_command check_procs!150!200!RSZDT
}
# Service definition
define service{
use generic-service ; Name of service template to use
host_name www.fizaan.com
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups server-admin
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
Step 3: Check the syntex error, if every thing ok, it will show following.
nagios:/etc/nagios# nagios -v /etc/nagios/nagios.cfg
.
.
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Step 4: Restart the Nagios
nagios:/etc/nagios#/etc/init.d/nagios restart
Step 5: Open the Site and login
http://192.168.0.5/nagios/
or
http://nagios.fizaan.com/nagios/
username: nagiosadmin
password: provided during installation
Pluging Directory
Following are default plugins installed with Nagios.
nagios:/usr/lib/nagios# cd plugins/
nagios:/usr/lib/nagios/plugins# ls
check_apt check_file_age check_imap check_mrtgtraf check_oracle check_simap check_ups
check_breeze check_flexlm check-imap check_mysql check_overcr check_smtp check_users
check_by_ssh check_fping check_ircd check_mysql_query check_pgsql check_snmp check_wave
check_clamd check_ftp check_jabber check_nagios check_ping check_spop eventhandlers
check_dhcp check_game check_ldap check_nagios_db check_pop check_ssh negate
check_dig check_hpjd check_ldaps check_nntp check_procs check_ssmtp urlize
check_disk check_http check_load check_nntps check_radius check_swap utils.pm
check_disk_smb check_icmp check_log check_nt check_real check_tcp utils.sh
check_dns check_ifoperstatus check_mailq check_ntp check_rpc check_time
check_dummy check_ifstatus check_mrtg check_nwstat check_sensors check_udp
nagios:/usr/lib/nagios/plugins#
Note: Comment out the /etc/nagios/esclations.cfg file
Wednesday, February 18, 2009
Restoring Joomla Site Admin Password
Step 1: Login the site using phpmyadmin
Step 2: Select the Database
You can find you data base name, user name and password on database from configuration.php file of joomla.
Step 3: Select the Users table "jos_users", on left side of panel from the database.
Step 4: Select the Browse in middle window and edit the user name Administration, id e.g 62 by clicking the edit mark "pencil" in this case.
Step 5: In the password field, insert this value "226776f356d7ecf58b60bab12a05d38f" (without quotes), this is hashed value of joomla, new password of admin user. Be careful do not change field type.
Step 6: Press Go, make sure the save option is selected in the bottom of window.
Congratulation you new password joomla is set.
Do not forget to change the password of admin when you login.
Step 2: Select the Database
You can find you data base name, user name and password on database from configuration.php file of joomla.
Step 3: Select the Users table "jos_users", on left side of panel from the database.
Step 4: Select the Browse in middle window and edit the user name Administration, id e.g 62 by clicking the edit mark "pencil" in this case.
Step 5: In the password field, insert this value "226776f356d7ecf58b60bab12a05d38f" (without quotes), this is hashed value of joomla, new password of admin user. Be careful do not change field type.
Step 6: Press Go, make sure the save option is selected in the bottom of window.
Congratulation you new password joomla is set.
Do not forget to change the password of admin when you login.
Monday, February 16, 2009
Installation of SSL Certificates (self signed) in Debian
Step 1: Make sure that openssl is installad along with apache, otherwise
apt-get install openssl
Step 2: Install the self signed certificate
root@web:mkdir /etc/apach2/ssl
root@web:/etc/apache2/ssl# openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/certificate.pem -keyout /etc/apache2/ssl/certificate.pem
Generating a 1024 bit RSA private key
..............................++++++
.................................++++++
writing new private key to '/etc/apache2/ssl/certificate.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:NO
State or Province Name (full name) [Some-State]:Oslo
Locality Name (eg, city) []:Oslo
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Fizaan
Organizational Unit Name (eg, section) []:IT
Common Name (eg, YOUR name) []:www.fizaan.com
Email Address []:postmaster@fizaan.com
root@web:/etc/apache2/ssl# ls
certificate.pem
Step 3: Provide path to certificate in apach2 configuration file /etc/apache2/sites-available/default
ServerAdmin postmaster@fizaan.com
ServerName www.fizaan.com
ServerAlias www
DocumentRoot /var/www/site
SSLEngine on
SSLCertificateFile ssl/certificate.pem
Ste 4: Restart the apache2 and test the site
root@web:/etc/init.d/apache2 stop
root@web:/etc/init.d/apache2 start
Open browser and visit the site name www.fizaan.com, view the certificate.
These certificate the good for demo site or intranet but for commercial you should buy.
Buying Certificate from Third party
Step 1: Provide your CSR
openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr
Step 2: provide the details to third company e.g COMODO SSL, VeriSign
Step 3: After processing the third comapny shall give you back the file and place it in the path of ssl in apache2 virtualhost file.
References
http://www.debuntu.org/how-to-create-a-self-signed-certificate
https://secure.instantssl.com/products/SSLIdASignup1a
http://www.verisign.com/ssl/buy-ssl-certificates/
apt-get install openssl
Step 2: Install the self signed certificate
root@web:mkdir /etc/apach2/ssl
root@web:/etc/apache2/ssl# openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/certificate.pem -keyout /etc/apache2/ssl/certificate.pem
Generating a 1024 bit RSA private key
..............................++++++
.................................++++++
writing new private key to '/etc/apache2/ssl/certificate.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:NO
State or Province Name (full name) [Some-State]:Oslo
Locality Name (eg, city) []:Oslo
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Fizaan
Organizational Unit Name (eg, section) []:IT
Common Name (eg, YOUR name) []:www.fizaan.com
Email Address []:postmaster@fizaan.com
root@web:/etc/apache2/ssl# ls
certificate.pem
Step 3: Provide path to certificate in apach2 configuration file /etc/apache2/sites-available/default
ServerAdmin postmaster@fizaan.com
ServerName www.fizaan.com
ServerAlias www
DocumentRoot /var/www/site
SSLEngine on
SSLCertificateFile ssl/certificate.pem
Ste 4: Restart the apache2 and test the site
root@web:/etc/init.d/apache2 stop
root@web:/etc/init.d/apache2 start
Open browser and visit the site name www.fizaan.com, view the certificate.
These certificate the good for demo site or intranet but for commercial you should buy.
Buying Certificate from Third party
Step 1: Provide your CSR
openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr
Step 2: provide the details to third company e.g COMODO SSL, VeriSign
Step 3: After processing the third comapny shall give you back the file and place it in the path of ssl in apache2 virtualhost file.
References
http://www.debuntu.org/how-to-create-a-self-signed-certificate
https://secure.instantssl.com/products/SSLIdASignup1a
http://www.verisign.com/ssl/buy-ssl-certificates/
Friday, February 13, 2009
Installation of tasks (DNS, Print Server...)in Debian/Ubunt
Installation
# sudo -s
Enter passwd
# tasksel
# sudo -s
Enter passwd
# tasksel
Thursday, February 12, 2009
Redirecting URL Permanently in Apache
Step 1: Install apache if not installed;
You must have apache installed and running.
apt-get install apache2
Step 2: Just add following lines to /etc/apache2/sites-available/default file,
NameVirtualHost *
ServerName domainname.com
ServerAlias www.domainname.com
Redirect permanent / http://www.newdomainname.com/
Where 192.168.0.1 is IP of machine running apache2,
servername is name of machine
Alias can the other name of the machine.
Redirct permanent will redirect to the new domain.
Step 3: Restart the apache
/etc/init.d/apache2 restart
Step 4: Test the site
References
http://www.yolinux.com/TUTORIALS/ApacheRedirect.html
You must have apache installed and running.
apt-get install apache2
Step 2: Just add following lines to /etc/apache2/sites-available/default file,
NameVirtualHost *
ServerName domainname.com
ServerAlias www.domainname.com
Redirect permanent / http://www.newdomainname.com/
Where 192.168.0.1 is IP of machine running apache2,
servername is name of machine
Alias can the other name of the machine.
Redirct permanent will redirect to the new domain.
Step 3: Restart the apache
/etc/init.d/apache2 restart
Step 4: Test the site
References
http://www.yolinux.com/TUTORIALS/ApacheRedirect.html
Subscribe to:
Posts (Atom)