Monday, February 23, 2009

Enable and configure ssh on Cisco router

Enabling SSH on Cisco IOS

As a pre-requisite you need to set a domain name for your router.
R1(config)#ip domain-name safeer.in

Now you need to generate a host rsa key for your router.

R1(config)#crypto key generate rsa
The name for the keys will be: R1.safeer.in
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]:
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]

Now configure a few ssh options.

R1(config)#ip ssh authentication-retries 3
R1(config)#ip ssh time-out 60

Configure your terminal lines to access ssh as a transport mechanism.

R1(config)#line vty 0 4

R1(config-line)#transport input ssh telnet
R1(config-line)#end

Now save your configuration

R1#copy run start

Destination filename [startup-config]?
Building configuration...
[OK]
R1#


AAA via TACACS in Cisco

Assume that the Cisco TACACS server "Cisco Secure ACS+" is running in a Win2K3 server @ 172.16.1.11 and a user "safeer" is added in it.

First enable AAA in the router.

R1(config)#aaa new-model

Configure the authentication method.
R1(config)#aaa authentication login tac_access group tacacs+ local

R1(config)#aaa authentication login default local

Configure the tacas client to connect to server.

R1(config)#tacacs-server host 172.16.1.11 key keep_IT_secret

The problem with just enabling AAA new-model is that if you don't have local authentication configured as last login option with at least one local user-name password, you take the risk of locking yourself out of the router.

R1(config)#username jayesh password jayesh123

Now configure your terminal lines for aaa authenticated login. On your console and auxiliary lines, it is better to configure local authentication alone

R1(config)#line console 0
R1(config-line)#login authentication default
R1(config-line)#exit
R1(config)#line aux 0
R1(config-line)#login authentication default
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config-line)#login authentication tac_access
R1(config-line)#end
Now save your configuration

R1#copy run start

From R2
R2>ssh -l safeer 192.168.2.1

Thursday, February 5, 2009

Blogging from my Yahoo inbox

This is awesome, now I can post to my blog directly from my yahoo inbox. With the new WordPress Application integrated with Yahoo mail, all you need to do is enable XML RPC for your WP blog and configure it in Yahoo.

Friday, January 9, 2009

Configure ISA Server to allow FTP uplod

ISA Server by default allows only ftp read access. Even if you have written access rules to allow FTP communication, that will only let you download files, neither you will be able to upload nor create folders and files in the server.

To allow write permission for FTP, right click on the access rule which you have configured to allow FTP access. From the context menu, chose "Configure FTP". On the pop up window that comes up, untick the option "Read Only". Press OK, and click Apply to save the settings.

Now you will be able to upload files via FTP.

Friday, January 2, 2009

VirtualBox USB Proxy Service Error

I was getting this error in VirtualBox whenever I was trying to access the settings of any VM.

-----------------------------------------------------------------------------------------
Failed to access usb subsystem

Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer.

Result Code:
NS_ERROR_FAILURE (0x00004005)
Component:
Host
Interface:
IHost {f39438d7-abfd-409b-bc80-5f5291d92897}
Callee:
IMachine {ea6fb7ea-1993-4642-b113-f29eb39e0df0}

-------------------------------------------------------------------------------------------

Found out a fix for this in ubuntu forums: (Thread: http://ubuntuforums.org/showthread.php?t=918007)

safeer@linux-lp-01:/tmp$ VBOX=$(grep vboxusers /etc/group | sed 's/vboxusers:x:\(.*\):.*/\1/')
safeer@linux-lp-01:/tmp$ sudo mount -t usbfs -o devgid=$VBOX,devmode=664,nodev,noexec,nosuid none /proc/bus/usb


Make sure that VirtualBox is not running while doing this. This will fix the issue temporarily. To make it permanent mount the usbfs filessystem permanently in fstab under the group privilege of "vboxusers"

First of all, find out the gid of the group "vboxusers".
safeer@linux-lp-01:~$ grep vboxusers /etc/group|cut -d ':' -f3
130


Then mount usbfs permanently by adding this line to /etc/fstab.
safeer@linux-lp-01:~$ sudo vi /etc/fstab
Add:
none /proc/bus/usb usbfs devgid=130,devmode=664,nodev,noexec,nosuid 0 0
Please note that the devgid(=130) is the gid of vboxusers group that we collected earlier. Other options are included for security.
safeer@linux-lp-01:~$ sudo mount -a
safeer@linux-lp-01:~$ mount|grep usbfs
none on /proc/bus/usb type usbfs (rw,noexec,nosuid,nodev,devgid=130,devmode=664)

This resolved the issue.