All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danila Octavian" <octavian@service.agress.ro>
To: Jason Opperisano <Jopperisano@alphanumeric.com>,
	netfilter@lists.netfilter.org
Subject: Re: Hostname with DNAT  ? {OK}
Date: Tue, 27 Jul 2004 10:54:33 +0300	[thread overview]
Message-ID: <007101c473af$108ddc60$da0da8c0@pisic> (raw)
In-Reply-To: D5C9032B2B09C64EA2409D6214E91AC90511F6@asimail2.alphanumeric.com

I'm afraid i was not very explicit ...

I was trying to use strictly names and that's why :

I have only one public IP and 3 diferrent names. Behind the machine i have a
network with 4 servers which use that names :


Internet ---> eth0(public ip) eth1(private ip) ---> mail.server1.com
                                                                   --->
mail.server2.com
                                                                   --->
mail.server3.com

$IPTABLES -A PREROUTING -t nat -i eth0 -p tcp -d mail.server1.com --dport
25 -j DNAT --to 192.168.14.254:25
$IPTABLES -A FORWARD -i eth0 -p tcp -d mail1.server.com --dport 25 -j ACCEPT

$IPTABLES -A PREROUTING -t nat -i eth0 -p tcp -d mail.server2.com --dport
25 -j DNAT --to 192.168.14.251:25
$IPTABLES -A FORWARD -i eth0 -p tcp -d mail.server2.com --dport 25 -j ACCEPT

$IPTABLES -A PREROUTING -t nat -i eth0 -p tcp -d mail.server3.com --dport
25 -j DNAT --to 192.168.14.253:25
$IPTABLES -A FORWARD -i eth0 -p tcp -d mail.server3.com --dport 25 -j ACCEPT

I realized that iptables uses the resolved IP address but that's exactly
what i was trying to avoid.

Can that be possible ?

Thanks very much in advance,

Danila Octavian



-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
Service.Agress.Ro E-Mail Scanning Service



  reply	other threads:[~2004-07-27  7:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26 15:30 Hostname with DNAT ? {OK} Jason Opperisano
2004-07-27  7:54 ` Danila Octavian [this message]
2004-07-27  8:44   ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2004-07-26 14:40 Danila Octavian
2004-07-27 14:16 ` Bruno Negrao
2004-07-28  6:18   ` Danila Octavian

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='007101c473af$108ddc60$da0da8c0@pisic' \
    --to=octavian@service.agress.ro \
    --cc=Jopperisano@alphanumeric.com \
    --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.