Setting up the CA

Follow the steps on setting up a Certificate Authority (CA) using OpenSSL.

Issuing the client certificate and private key

Once the CA has been configured, we will generate a private key and an unsigned public key digital certificate.

# openssl req -new -days 365 -newkey rsa:1024 \
-keyout sslkey.pem -out unsigned.pem

The unsigned public key digital certificate, stored in a PEM-encoded file named unsigned.pem will be sent to the CA for signing:

# openssl ca -in unsigned.pem -out cert.pem

Installing the client certificate and private key

The next step consists in installing the private key, public key digital certificate and CA public key certificate.

Linux

The private key, public key digital certificate and CA certificate files should get installed into a location where only root and wpa_supplicant can access them, for example, /etc/wpa:

# mkdir /etc/wpa
# chown root.root /etc/wpa
# chmod 700 /etc/wpa

Mac OS X

Mac OS X can only import private keys in PKCS#12 so we need to export all the previous items to a suitable format:

# openssl pkcs12 -export -in cert.pem -inkey key.pem \
-out client.p12 -name "host.domain"

Where "host.domain" denotes the FQDN of the host which this digital certificate and private key are intended for.

The output file client.p12 contains the private key and public key digital certificate. This bundle should get moved to the host using a secure distribution channel, like an SSH/SCP/SFTP session or a USB key. Also, the CA digital certificate, usually named cacert.pem, should also get copied to the host.

On Mac OS X, using the GUI, double click the cacert.pem file, and install the CA certificate into the X509Anchors keychain. This a system-wide keychain intended to store X.509 CA root digital certificates.

Next, using the GUI, double click on client.p12 file, supply the password that protects the private key stored in this file, and choose to install both the private key and public key into the login keychain. Next, make sure the private key has been installed:

Configuring the AirPort Express Wireless Access Point

Launch AirPort Admin Utility, select the desired base station and click the Configure icon from the toolbar:

Click the Change Wireless Security… button:

In this new window, fill in the information about the RADIUS server, like its IP address, shared secret and so on.

Configuring the Supplicant for WPA2 Enterprise

Linux

Create /etc/wpa_supplicant.conf using the following data:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
network={
  scan_ssid=1
  ssid="iTunes"
  proto=WPA2
  key_mgmt=WPA-EAP
  pairwise=CCMP
  group=CCMP
  ca_cert="/etc/wpa/cacert.pem"
  client_cert="/etc/wpa/cert.pem"
  private_key="/etc/wpa/key.pem"
  eap=TLS
  identity="anonymous"
}

The identity directive is required, or else the EAP-TLS negotiation will fail.

ap_scan=2 and scan_ssid=1 are needed when the Wireless Acccess Point is configured to not broadcast the ESSID.

Mac OS X

Launch Internet Connect from the Wireless menu:

If no 802.1X icon appears on the toolbar, choose File -> New 802.1X Conection…. Click the 802.1X icon. The window will look like this:

From the Configuration drop-down, select Edit Configurations…:

A window like this will open:

Fill in both the “Description” and “Wireless Network” fields with the ESSID of the Wireless network. Leave “User Name” and “Password” blanked, since we are not using password-based authentication.

From the “Authentication” listbox, clear the checkbox for all the protocols except for TLS. Select the TLS protocol and click the Configure button. A new window will open for you to select the private key that will be used for the EAP-TLS authentication mechanism:

From the drop-down listbox, select the name of the private key that matches the name of the private key installed in the previous section.

Click the Connect button. The Supplicant will authenticate against the Wireless Access Point. At this point, it is possible that Mac OS X asks confirmation for accessing the private key stored in your keychain. It is recommended to “Always Allow” the Supplicant access to the private key.

Launch System Preferences -> Network and Configure… the AirPort interface:

Click the “+” button to add a Preferred network:

Just enter the ESSID of the Wireless network and choose WPA2 Enterprise from the Wireless Security drop-down listbox. Also, make sure the Configuration field shows the name of the 802.1X configuration we created previously using Internet Connect.

Leave the rest of the fields blank, since we are not using password-based authentication.

DRM

January 28th, 2006

DRM es el acrónimo correspondiente a Digital Restrictions Management. Si lo sé, algunos dirán que DRM es el acrónimo de Digital Rights Management, pero todos sabemos que los derechos son vácuos, intangibles y difícilmente regulables y a veces conseguibles.

DRM no trata sobre derechos, sino sobre restricciones. Restricciones al contenido digital. En el mundo real, el mundo analógico, es poco factible imponer restricciones al uso o al consumo, salvo mediante leyes o reglamentos. Lo que se persigue en el mundo digital es poder limitar la libertad de acción o maniobra de un consumidor o usuario sobre un producto o contenido. La idea es que las grandes empresas de distribución de contenidos, aquellas que pretenden hacer creer al mundo que son dueñas de él cuando, en realidad, ni siquiera han sido ellas las que lo han producido (sino otros), tengan los medios para determinar qué puedo hacer yo, como consumidor, con algo que ellas me han vendido.

Un primer ejemplo sería la compra de música. Cuando yo compro una canción en la tienda de música de iTunes, obtengo un archivo digital, en formato AAC, protegido digitalmente de forma que se me impide realizar ciertas acciones, como distribuir dicho archivo a cualquiera otra persona que no haya pagado por él. Además, la canción que obtengo sólo puede ser escuchada en el ordenador en el cual fue comprada, y hasta en tres dispositivos adicionales (como un reproductor iPod o un ordenador personal). Curiosamente, se permite grabar la canción a disco compacto, sin protección alguna (el formato de CD Audio no lleva protección digital), por lo que siempre me será posible importar digitalmente la pista de audio de dicho disco compacto a un formato libre de protección digital, como OGG/Vorbis.

Un segundo ejemplo consiste en la distribución digital de documentos. Por ejemplo, escribir un documento y distribuirlo a terceros en forma de PDF, de tal manera que éstos no puedan imprimirlo, no puedan modificarlo y no puedan, a su vez, distribuirlo a otras partes. Por supuesto, siempre queda la posibilidad de mecanografiar manualmente el documento y almacenarlo en un formato libre de protección digital, como el formato OpenDocument, o hacer una fotografía o captura de pantalla, o modificar el sistema de protección digital para eliminar la protección.

Un tercer ejemplo sería la distribución digital de software de manera que, según la cantidad abonada por el consumidor, dicho software pueda ofrecer unas características u otras, y limitar, a su vez, la posibilidad de que dicho usuario haga copias adicionales o distribuya dicho software a terceros. Tal podría ser el caso del sistema operativo Mac OS X para Intel, donde Apple persigue que dicho sistema operativo sólo pueda ejecutarse en máquinas fabricadas por Apple.

DRM atenta contra los derechos morales y éticos, pone trabas al desarrollo tecnológico, supone una molestia para el usuario final y crea un desequilibrio entre consumidor y productor. El productor recibe, a cambio del producto protegido con DRM, dinero válido, de curso legal, sin ningún tipo de limitación. El consumidor recibe, a cambio, un producto limitado, con algunas (o muchas) limitaciones. Este intercambio, lejos de ser justo, es totalmente inaceptable. El productor puede utilizar el dinero reembolsado para comprar cualquier cosa: armas, comida, música almacenada en un disco compacto protegido e infectado por el rootkit de Sony, servicios sexuales, etc. El consumidor, a cambio, obtiene un producto que muy probablemente no satisfaga sus necesidades. ¿Es este modelo de negocio justo? Desde luego que no.

Por ello, si los fabricantes se empeñan en venderme productos limitados, yo estoy dispuesto a pagarles con dinero limitado. Producto DRM por dinero DRM. Cuando su producto DRM me deje de funcionar, o ya no sirva mis propósitos, el dinero con el cual yo pagué por dicho producto dejará también de ser válido (léase, de curso legal). Es justo. Lo comido por lo servido.

Experiencia

January 14th, 2006

“Nunca discutas con un idiota. Al final te hacen rebajarte a su nivel y entonces te acaban ganando debido a su mayor experiencia.”
Dicho popular

Vulgarismos

January 6th, 2006

vulgarismo.

  1. m. Dicho o frase especialmente usada por el vulgo.

Ultimamente oigo hablar y escribir a mucha gente, y una costumbre, que empieza a darse de forma habitual, es prefijar los nombres o apellidos de las personas con un artículo. Tal es el caso cuando alguien dice o escribe “voy a llamar al Carlos” o, mientras hoy leo un breve artículo digital referente a fotos digitales de alta resolución de Natalie Portman de la película Vendetta, una frase que recita “fotos digitales de alta resolución de la Portman”. Parece que es ésta una costumbre muy difundida entre algunos medios de comunicación, como la “prensa rosa”, en la que tienden a prefijar con un artículo los nombres o apellidos de los famosos.

Creo que es de consideración comentar que esta forma de hablar o escribir está considerada forma vulgar. Cuando yo estudiaba Lengua Castellana en mis viejos tiempos, el profesor indicaba que, no sólo es una forma vulgar, sino que falta al respeto por la sencilla razón de que las personas no somos cosas y, más aún, somos únicos. Por ello, aunque es correcto referirse a “la lámpara” o “la mesilla de noche”, puesto que son cosas (materiales o no), es una forma vulgar referirse “al Carlos” o “a la Portman”.

Desde aquí quisiera hacer un llamamiento al uso correcto del castellano, tanto en forma hablada como escrita. El lenguaje y la comunicación son unos de los más preciosos dones que se han otorgado al hombre. Hagamos, pues, buen uso de ellos.

When running a Linux kernel 2.6, it’s very difficult to tell network interfaces apart when they use the same driver or chipset. This can also be confusing even on systems with multiple network interfaces using different chipsets or drivers. Which one is eth0? Which one is eth1? What’s even worse is that it seems udev doesn’t always assign the same name to each network interface between reboots, so the same card sometimes is named eth0, and sometimes eth2, for example.

Fortunately, there is a way to tie each network interface card with a fixed network interface name by using udev rules.

My system has four network interfaces:

  • 2 Ethernet 3Com 3C905 10/100, using the 3c59x linux driver.
  • 1 Ethernet SMC 9452TX 10/100/1000, using the skge linux driver.
  • 1 Wireless 802.11g SMC 2835W V3, using ndiswrapper.

Let’s suppose udev has given the name eth2 to the SMC 9452TX. Now, let’s suppose we want to rename this network interface to eth0 or a more meaningful name like lan or e1000. We can write a udev rule to perform the renaming, thus making a persistent device-name association.

To write this rule, first we need to use some attribute which is unique to the device. For network devices, we can use the MAC address. Using udevinfo we can retrieve all attributes for the eth2 device:

# udevinfo -a -p /sys/class/net/eth2 looking at class device '/sys/class/net/eth2': KERNEL=="eth2" SUBSYSTEM=="net" SYSFS{addr_len}=="6" SYSFS{address}=="00:13:AA:AA:AA:AA" SYSFS{broadcast}=="ff:ff:ff:ff:ff:ff" SYSFS{carrier}=="1" SYSFS{features}=="0x1023" SYSFS{flags}=="0x1003" SYSFS{ifindex}=="4" SYSFS{iflink}=="4" SYSFS{mtu}=="1500" SYSFS{tx_queue_len}=="1000" SYSFS{type}=="1" SYSFS{weight}=="64"

SYSFS{address}=="00:13:AA:AA:AA:AA" is the udev attribute used to refer to this network interface MAC address, the SMC 9452TX that is being named eth2 by default. We can repeat this step to retrieve the attribute for every network interface for which we want to write a udev rule.

Once we’ve got all the attributes, we can place the udev rules in a file named code>/etc/udev/rules.d/99-user.rules:

KERNEL=="eth*", SYSFS{address}=="00:13:AA:AA:AA:AA", NAME="e1000" KERNEL=="eth*", SYSFS{address}=="00:04:BB:BB:BB:BB", NAME="e100" KERNEL=="eth*", SYSFS{address}=="00:04:CC:CC:CC:CC", NAME="e10"

Now, the easiest way of making these changes take effect is rebooting. Next time, udev will rename the network interfaces to e1000, e100 and e10 instead of eth0, eth1 or eth2. What’s more, now it’s easier to tell the interfaces apart from each one.

  1. Download the Java Development Kit (or Runtime Environment) for Linux, self-extracting.
  2. Edit /etc/apt/sources.list and unable universe and multiverse repositories:

    deb http://us.archive.ubuntu.com/ubuntu breezy universe multiverse
    deb http://us.archive.ubuntu.com/ubunty breezy-security universe multiverse

  3. Install java-package and build-essential packages:
    # apt-get update # apt-get install java-package build-essential
  4. Create a Debian package from the Java Linux, self-extracting file downloaded in step 1 and install the resulting package:
    $ fakeroot make-jpkg sun-j2sdk1.5_.bin $ sudo dpkg -i sun-j2sdk1.5_.deb
  5. Register the new package as the default Java environment:

    # update-alternatives --config java

  6. Define the Java-home environment variable by adding the following line into ~/.bash_profile file:

    export JAVA_HOME=/usr/lib/j2sdk1.5-sun/