Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: map internal ip
Date: Fri, 19 Mar 2004 19:18:05 +0000	[thread overview]
Message-ID: <200403191918.05189.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <1079722569.1980.52.camel@kaos.mpsnet.net.mx>

On Friday 19 March 2004 6:56 pm, Omar Armas wrote:

> I have the following config:
>
> (public ip)
> eth0
> Firewall
> eth1 (150.50.53.4)
>
> 148.145.133.1 (vpn router)
>
> 150.50.57.0/24
> (LAN, including a server with 150.50.57.2)
>
> *Class 150.50.57.0/24 is routed to 148.245.164.1
>
> I want that when people(from eth1 lan) goes to 150.50.53.5, be
> redirected to 150.50.57.2.
>
> I tried:
>
> iptables -t nat -A PREROUTING 150.50.53.5 -j DNAT --to-destination
> 150.50.57.2
>
> But doesn't seem to be working. Any idea if it is possible and how to do
> it?

That looks correct.   Do you have a suitable FORWARD rule to allow the 
translated packets through the firewall?

Does 150.50.57.2 know how to route the replies back again (through the 
firewall)?

How are you testing?

I'm not sure I understand the significance of the "VPN router" shown on your 
diagram with only a single IP address - can you explain further what this 
means, and what is its relevance to the setup?

Regards,

Antony.

-- 
Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-03-19 19:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19 18:56 map internal ip Omar Armas
2004-03-19 19:18 ` Antony Stone [this message]
2004-03-28 10:26   ` Mehmet AK
2004-03-19 19:21 ` map internal ip [2] Antony Stone
2004-03-19 19:42   ` Omar Armas
2004-03-19 19:52     ` Antony Stone

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=200403191918.05189.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.netfilter.org \
    /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