All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wilbert J. Rojas O." <sysadmin@ideay.net.ni>
To: netfilter@vger.kernel.org
Subject: MASQUERADE MAIL SERVER
Date: Thu, 23 Jul 2009 11:02:53 -0600	[thread overview]
Message-ID: <4A6897BD.8000805@ideay.net.ni> (raw)

  Hello,

My Network configuration is that:


ISP
|
|
|
|  *eth0 200.9.190.20* *eth0:1* 200.9.190.21 *eth0:2* 200.9.190.23 
*eth0:3* 200.9.190.24 *eth0:4* 200.9.190.25
LINUX BOX
|  *eth1 10.24.54.1/32*
|
|
LAN  10.24.54.0/24  gw 10.24.54.1
|
|
MAIL SERVER 10.54.24.96/32  gw 10.24.54.1



All machines to get out to INTERNET through my LINUX BOX included my 
MAIL SERVER but i want that MAIL SERVER to get out to INTERNET with IP 
Public Address different like 200.9.190.25 and my all rest network get 
out through 200.9.190.20

The rules i have applied like this but i don't know how to do that:

/sbin/iptables -t nat -A PREROUTING -i eth1 -s 10.24.54.0/255.255.255.0 
-d 0/0 -p tcp --dport 80 -j REDIRECT --to-port 8080
/sbin/iptables -t nat -A PREROUTING -i eth1 -s 10.24.54.0/255.255.255.0 
-d 0/0 -p tcp --dport 8080 -j REDIRECT --to-port 8080

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d 200.9.190.20 
--dport 25 -j DNAT --to-destination 10.24.54.96:25
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d 200.9.190.20 
--dport 110 -j DNAT --to-destination 10.24.54.96:110
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d 200.9.190.20 
--dport 143 -j DNAT --to-destination 10.24.54.96:143


Any help or suggestions ??

Regards.



================================
Ing. Wilbert José Rojas Ochoa.
Administrador de Sistemas
Ideay ~ Equipos y Sistemas.
Managua, Nicaragua.
Telf. +(505) 2277-4000 Ext: 115.
Fax   +(505) 2277-4411.
USA:  +(305) 735-8364.
Cel.  +(505) 8883-2877.
================================



-- 
================================
Ing. Wilbert José Rojas Ochoa.
Administrador de Sistemas
Ideay ~ Equipos y Sistemas.
Managua, Nicaragua.
Telf. +(505) 2277-4000 Ext: 115.
Fax   +(505) 2277-4411.
USA:  +(305) 735-8364.
Cel.  +(505) 8883-2877.
================================


             reply	other threads:[~2009-07-23 17:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 17:02 Wilbert J. Rojas O. [this message]
2009-07-23 17:40 ` MASQUERADE MAIL SERVER Jorge Dávila
2009-07-23 18:15   ` Wilbert J. Rojas O.
2009-07-23 18:27     ` Jorge Dávila
2009-07-23 18:34     ` Michele Petrazzo - Unipex
2009-07-23 18:29 ` Michele Petrazzo - Unipex

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=4A6897BD.8000805@ideay.net.ni \
    --to=sysadmin@ideay.net.ni \
    --cc=netfilter@vger.kernel.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.