Monday, March 26, 2012

In search of RARP server on MacOS

Reverse ARP server seems to be scarce. There is one on Windows, but old, so far I could only run it on Windows 2000. At a glance, it's pretty easy on MacOS, since rarpd is installed by default. However, how to make it actually reply to reverse arp request is tricky. I could not find hands-on info on the net, only rarpd man page which gives very little info on how to actually use it. One hands-on info I found was for an old version of MacOS, while I am on Snow Leopard, where access to NetInfo has been changed to using dscl instead of nicl.

 I then tried this dscl version of the above hands-on guide:
mkdir -p /private/tftpboot) ln -s /private/tftpboot /tftpboot vi /etc/ethers #/etc/ethers 00:A0:DE:30:34:4D client sudo dscl Entering interactive mode... (type "help" for commands) > -create /Local/Default/Hosts/XX:XX:XX:XX:XX:XX 12.34.56.78 > sudo /usr/sbin/rarpd -d en0 en0: c8:2a:14:d:a3:86
But it kept just saying "rarpd: got a packet" but replied not.

 I tried various things in order to fulfill the vague requirements set on rarpd manual:
Rarpd services Reverse ARP requests on the Ethernet connected to interface. Upon receiving a request, rarpd maps the target hardware address to an IP address via its name, which must be present in both the ethers(5) and hosts(5) databases. If a host does not exist in both databases, the translation cannot proceed and a reply will not be sent. Additionally, a request is honored only if the server (i.e., the host that rarpd is running on) can "boot" the target; that is, if the directory /tftpboot/ipaddr exists, where is the target IP address. In normal operation, rarpd forks a copy of itself and runs in the background. Anomalies and errors are reported via syslog(3).
I.e.,
1) IP address and its name must be present in ethers database
2) IP address and its name must be present in hosts database
3) the directory /tftpboot/ipaddr exists, where is the target IP address But to no avail. I gave up, got a Windows 2000 to run rarpd instead :(

No comments:

Post a Comment