SAcPF - SSH Anycast Port Forwarding
Since I wrote my post and article on SSH Anycast Port Forwarding, a.k.a. SAcPF, I've been using it more and more prevalently at work. Last week I created a couple of scripts that combine SAcPF with OpenSSH's "LocalCommand" option to automatically launch rdesktop to automatically log in to servers, including username and password. Then today, while fighting a Novell GroupWise GWIA issue, I used SAcPF to allow me to bind GWIA's IP to localhost so that I could use Wireshark to capture SMTP traffic to / from GWIA running deep in a customers environment.
I had been doing something similar to SAcPF for quite a while, but it was not nearly as nice nor complete. Previously I would use the "ifconfig" command to add the interesting IP(s) to interface alias(es). However, using "ifconfig" required that I be mindful of what alias(es) existed. Thankfully, the "ip" command doesn't have that limitation. So I can freely "ip addr add W.X.Y.Z/32 dev lo" to my heart's content with out worrying about conflicts. Which means that I can write scripts that use SAcPF with relative easy. Further, my "ip" alias for "sudo ip", makes things all that much easier on the command line. I just have to be mindful and use the full path to "sudo" and "ip" in scripts.