All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Clayton <andrew@digital-domain.net>
To: Thomas Jacob <jacob@internet24.de>
Cc: netfilter@vger.kernel.org, Robby Workman <rw@rlworkman.net>
Subject: Re: Local to Local via firewall
Date: Fri, 31 Jul 2009 21:52:35 +0100	[thread overview]
Message-ID: <20090731215235.06a83d26@digital-domain.net> (raw)
In-Reply-To: <1249062563.27177.25.camel@enterprise.ims-firmen.de>

On Fri, 31 Jul 2009 19:49:23 +0200, Thomas Jacob wrote:

> Ah yes, the ssh  server is on a DNATed internal machine, sorry about.
> 
> In that case you need to SNAT your request to the local machine as
> well, and also keep the original DNAT rule:
> 
> So:
> 
> $IPTABLES -t nat -A PREROUTING -i eth1 -s 192.168.0.0/16 -p tcp -d
> $HOST_E --dport 22 -j DNAT --to-destination $HOST_I
> 
> +
> 
> $IPTABLES -t nat -A POSTROUTING -o eth1 -s 192.168.0.0/16 -p tcp -d
> $HOST_I --dport 22 -j SNAT --to-destination <Internal-Router-IP>
> 
> 
> should get you there.
> 
> Just tried that on a similar setup and it worked well for me, I can
> ssh to myself via the NAT router by contacting the NAT routers public
> IP ;)

Thanks again, but after trying this and numerous variations I still
can't make this work, and I've read plenty of other stuff that says to
do what you say, but no cigar :(

It's annoying and I'd like to get it working at the firewall. But for
now I think I'm going to take Robby's advice and have a look at split
views with Bind. This also does seem to be the recommended way to do it.

Still, I must have learnt something from all this! ;)

Cheers,
Andrew

  reply	other threads:[~2009-07-31 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 13:42 Local to Local via firewall Andrew Clayton
2009-07-31 16:06 ` Thomas Jacob
2009-07-31 16:24   ` Andrew Clayton
2009-07-31 16:42     ` Robby Workman
2009-07-31 17:49     ` Thomas Jacob
2009-07-31 20:52       ` Andrew Clayton [this message]
2009-08-01  3:24         ` /dev/rob0
2009-08-01 11:52         ` Thomas Jacob
2009-08-01 12:25           ` Andrew Clayton
2009-07-31 18:22     ` /dev/rob0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090731215235.06a83d26@digital-domain.net \
    --to=andrew@digital-domain.net \
    --cc=jacob@internet24.de \
    --cc=netfilter@vger.kernel.org \
    --cc=rw@rlworkman.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.