Archive for 2013

PHP Array Assignment and References

miqrogroove
2017-08-15T08:39:01+00:00

This is a quick explanation of some more referencing quirks in PHP.

Let’s say you need to store an array in a specific variable so that another variable can be freed up and overwritten with different information.  [To clarify, this array may be very large and copying it would be detrimental to performance in this particular application. For small arrays, copying and not referencing may be preferable.]

The operation for referencing the array with a new variable is quite simple:

$array_goes_here =& $need_to_free_up_this_var;

The code above will reference the array to prevent PHP from making an unnecessary copy of the whole thing.

Now here’s what you have to avoid:

$need_to_free_up_this_var = array(); /* wrong! */

Read the rest of this entry »

15 Feb 2013

Category:
Systems Engineering

Tags:

Discuss:
Comments Go Here

My New Website is CaptainsLog.aero

miqrogroove
2013-01-29T23:16:49+00:00
Screen shot of the CaptainsLog.aero website.

Official New Website

Welcome to the slightly reorganized miqrogroove.com.  This is now the home of my technical articles and some archived projects.

Please follow this link to visit CaptainsLog.aero, the new home of Robert Chapin.

That new website is devoted to aviation topics, safety, and professionalism.

You can now subscribe to both websites separately.  If you wish to continue reading my aviation articles, you will need to add a subscription for the new website.

All of the old links and addresses should still work normally.  They will forward you to a new address automatically if I moved them.

I have other aviation projects under construction already, to be announced soon at the new website.

Thank you for reading!

29 Jan 2013

Category:
Website Updates

Discuss:
Comments Go Here

How to Secure iPad VPN with Windows L2TP

miqrogroove
2013-01-15T10:30:39+00:00
VPN diagram showing both Windows and iPad remote clients.

Different protocols for different clients.

Back in August, I mentioned the importance of disabling most versions of PPTP for security reasons, and included my own tutorial for How to Secure a Windows VPN with PEAP.  That solution works great for Windows, but is not compatible with iPads.

Now I will offer a solution that works great for iPad, but may not work on Windows computers.  In addition, I will explain how to get the two solutions to work together securely so that both Windows and iPad computers will be able to connect to a Windows VPN simultaneously without using the insecure versions of PPTP.

The Layer 2 Tunneling Protocol (L2TP) is an obvious choice for the iPad because it is the only supported protocol other than the insecure PPTP option.  On the server side, however, there are some implementation nuances that could easily discourage the use of L2TP.  I took the time to research L2TP in more depth before writing this article, because I felt that a generic recommendation could leave readers totally confused about the security issues involved.  So before delving into a new tutorial, I want to explain two new concepts:  L2TP Pre-Shared Key, and L2TP NAT Traversal.

NAT Traversal could be a major concern for any L2TP implementation, because Microsoft wrote a very technical and rather intimidating knowledge base article called IPSec NAT-T is not recommended for Windows Server 2003 computers that are behind network address translators.  If you’ve seen that article, I want to assure you that the Microsoft recommendation is not relevant here.

A careful reading of the Microsoft recommendation against NAT-T will reveal that the underlying security problem with NAT-T is not a server problem but a client problem.  In other words, Microsoft recommends that Windows XP computers not attempt to use NAT-T to connect to privately-addressed servers.  The Windows 2003 server itself fully supports NAT-T out of the box and doesn’t even need to be configured to use it.  This is perfect for iPad users, because iPad also supports NAT-T out of the box, and this almost eliminates the address translation challenges of using L2TP.

Read the rest of this entry »

14 Jan 2013

Category:
Systems Engineering

Tags:
, ,

Discuss:
Comments Go Here