Friday, January 15, 2021

Here's a small script to build an IRR route object template. You can adjust the script based on the IRR

radb,host,arin.ripe,etc......



#!/bin/bash
#
# ALTDB prefix email generator
# requires the following details
#  1> ASN 2> Customer Name 3> prefix  in a x.x.x.x/nn format
#  please make sure you double check the prefix and query the altdb whois to ensure it does not exist

if [ -z  "$1" ]; then
  echo "Usage: altdb <origination_ASN> <CUSTOMER NAME> <prefix in    dot.dot.dot.dot/number>"
      echo "Usage: altdb 11111 CUSTOMER_NAME 169.254.0.0/16"
    exit 0
fi

# set todays date
D=`date +%Y%m%d`

# finding user name for carbon_copy
W=`whoami`

echo ""
echo "From: irr@yourdomain.com"
echo "To: auto-dbm@altdb.net"
echo "Subject: Subject: Register $3"
echo "Cc: $W@yourdomain.com"
echo " "
echo "route: $3"
echo "descr: Proxy Registration for $2"
echo "remarks: Network  route object $2"
echo "origin: AS$1"
echo "mnt-by: MAINT-OBJECTNAME"
echo "changed: irr@yourdomain.com $D"
echo "source: ALTDB"
echo "password: Sed7djejd87dkekdkdkdkdkdkd"
echo  ""
echo "send the above information  text via sendmail"




Ken Felix 

NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \