title: Add route from single ip to localhost. OSX Mavericks
body: <p>on my MacbookPro 15'' Retina, with OSX 10.9.4, I want to be able to:
  <strong>route all single ip traffic to localhost</strong>.</p>
  
  <p>My Goal is this:</p>
  
  <p>I type http://192.168.1.54/test.html in the browser and I get what I normally get from
  http://localhost/test.html</p>
  
  <p>This is what I tried (en4 is the one I get internet connection from):</p>
  
  <pre><code>______$ sudo route add 192.168.1.54 localhost -ifp en4
  </code></pre>
  
  <p>checking the list</p>
  
  <pre><code>______$ sudo route add 192.168.1.54 localhost -ifp en4
  add host 192.168.1.54: gateway localhost
  ______$ netstat -rn
  Routing tables
  
  Internet:
  Destination        Gateway            Flags        Refs      Use   Netif Expire
  default            192.168.1.1        UGSc           42        4     en4
  127                127.0.0.1          UCS             0        3     lo0
  127.0.0.1          127.0.0.1          UH             50    15380     lo0
  ...
  192.168.1.54       127.0.0.1          UGHS            0        0     en4
  ...
  </code></pre>
  
  <p>But the ping of 192.168.1.54 isn't working</p>
  
  <p>I tried also the loopback interface with </p>
  
  <pre><code>______$ sudo route add 192.168.1.54 localhost -ifp lo0
  </code></pre>
  
  <p>getting the same result: nothing.</p>
  
  <p>I'm kind of a newbie in this stuff, so any help will be great</p>