RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • Conventions
  • OSX Howtos
  • SystemRescueCd Network boot
  •  

    Scripting DynDNS

    December 10th, 2008

    I recently needed to bulk load some entries to the DynDNS custom DNS service, I ended up using wget and a couple of bash for loops. This was the crux of it:

    To login:

    wget --keep-session-cookies \
    --save-cookies cookies.txt \
    --post-data="__login=1&username=${USERNAME}&password=${PASSWORD}" \
    https://www.dyndns.com/account/
    

    To check you are logged in:

    wget --keep-session-cookies \
    --load-cookies cookies.txt \
    https://www.dyndns.com/account/services/zones/dns/
    

    grep the page for ‘Logged’ you should see it say something like ‘Logged in user: blah’.

    Also look towards the bottom of the page for the ‘multiform’ hidden form element, you need the value which is a string, something like ‘jaoEEPpxzAhfadQZ/dpO/A341374′

    To add an entry:

    NAME=test
    IP=1.2.3.4
    MULTIFORM="jaoEEPpxzAhfadQZ/dpO/A341374"
    wget --keep-session-cookies \
    --load-cookies cookies.txt \
    --post-data="name_new=${NAME}&ttl_new=600&type_new=A&data_new=${IP}&submit=submit&multiform=${MULTIFORM}" \
    https://www.dyndns.com/account/services/zones/dns/
    

    Solaris Ping

    November 14th, 2008

    I never remember how to make Solaris ping show the time of each ping, like GNU Ping does, without any arguments the output is like:

    % ping foo
    foo is alive
    %

    If you want to see the time of each ping, use -s which makes it more like the GNU Ping you find on linux:

    % ping -s foo
    PING foo: 56 data bytes
    64 bytes from foo.somedomain.com (10.44.101.16): icmp_seq=0. time=0. ms
    64 bytes from foo.somedomain.com (10.44.101.16): icmp_seq=1. time=0. ms
    ^C
    ----foo PING Statistics----
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip (ms)  min/avg/max = 0/0/0
    %

    That is all.


    djbdns, daemontools and ucspi-tcp RPMS

    August 18th, 2008

    Every so often I need a copy of one or all of these on a new machine. I tend to normally use RPM based distros and always have issues trying to find RPMS of these packages. As a result I’ve packaged them up and put them in my svn repo.

    Feel free to checkout that directory, it includes a readme of how to build them for a system I’ve yet to need them on. replace the fc7 or el5 with something appropriate for your distribution.

    Direct download links:

    Redhat/Centos 5:

    Fedora 7:


    djbdns dnscache log converter

    August 18th, 2008

    I’ve just had to struggle with the hex ip addresses which dnscache logs, after a bit of searching I found some nice notes about the log format here thanks to Rob Mayoff.

    Finally I found this handy perl script.


    Disable Caps Lock in Windows

    December 20th, 2007

    Nice little reg hack to dsiable the Caps lock key in windows here.


    HP Compaq 6910p Notebook

    December 19th, 2007

    Laptop for reference HP Compaq 6910p Notebook

    Specs:

    • 75Gb Disk
    • 2.0 Ghz Core 2 Duo
    • 1Gb Ram

    exiqgrep - searching the eixm queue

    December 3rd, 2007

    I’ve just had to delete a bunch of messages from an Exim queue and I found this to be useful:

    # exiqgrep -f billg@microsoft.com
    

    Will print out details for any messages from that address.

    To delete any messages from a person use the f as well as the i flags to print out just the message id, this can neatly be piped to xargs:

    # exiqgrep -i billg@microsoft.com | xargs exim -Mrm
    

    Apache Allow From IP or password

    September 13th, 2007

    I can never remember the syntax to allow access to a directory from an IP or range of IP’s without a password but falling through to using a password from all other IP’s. The below works in a .htaccess file:

    AuthName "some name"
    AuthUserFile /some/htaccess.file
    AuthType Basic
    Order Allow,Deny
    Require valid-user
    Allow From 127.0.0.1
    Satisfy Any
    

    VMware any-any patch

    August 26th, 2007

    I’ve had troubles with vmware on redhat/fedora in the past. (See here or here) But I’ve now found a one stop solution to putting VMware on all things RedHat or Fedora. Follow the instructions in this VMware forum post. This has worked for me with VMware Server on Fedora 6 and 7 and also VMware Workstation 6 on Fedora 7. Thanks Petr!


    Solaris 10 restarting services

    August 21st, 2007

    To restart things run:

    # svcadm restart ssh
    

    To list the currently known svcs use:

    # svcs
    

    Sun have a nice guide here on their BigAdmin site.