One of the favourite features about Junos when it comes to configuration management is the ability to manage configuration on a methodical manner. This is where the “COMMIT” configuration comes in and takes care of any unnecessary configuration mistakes which could have been made while performing a certain task.

To quote from Juniper’s website

When you commit the current candidate configuration, you can require an explicit confirmation for the commit to become permanent. This is useful if you want to verify that a configuration change works correctly and does not prevent access to the router. If the change prevents access or causes other errors, the router automatically returns to the previous configuration and restores access after the rollback confirmation timeout passes. This feature is called automatic rollback.

This feature will automatically rollback a “Candidate Configuration” unless the commit confirmed command is entered.

junos commit
[click to continue…]

{ 0 comments }

It is possible to configure WPA2 (AES-CCMP) on a Cisco 877w Router and these are the steps required to achieve them.

First of all, do make sure you have the right IOS version. This is important because some versions of the IOS does not support the latest WPA2 Key Management type along with AES-CCMP Encryption. This configuration is based on the following IOS.

Cisco IOS Software, C870 Software (C870-ADVIPSERVICESK9-M), Version 12.4(22)T5, RELEASE SOFTWARE (fc3)
c870-advipservicesk9-mz.124-22.T5.bin

[click to continue…]

{ 0 comments }

The following method can be used when a user login to a linux machine, an email will be sent with IP information.

For this to work, you need to have the program mutt installed.

Then add the following to the user’s .bashrc file, which is located in /home/$user/.bashrc

echo `who` | /usr/bin/mutt -s "SSH Alert" email@address.here

For example, if you want an email sent everytime the user root login, edit the file /home/root/.bashrc and add the above code.

{ 0 comments }

The following configuration is for BE Broadband / O2 Broadband Specific and will work with an external modem working on RFC1493 / Bridge mode.

When it comes to setting up a Cisco Router with a modem under bridge mode, you only need a Layer 3 port to configure the given IP Address. In any Layer 3 capable device, it is rather straight forward. To configure, you only needs to add the IP address, subnet mask to the interface; along with the default route to the ISP given default-gateway and it should work.

When it comes to the 877 / 877w etc, they only come with 4 Layer 2 capable switch port, therefore one needs to configure a VLAN Interface and assign one Switchport to the given VLAN as per following configuration.

You do not need to create a Dialer Interface as PPPoE/PPPoA is not involved in this configuration.

[click to continue…]

{ 0 comments }

The following two scripts on crontab will automatically back up and email the database on a timely manner. This script will work on daily backup of Blogs such as WordPress / Drupal etc

In this example, I will be using the directory /home/backup/database

It is recommended to create two different shell script named dbback.sh and dbmail.sh accordingly and set them as executables. chmod +x

The first script will backup the database using MySQLdump, then it will bzip2 the Database with the following filename database_DATE.sql.bz2

#!/bin/bash
BACKUP="/home/backup/database/database_`date +%d-%m-%Y`.sql"
/usr/bin/mysqldump -uUSERNAME -pPASSWORD --opt DATABASE > $BACKUP
/usr/bin/bzip2 $BACKUP

The second script will email the database as an attachment using mutt, to a given email address.

#!/bin/bash
/bin/echo "Backup Database for `date +%d-%m-%Y`" | /usr/bin/mutt -s "Backup Database for `date +%d-%m-%Y`" email@address.here -a /home/backup/database/database_`date +%d-%m-%Y`.sql.bz2

To make it automated, all you have to do is to add both scripts to the crontab. It is advisable to add them 10 minutes apart depending on the size of the MySQL Database. As per example below.

15 20 * * * /home/backup/script/dbbackup.sh 
25 20 * * * /home/backup/script/dbmail.sh

Be very Cautious on emailing Larger/Sensitive Database via email.

{ 1 comment }

I have presented my question to Juniper CEO Kevin Johnson and It has been answered on the first episode of 5in5.

My Question was the following and can be seen on 3:25

What is Juniper doing in the enterprise or service provider market to close the gap on Cisco?

{ 0 comments }