All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables equivalent of ssh local port forward.
@ 2008-04-04 23:35 Joel Pearson
  2008-04-05  0:06 ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Pearson @ 2008-04-04 23:35 UTC (permalink / raw)
  To: netfilter

Hi,

What I'm trying to do seem simple, but I haven't managed to get it to work yet.

I can get ssh to do what I want, but it seems a little excessive.

This is my working ssh command:

ssh -f -N -g -L 143:192.168.1.4:143 root@192.168.1.4 (this is run from
192.168.1.3)

Basically I'm trying to forward imap from 192.168.1.3 to 192.168.1.4,
but for when I am connecting from the 192.168.1.x network.

I can get iptables forwarding to work fine if the source address is
from the internet, well a different interface anyway.  Using a DNAT
works fine in these circumstances.  But a DNAT doesn't work to forward
within the same subnet/interface it seems.

I'm sure this possible, but I can't figure out the correct rule.

So to be really clear I want to be able to connect to port 143 on
192.168.1.3 from 192.168.1.29 (for example) and have that request
forwarded to port 143 on 192.168.1.4

Can someone point me in the right direction?

Cheers,

-Joel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-05  2:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 23:35 iptables equivalent of ssh local port forward Joel Pearson
2008-04-05  0:06 ` Jan Engelhardt
2008-04-05  0:09   ` Jan Engelhardt
2008-04-05  2:04     ` Joel Pearson
2008-04-05  0:12   ` Leonardo Rodrigues Magalhães
2008-04-05  1:08     ` Jan Engelhardt
2008-04-05  2:16     ` Joel Pearson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.