Archive for October, 2011

Cisco DDNS with namecheep

Posted in HowTo on 14/10/2011 by Undersys

First make sure you have correctly set up DDNS in the name cheep console.
You can test it with the following simple URL :-

http://dynamicdns.park-your-domain.com/update?host=HOSTNAME&domain=DOMAINNAME&password=PASSWORDip=IPADDRESS

Where :-
HOSTNAME = the host name of the machine eg machine.domainname.com
DOMAINNAME = the domain name eg domainname.com
PASSWORD = the API password from namecheep, not your namecheep password
IPADDRESS = IP address you want to send to namecheep

Once you get a success message back from browsing to that URL you are ready to configure the Cisco IOS.

You need to parts, one on the external interface and one to set up the DDNS provider.

First we set up the provider section :-
I use the IP address as I do not have DNS configured on the Cisco, I use an internal BIND server.
Also note :-
ip=<a> is a Cisco substition for the interface’s IP.
The “method” can be called anything you want.
I want it to update every 15 minutes hence the interval command.

# conf t
!
ip ddns update method namecheap
 HTTP
  add http://74.81.78.59/update?host=HOSTNAME&domain=DOMAINNAME&password=PASSWORD&ip=<a>
 interval maximum 0 0 15 0
!

Second part is we add it to the external interface, in my case Dialer 0.

# conf t
!
ip ddns update namecheap
!

Exit from the config syntax.
Turn on debugging :-
# debug ip ddns update

Restart the physical interface that the Dialer is bound to. FastEthernet0 in my case. :-

# clear pppoe int Fa0

Check the logs and see what happens, if you entered everything right it should be up and running.
You can also check that IOS has parsed everything right by issuing this command :-
# show ip ddns update method

Advertisements

OpenVMS remove expired licences from LMF

Posted in Code, HowTo on 06/10/2011 by Undersys

If your renewing your OpenVMS PAK’s you will need to remove the expired licences.

I found a nice DCL script for this :-
LMF clean up

Hear is the DCL script :-

$! File: LMF_CLEANUP.COM
$!
$! Procedure to remove expired keys from the LMF database.
$!
$! Use this at your own risk!
$!
$! 25-Nov-2001	J. Malmberg	Original
$!
$!===========================================================================
$!
$pid = f$getjpi("","PID")
$temp_file = "sys$scratch:lmf_cleanup_''pid'.temp"
$on control_y then goto all_exit
$!
$! Backup the LMF database in case of oops
$!-----------------------------------------
$copy/log lmf$license: sys$scratch:lmf_backup.ldb
$write sys$output "lmf$license backed up to sys$scratch:lmf_backup.ldb"
$write sys$Output "You can delete this file after verifying the cleanup."
$!
$! Dump out the LMF records
$!-------------------------
$if f$search(temp_file) .nes. "" then delete 'temp_file';*
$license list/full/out='temp_file'
$!
$today = f$cvtime("","COMPARISON","DATE")
$pak_issuer = ""
$!
$open/read/end=loop_end tf 'temp_file'
$loop:
$   read tf line_in/error=loop_end
$   line_in = f$edit(line_in,"COMPRESS,TRIM,UPCASE")
$   key = f$edit(f$element(0, " ", f$element(0, ":", line_in)),"TRIM")
$   value = f$edit(f$element(1, ":", line_in),"TRIM")
$   if key .eqs. "ISSUER"
$   then
$	pak_issuer = value
$	pak_authorization = ""
$	pak_product = ""
$	pak_producer = ""
$	pak_term = ""
$   endif
$   if key .eqs. "AUTHORIZATION" then pak_authorization = value
$   if key .eqs. "PRODUCT" then pak_product = value
$   if key .eqs. "PRODUCER" then pak_producer = value
$   if key .eqs. "PAK"
$   then
$!	write sys$output "''pak_product', Date= ''value'"
$       if value .eqs. "(NONE)" then goto loop
$	pak_term = f$cvtime(value,"COMPARISON","DATE")
$!	show sym pak_term
$!	show sym today
$	if pak_term .lts. today
$	then
$	    write sys$output "Deleting License = ''pak_product', Date= ''value'"
$	    license delete 'pak_product'/auth='pak_authorization'-
			/producer='pak_producer'
$	endif
$   endif
$   goto loop
$loop_end:
$!
$! Clean up and exit
$!----------------------
$all_exit:
$if f$trnlnm("tf", "LNM$PROCESS_TABLE", "SUPERVISOR") .nes. ""
$then
$   close tf
$endif
$!if f$search(temp_file) .nes. "" then delete 'temp_file';*
$exit


Past this into a new file and execute it. If you get a message about unrecognized verb that's ok.

OpenVMS 8.3 Starting out..

Posted in HowTo on 06/10/2011 by Undersys

When you first boot OpenVMS after the install you must enter PAK’s.
This can be done via the serial console  to get the base and network PAK’s installed. You can then later install the additional PAK’s via SSH.

The to PAK’s you need are (IA64) :-
* OPENVMS-I64-FOE
* UCX-IP-CLIENT

This will get the base system and networking online.
To register,view and edit new or existing PAK’s you can use the following command ensure you are logged in as “system”:-
$ @SYS$UPDATE:VMSLICENSE
select option “1” to add new PAK’s and use the information in the PAK file.
select option “4” to view the installed PAK’s best to select “FULL” detail.
Now that we have base line PAK’s installed lets set up the network.
Ensure you have started the que manager first.

Start the Que manager:-
$ START/QUEUE/MANAGER/NEW

You can check the Que manager via :-
$ SHOW QUEUE/MANAGER
Queue manager SYS$QUEUE_MANAGER, running, on IA64::

Use the following command to set up your network and network interfaces:-
$ @sys$startup:tcpip$startup

Start the que manager:-
$ START/QUEUE/MANAGER/NEW
You can check the cue manager via :-
$ SHOW QUEUE/MANAGER
Queue manager SYS$QUEUE_MANAGER, running, on IA64::

* To edit an existing TCP/Ip config and set DHCP client to start on boot run the TCP config again and select option 2.
$ @SYS$MANAGER:TCPIP$CONFIG

* Since HP have done a lot of work on the TCP/Ip stack you can use “ifconfig -a” to see all interfaces. Or you can use the traditiona l”SHOW INTERFACE” under the TCPIP menu.

$ ifconfig -a

IE0: flags=c63<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX>
inet 192.168.0.xxx netmask ffffff00 broadcast 192.168.0.255 ipmtu 1500

LO0: flags=100c89<UP,LOOPBACK,NOARP,MULTICAST,SIMPLEX,NOCHECKSUM>
inet 127.0.0.1 netmask ff000000 ipmtu 4096

TN0: flags=80<NOARP>

TN1: flags=80<NOARP>

or :-

$ tcpip
TCPIP> SHOW INTERFACE

Interface   IP_Addr         Network mask          Receive          Send     MTU

IE0        192.168.0.44    255.255.255.0             523            16    1500
LO0        127.0.0.1       255.0.0.0                   4             4    4096

TCPIP> exit

Now that we have the network up , ssh into the openVMS box. (ensure you started SSH in the tcp services menu) .
You will need to set  terminal type on first log in:-
$ SET TERM/VT100

Now create a file to copy the rest of the PAK’s into :-
$ edit VMS_PAKS.COM
Copy all the contents of the PAK file into this file.
save the file.

Run the DCL :-
@VMS_PAKS.COM

@SYS$UPDATE:VMSLICENSE