Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Samuel Díaz García (ArcosCom)" <samueldg@arcoscom.com>
To: 'Jason Opperisano' <opie@817west.com>, netfilter@lists.netfilter.org
Subject: RE: Can anyone tell me how to do this?
Date: Thu, 23 Sep 2004 18:44:39 +0200	[thread overview]
Message-ID: <004301c4a18c$9ebe9500$0801010a@sdg03> (raw)
In-Reply-To: <1095956124.6715.8.camel@wolfpack.ljm.dom>

Think in that it is an internal configured SSH daemond and the administrator
don't want to modify the config because the daemon is worwing well.

The solution to open the service to another network is map the ports.

A posible solution for redirect the ssh port is (in the 10.0.0.1 machine):

1) Allow incoming SSH connexs from the 10.0.0.1 iface.
2) Redirect 10.0.0.1:22 to 172.16.12.130:22

And ... how to do this with IPTABLES?

$> iptables -t filter -A INPUT -i eth1 -d 10.0.0.1 -m tcp -p tcp --dport
22 -j ACCEPT
$> iptables -t nat -A PREROUTING -i eth1 -d 10.0.0.1 -m tcp -p tcp --dport
22 -j DNAT --to-destination 172.16.12.130:22

This add the rules at the chain tail.

Regards,

Samuel Díaz García
Director Gerente
ArcosCom Wireless, S.L.L.

mailto:samueldg@arcoscom.com
http://www.arcoscom.com
móvil: 651 93 72 48
tlfn/fax: 956 70 13 15


-----Mensaje original-----
De: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org]En nombre de Jason
Opperisano
Enviado el: jueves, 23 de septiembre de 2004 18:15
Para: netfilter@lists.netfilter.org
Asunto: Re: Can anyone tell me how to do this?


On Thu, 2004-09-23 at 11:14, Dominic Iadicicco wrote:
> yes
>
> > wrote: On Thu, 2004-09-23 at 09:22, Dominic Iadicicco wrote:
> > ok, I have another one for all.
> >
> > I have now been tring to do this:
> >
> > I have an IP, 10.0.0.1 on eth1 and an IP 172.16.12.130
> > at eth0. And heres were things get fun. I want all
> > ssh requests that go to 10.0.0.1 to get routed to
> > 172.16.12.130 just like it worked when we did it from
> > .130 to .212. (if anyone is new and doesn't what was
> > discussed yesterday, please let me know I will post
> > it.)
>
> are 10.0.0.1 and 172.16.12.130 on the same physical machine?
>
> -j

i hate answering questions with the "why don't you just do it this way"
response, but here goes...

if you have SSH connections being received on 10.0.0.1, and that machine
also has an IP of 172.16.12.130, why don't you just accept the
connections on 10.0.0.1?

-j

--
Jason Opperisano <opie@817west.com>





  reply	other threads:[~2004-09-23 16:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22 17:12 Can anyone tell me how to do this? Daniel Chemko
2004-09-23 13:01 ` Eric Ellis
2004-09-23 13:22   ` Dominic Iadicicco
2004-09-23 14:55     ` Jason Opperisano
2004-09-23 15:14       ` Dominic Iadicicco
2004-09-23 16:15         ` Jason Opperisano
2004-09-23 16:44           ` Samuel Díaz García (ArcosCom) [this message]
2004-09-23 17:28             ` Dominic Iadicicco
2004-09-23 17:48               ` Jason Opperisano
2004-09-23 18:26                 ` Dominic Iadicicco
2004-09-23 16:58           ` Dominic Iadicicco
2004-09-23 17:31             ` Jason Opperisano
2004-09-23 18:29               ` Aleksandar Milivojevic
  -- strict thread matches above, loose matches on Subject: below --
2004-09-22 17:04 Hudson Delbert J Contr 61 CS/SCBN
2004-09-22 16:59 Daniel Chemko
2004-09-22 17:29 ` Alistair Tonner
2004-09-22 14:09 Dominic Iadicicco
2004-09-22 14:25 ` Eric Leblond
2004-09-22 14:45   ` Dominic Iadicicco
2004-09-22 15:07     ` Eric Leblond
2004-09-22 15:29       ` Dominic Iadicicco
2004-09-22 14:29 ` Jason Opperisano

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='004301c4a18c$9ebe9500$0801010a@sdg03' \
    --to=samueldg@arcoscom.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=opie@817west.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox