<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:iweb="http://www.apple.com/iweb" version="2.0">
  <channel>
    <title>Get ‘er done</title>
    <link>http://bricedruth.name/Site/Get_er_done/Get_er_done.html</link>
    <description>Tips and things I’ve figured out on being productive in life, working on the computer (OS X/Linux/Windows tips), working online (Googling effectively?), and working in productive applications.s</description>
    <generator>iWeb 3.0</generator>
    <image>
      <url>http://bricedruth.name/Site/Get_er_done/Get_er_done_files/construction.jpg</url>
      <title>Get ‘er done</title>
      <link>http://bricedruth.name/Site/Get_er_done/Get_er_done.html</link>
    </image>
    <item>
      <title>IP Aliasing on Mac OS X Leopard</title>
      <link>http://bricedruth.name/Site/Get_er_done/Entries/2007/10/31_IP_Aliasing_on_Mac_OS_X_Leopard.html</link>
      <guid isPermaLink="false">10e17cab-a38c-4933-911e-04c2dc72a48a</guid>
      <pubDate>Wed, 31 Oct 2007 22:05:38 -0500</pubDate>
      <description>&lt;a href=&quot;http://bricedruth.name/Site/Get_er_done/Entries/2007/10/31_IP_Aliasing_on_Mac_OS_X_Leopard_files/Automator.png&quot;&gt;&lt;img src=&quot;http://bricedruth.name/Site/Get_er_done/Media/object072.png&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:160px; height:163px;&quot;/&gt;&lt;/a&gt;I recently had a conversation with a Linux user regarding running multiple instances of &lt;a href=&quot;http://jboss.org/&quot;&gt;JBoss&lt;/a&gt; on a single machine. In general, this isn’t a problem, but you need to configure each instance to use different ports, or run on different interfaces. Configuring different ports is a bit of a pain, and I haven’t quite figured out how to setup “virtual” interfaces on Leopard.&lt;br/&gt;&lt;br/&gt;Enter IP aliasing. IP aliasing has been supported on OS X for a while (I found &lt;a href=&quot;http://forums.osxfaq.com/viewtopic.php?t=3846&quot;&gt;posts&lt;/a&gt; back to at least 10.2), but some things have changed in Leopard that make it useful to update some of the existing information out there. For one, the file /etc/iftab no longer exists, and niutil (another option) is no longer available, either.&lt;br/&gt;&lt;br/&gt;Bearing that in mind, what follows is actually quite simple. The sample I show is for aliasing multiple localhost interfaces (useful if you’re doing primarily local testing). The same approach can be used for “real” interfaces (Airport &amp;amp; Ethernet come to mind), but you’ll need to assign addresses manually, DHCP won’t work as far as I can tell). This is all “admin” stuff, so you’ll need admin privileges to execute these commands.&lt;br/&gt;&lt;br/&gt;The following script takes the loopback interface (lo0) down, sets up two IP aliases, then brings it back up.&lt;br/&gt;&lt;br/&gt;sudo ifconfig lo0 down&lt;br/&gt;sudo ifconfig lo0 alias 127.0.0.1 netmask 255.255.255.0&lt;br/&gt;sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.0&lt;br/&gt;sudo ifconfig lo0 up&lt;br/&gt;&lt;br/&gt;Running the following should show you two IPs for your loopback interface.&lt;br/&gt;&lt;br/&gt;MacBook2:~ bruth$ ifconfig lo0&lt;br/&gt;lo0: flags=8049&amp;lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; mtu 16384&lt;br/&gt;	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 &lt;br/&gt;	inet 127.0.0.1 netmask 0xffffff00 &lt;br/&gt;	inet6 ::1 prefixlen 128 &lt;br/&gt;	inet 127.0.0.2 netmask 0xffffff00 &lt;br/&gt;&lt;br/&gt;I haven’t yet figured out what I can edit on Leopard to make these settings stick, so instead I’ve created an Application with Automator to reconfigure the loopback interface whenever I login.&lt;br/&gt;&lt;br/&gt;You can download the &lt;a href=&quot;Entries/2007/10/31_IP_Aliasing_on_Mac_OS_X_Leopard_files/Alias%20lo0%20%28localhost%20interface%29.workflow.zip&quot;&gt;Automator workflow here (.zip)&lt;/a&gt;. Running the workflow from Automator itself doesn’t seem to work on my system - I had to save it as an Application, then run it - and that works. Not sure if the call to “System Events” to setup the sudo password is what hangs in Automator, maybe.&lt;br/&gt;&lt;br/&gt;Just Save As... an Application (save it anywhere you like), then add to your Login Items. It should prompt for your password when you login (sorry, I think this is necessary) and then reconfigure the interface. Credit goes to &lt;a href=&quot;http://aricsblog.blogspot.com/2006/09/running-shell-commands-with-automator.html&quot;&gt;Aric’s Tech Blog&lt;/a&gt; for providing the Automator skeleton to run commands with &lt;a href=&quot;http://aricsblog.blogspot.com/2006/09/running-shell-commands-with-automator.html&quot;&gt;sudo&lt;/a&gt;.</description>
      <enclosure url="http://bricedruth.name/Site/Get_er_done/Entries/2007/10/31_IP_Aliasing_on_Mac_OS_X_Leopard_files/Automator.png" length="269653" type="image/png"/>
    </item>
  </channel>
</rss>
