David,
I completely agree. That's what I said it would be considered an ugly hack. Your solution using iptables is probably the most efficient on Linux. On other platforms, or if we want something portable, we could use one of several small daemons that can handle this task like rinetd or redir or if want to get into trouble, a swiss army knife like netcat or socat :)
http://www.boutell.com/rinetd/
http://www.bigsoft.co.uk/blog/index.php/2010/06/22/building-redir-redir-c-from-patched-sources
"Bucci, David G" <david.g.bucci@lmco.com> Wrote:
> I think what Jose said will work ... but I
don't know, seems like an "I have an stunnel hammer so everything looks like a nail" thing to me.