[buug] routing

Tony Godshall togo at of.net
Mon Nov 17 15:48:36 PST 2003


According to Aaron T Porter,
> On Mon, Nov 17, 2003 at 08:27:00AM -0800, johnd wrote:
> > box a needs to get to port 443 on box c but can only get to
> > box b (the gateway) on 7001
> > 
> > is there a way I can set this up?
> 
> 	I'd checkout iptables DNAT (Destination NAT) or possibly xinetd.

Iptables will work if you have root access on boxb.
I don't know about xinetd.

Here's a way that works without any kernel support or root
access on boxb or boxc (box a obviously does because you are
redirecting a priviledged port).

If you need end-to-end encryption:

  FWDPORT=56789 #anything unused on boxb
  boxa$ ssh -t -g -L 443:localhost:$FWDPORT -l usernameb boxb \
         ssh -t -g -L $FWDPORT:localhost:7001 -l usernamec boxc

If you don't need end-to-end encryption:

  boxa$ ssh -L 443:boxc:7001 -l usernameb boxb 

###




More information about the buug mailing list