All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roselyn Calleja" <rdolindo@22ban.com>
To: lartc@vger.kernel.org
Subject: [LARTC] How to use private IP on my DMZ network
Date: Fri, 04 Oct 2002 06:17:24 +0000	[thread overview]
Message-ID: <marc-lartc-103371159820937@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 2077 bytes --]

Hi everyone,

I have problems with my DMZ network. I'm using Linux with three interface (eth0, eth1,eth2). eth0 is connected to my dsl modem, eth1 is for my DMZ network where it contains all my websites, eth2 is my private network. I'm using iptables. Below is my diagram:

                                                          |-----------|       
      DSL (Internet) eth0 ------ |Firewall | -------  eth2 (Private Network)
                                                          |-----|-----|       
                                                                    | 
                                                                    |
                                                                eth1 (DMZ network)

my current set-up:

eth0 :         203.164.168.30
            gw:  203.164.168.29
            mask: 255.255.255.252

eth1:           203.164.168.161 (also the gateway of the network)
            mask:255.255.255.248 
website 1:  203.164.168.163
website 2: 203.164.168.164
website 3: 203.164.168.165             
             
I want to set-up my network like this:

eth0 : same IP
            same gateway
            same netmask

eth1 : 10.10.10.1
            gw: 10.10.10.1
website1: 10.10.10.5
website2:10.10.10.6
website3:10.10.10.7
website1 public address is 203.164.168.163
website2 public address is 203.164.168.164
website3 public address is 203.164.168.165

So my iptables looks like this:

iptables --table nat -A PREROUTING -p tcp -d 203.164.168.163 --dport 80 -j DNAT --to-destination 10.10.10.5
iptables --table nat -A PREROUTING -p tcp -d 203.164.168.164 --dport 80 -j DNAT --to-destination 10.10.10.6
iptables --table nat -A PREROUTING -p tcp -d 203.164.168.165 --dport 80 -j DNAT --to-destination 10.10.10.7

So what i mean is that any request for 203.164.168.163 to 165 would pass through my firewall then with my iptables set as such, it would be forwarded to my webserver.

Does anybody knows how to work this thing out? Is it possible? Please reply.

Thanks!

Rose




[-- Attachment #2: Type: text/html, Size: 6716 bytes --]

             reply	other threads:[~2002-10-04  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-04  6:17 Roselyn Calleja [this message]
2002-10-04  8:14 ` [LARTC] How to use private IP on my DMZ network Paul Zirnik

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=marc-lartc-103371159820937@msgid-missing \
    --to=rdolindo@22ban.com \
    --cc=lartc@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.