All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlo Florendo" <carlo@hq.astra.ph>
To: George Vieira <georgev@citadelcomputer.com.au>,
	netfilter@lists.netfilter.org
Subject: Re: DNAT from an IP address that does not exist to another that exists
Date: Wed, 30 Jul 2003 12:06:26 +0800	[thread overview]
Message-ID: <008601c3564f$f2b3ca60$200aa8c0@thorin> (raw)
In-Reply-To: 09B04A55822EFF4DA48D2E0BB2941D4A0192D4@wardrive.citadelcomputer.com.au

Hello George,

Thanks a lot for this!!!!!  That was fast!!!!   I tried your first post and was about to send a follow up when you immediately sent
the modified syntax.

Everything works well now.

Thanks so much!  :-)

Best Regards,

Carlo
------
Carlo Florendo
Astra Philippines Inc.
URL: http://www.hq.astra.ph







----- Original Message -----
From: "George Vieira" <georgev@citadelcomputer.com.au>
To: "George Vieira" <georgev@citadelcomputer.com.au>; "Carlo Florendo" <carlo@hq.astra.ph>; <netfilter@lists.netfilter.org>
Sent: Wednesday, July 30, 2003 11:48 AM
Subject: RE: DNAT from an IP address that does not exist to another that exists


sorry, foot in mouth... syntax was wrong..

iptables -I PREROUTING  -t nat -s 192.168.30.0/24 -i $INTDEV -d 192.168.40.40 -j DNAT --to 192.168.30.11
iptables -I POSTROUTING -t nat -s 192.168.30.0/24 -o $INTDEV -d 192.168.30.11 -j SNAT --to 192.168.30.1

I think that's better...


Thanks,
____________________________________________
George Vieira
Systems Manager
georgev@citadelcomputer.com.au

Citadel Computer Systems Pty Ltd
http://www.citadelcomputer.com.au

Phone   : +61 2 9955 2644
HelpDesk: +61 2 9955 2698


-----Original Message-----
From: George Vieira
Sent: Wednesday, July 30, 2003 1:41 PM
To: Carlo Florendo; netfilter@lists.netfilter.org
Subject: RE: DNAT from an IP address that does not exist to another that
exists


You must

iptables -I PREROUTING  -t nat -s 192.168.30.0/24 -i $INTDEV -d 192.168.40.40 -j DNAT --to 192.168.40.40
iptables -I POSTROUTING -t nat -s 192.168.30.0/24 -d 192.168.40.40 -j SNAT --to 192.168.30.1

so basically your masquerading the internal users like you would if the server was outside, you replace the source IP with the masq
server so the 192.168.40.40 (192.168.30.11) machine knows it MUST send it back via the gateway and NOT DIRECT to the 192.168.30.X
user...




  reply	other threads:[~2003-07-30  4:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-30  3:48 DNAT from an IP address that does not exist to another that exists George Vieira
2003-07-30  4:06 ` Carlo Florendo [this message]
     [not found] <004e01c35caf$86bd4910$200aa8c0@thorin>
2003-08-07  6:55 ` Carlo Florendo
2003-08-07 12:03   ` Whit Blauvelt
  -- strict thread matches above, loose matches on Subject: below --
2003-07-30  3:40 George Vieira
2003-07-30  3:13 Carlo Florendo
2003-07-30  3:09 Carlo Florendo
2003-08-01 15:13 ` Chris Wilson

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='008601c3564f$f2b3ca60$200aa8c0@thorin' \
    --to=carlo@hq.astra.ph \
    --cc=georgev@citadelcomputer.com.au \
    --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 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.