Monday, March 11, 2013

An Issue of Resolve

Running ISC's bind can be liberating, allowing you to do interesting things, but it can also be frustrating.  I don't know that this is actually an issue with Bind, or with DNS in general.  But definitely, you can see the issues with bind.  The two most common weird issues I have run into relate to IPv6 and eDNS.  Well and primarily IPv6 and eDNS in networks not fully prepared for either (shame on me).

For IPv6 issues, really the simple answer is to turn off IPv6 on your name server.  Debian's more recent versions of bind allow for the addition of a '-4' command line flag, most easily facilitated by editing /etc/default/bind9 to add that commandline option.  You can also turn off IPv6 on the machine in question.  Or *gasp* get yourself fully on IPv6.

If the problem isn't that you are resolving IPv6 addresses that are going no where, the next likely culprit is eDNS.  eDNS and it's ilk cause larger than normal DNS response packets.  Large enough that some routers, firewalls, NAT devices, etc. don't know how to handle those packets and DNS resolution breaks.  If you have effective logging you will see messages like "success resolving 'www.facebook.com/A' (in 'facebook.com'?) after reducing the advertised EDNS UDP packet size to 512 octets"

To test where eDNS is going amiss, you can use the following commands:
dig +norec +dnssec example.com @a.root-servers.net
dig +dnssec +norec +ignore dnskey se @A.NS.se

The first tests if eDNS packets larger than 512 bytes work, while the second tests if everything can handle IP fragmentation.  If the first fails, you need to disable edns.  If the first succeeds and the second fails, you need to limit the edns packet size to prevent fragmentation.  The bind option edns-udp-size can help with both:
edns-udp-size 512; or
edns-udp-size 1460;

Friday, March 8, 2013

Linux Cheatsheet

It can be very useful to have a cheat sheet of information about a command or system you don't often use.  I have created my own cheat sheets for things like mdadm, exim, sendmail, etc.  But today on LifeHacker, a general Linux Cheat Sheet was covered.  The person who wrote it, did a great job, it is meant to be saved in your home dir and viewed via either Emacs or Vi.  Of course, you can just use more/less and it works just as well.  So onto the brilliance:

https://github.com/WilliamHackmore/linuxgems/blob/master/cheat_sheet.org.sh

Wednesday, February 13, 2013

Generate Self Signed Certificate on IIS7 with custom CommonName


It appears that generating a self signed certificate for use with IIS7 is trivial, utilizing the IIS->Server Certificates->Create Self-Signed Certificate wizard. Unfortunately, that wizard will only create a certificate with a CN of the computers FQDN according to Windows. To create on with an alternate CN:

Download the IIS 6.0 Resource Kit.
Run the installer and select to install only the SelfSSL Tool.
Look up the IIS Site ID by clicking Sites in IIS Manager
Open a command prompt and change directory into "C:\Program Files (x86)\IIS Resources\SelfSSL
Execute: SelfSSL.exe /N:CN=fqdn.com /V:1000 /S:SiteID

Verify certificate exists in IIS Manager->IIS->Server Certificates

Bind to appropriate Site.

Note: Error 0x80092023 indicates you followed other directions that stated the commandline as /N:CN:fqdn.com instead of /N:CN=fqdn.com
Expect to receive an error 0x80040154, it can be ignored.

Monday, February 4, 2013

Stupid Android Tricks

My work has an internal forum with a WYSIWYG editor. That is a step up from what it previously was, but it had Web 2.0 menus which would prevent a long hold to paste on the android. After much frustration I found out if you long hold on something instead of empty space the paste button does come up. So type a random character and press on that.

Thursday, January 17, 2013

Computer Maintenance for the "Normal" person

If you are a regular computer user, you most likely have been impacted by a computer virus and/or computer failure.  So what should you be doing to prevent that?  The two things that will help the most are keeping your computer updated and backing your computer up.

Backup is the most troubling for me personally on desktop machines.  On computers I manage at work, we use Acronis imaging software, and I am partial to that.  Of course, that software isn't free.  I now use cloud services like Google Drive and Dropbox for my personal any docs and spreadsheets I utilize outside of work, but that leaves a gaping hole for other types of data that doesn't easily fit in free cloud services.  The things I worry about are Pictures, Music, and eBooks.  For these, I manually back them up periodically, but even I have gotten burned on not remembering to do that often enough.

For software updates, there is a slightly better story.  My recommendations are mutli-pronged:

Make sure you have Windows automatic updates enabled to install new updates when needed.  Also that Microsoft Updates are checked, to update any other Microsoft products you are using.

The other major component is Ninite.com.  Ninite allows you to select various programs and do a single silent install for all of them.  While that is pretty cool by itself, it is even cooler for updates because you just keep the installer you create and every couple of weeks doubleclick on it, it will then install any updates for those pieces of software.

The Windows Update/Ninite combination will take care of about 90+% of software updates that the normal person needs to run.

Monday, January 14, 2013

ifconfig.me

Sometimes you just need an easy way to get what your external dynamic IP address is from the commandline, possibly to utilize in a script.  I have used a variety of websites that have provided this information but today I looked at ifconfig.me and it impressed me.  Not only does it provide some nice information in the default view, it provides alternate URLs for specific information.  Do you want your IP as plaintext, no html, well `curl ifconfig.me/ip`

Saturday, January 5, 2013

Wordpress JetPack Carousel Comments Cause Load

While the Wordpress Jetpack Carousel looks awesome, it just killed my site. Digging into things, the issue was caused by changing formerly static cached pages into pages that made AJAX calls to PHP to see if there were comments available.

I posted on the issues forum for Wordpress and didn't meet with much success. You can see the one response I got here.

 The AJAX calls are actually generated by javascript from the file ./wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.js. The easiest way to disable comments from causing server load is to edit the file by finding the lines:
                getComments: function( args ) {
                        if ( 'object' != typeof args )
and change them to
                getComments: function( args ) {
                    return;
                        if ( 'object' != typeof args )
which effectively disables the getComments function.