Validate your self-created SNMP MIB

Posted by: gdelmatto  :  Category: Bits and Bytes, Memos

So, if you ever need to create your own SNMP MIB and are not relying on any given tools (i.e. you’re so crazy to write it on your own in a text editor), you may still want to validate it afterwards.

Here’s a nice web-based validator, that does the trick for you:

Notify me if IP is propagated in DNS

Posted by: gdelmatto  :  Category: Memos

So here’s my short snipped of a bash shell loop I hacked up.
It’s only purpose is to check in DNS repeatedly if a certain IP address is propagated for a given fully qualified domain name.

If the script sees the IP address, it would “ring the bell” and exit, otherwise it sleeps for a while and repeats the check.

This way I could leave it running in the console and – whenever the IP appeared in DNS – I’d get an audible alert.
No big trick after all 😉

Here’s the code:

$ while [ : ] ; do echo scanning ... ; dig @DNSSERVER FQDN | grep IPADDR && { echo -e "\a"; break; } || sleep 5;   done

And here’s what it looks like in action:

scanning ...
scanning ...
scanning ...
scanning ...
scanning ...
scanning ...
my-cool-fqdn.some.domain.tld. 3600 IN	A
[you would hear a "bing" tone at this point as well]

Searching LDAP via CLI

Posted by: admin  :  Category: Memos

Just a reminder to myself on how to search an LDAP directory via CLI.

The CN hierarchy is likely to be different with your environment.

ldapsearch -b dc=users,dc=acme,dc=net -w PASSWORD -D cn=BINDUSER,dc=users,dc=acme,dc=net '(&(uid=SEARCHSTRING))'

‘ldapsearch’ is part of openldap.