Shorewall makes the process fairly easy. I use it a lot.

On 08/26/2011 03:52 PM, gregrwm wrote:
> i'd like to connect to localhost:5432 (in an openvz container) and end up connected to postgres in another container.
> i'm presuming (HN) iptables magic is best.  is that right?  other better/worthwhile ways?  favorite howto/howidid pointers?
> seems easy in concept, but twiddling iptables is a bit reminiscent of pandora..
> tia,
> -g
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list