All of lore.kernel.org
 help / color / mirror / Atom feed
* set up my DMZ
@ 2004-09-16 14:44 hamals
  2004-09-16 16:45 ` John A. Sullivan III
  2004-09-16 17:39 ` Jason Opperisano
  0 siblings, 2 replies; 5+ messages in thread
From: hamals @ 2004-09-16 14:44 UTC (permalink / raw)
  To: netfilter


I've a DMZ with two server, I would like to acces them 
through my iptables firewall.

IP_serve1_DMZ =192.168.2.2
IP_serve2_DMZ =192.168.2.3

IP_server1_public = x.x.x.52
IP_server2_public = x.x.x.53   (x is for privacy..)


My firewall has

eth1 internet interface = x.x.x.50
eth0 dmz interface = 192.168.2.1

I need to have my server access with their pubbic IP, but 
I've only eth1 as inteface to internet.

I read that I can't use alias in iptables rules (like 
eth1:1 etc) , then what kind of rules have I to write to 
solve my problem?

Thanks
_______________________________________
Connessione ed e-mail gratuita da 10 mb
consultabile tramite web e tramite pop.
www.infinito.it vieni a scoprire tutti 
i nostri servizi!

http://www.infinito.it/xmail



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set up my DMZ
  2004-09-16 14:44 set up my DMZ hamals
@ 2004-09-16 16:45 ` John A. Sullivan III
  2004-09-16 17:39 ` Jason Opperisano
  1 sibling, 0 replies; 5+ messages in thread
From: John A. Sullivan III @ 2004-09-16 16:45 UTC (permalink / raw)
  To: hamals; +Cc: netfilter

On Thu, 2004-09-16 at 10:44, hamals@infinito.it wrote:
> I've a DMZ with two server, I would like to acces them 
> through my iptables firewall.
> 
> IP_serve1_DMZ =192.168.2.2
> IP_serve2_DMZ =192.168.2.3
> 
> IP_server1_public = x.x.x.52
> IP_server2_public = x.x.x.53   (x is for privacy..)
> 
> 
> My firewall has
> 
> eth1 internet interface = x.x.x.50
> eth0 dmz interface = 192.168.2.1
> 
> I need to have my server access with their pubbic IP, but 
> I've only eth1 as inteface to internet.
> 
> I read that I can't use alias in iptables rules (like 
> eth1:1 etc) , then what kind of rules have I to write to 
> solve my problem?
<snip>
If I understand you correctly, simple NAT should be your answer.

iptables -t nat -A PREROUTING -d x.x.x.52 -j DNAT --to-destination
192.168.2.2 (optionally add -i eth1 to thematch if you do are not using
split DNS for any internal neworks)

You will also need filter table rules to explicitly allow the DNAT'd
traffic to pass.
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set up my DMZ
  2004-09-16 14:44 set up my DMZ hamals
  2004-09-16 16:45 ` John A. Sullivan III
@ 2004-09-16 17:39 ` Jason Opperisano
       [not found]   ` <1403218a0409190112632977da@mail.gmail.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Jason Opperisano @ 2004-09-16 17:39 UTC (permalink / raw)
  To: netfilter

On Thu, 2004-09-16 at 10:44, hamals@infinito.it wrote:
> I've a DMZ with two server, I would like to acces them 
> through my iptables firewall.
> 
> IP_serve1_DMZ =192.168.2.2
> IP_serve2_DMZ =192.168.2.3
> 
> IP_server1_public = x.x.x.52
> IP_server2_public = x.x.x.53   (x is for privacy..)
> 
> 
> My firewall has
> 
> eth1 internet interface = x.x.x.50
> eth0 dmz interface = 192.168.2.1
> 
> I need to have my server access with their pubbic IP, but 
> I've only eth1 as inteface to internet.
> 
> I read that I can't use alias in iptables rules (like 
> eth1:1 etc) , then what kind of rules have I to write to 
> solve my problem?

  ip address add x.x.x.52 dev eth1
  ip address add x.x.x.53 dev eth1

  iptables -t nat -A PREROUTING -i eth1 -d x.x.x.52 \
    -j DNAT --to-destination 192.168.2.2

  iptables -t nat -A PREROUTING -i eth1 -d x.x.x.53 \
    -j DNAT --to-destination 192.168.2.3

filter rules as necessary (remember to use the 192.168.2.x address in
your filter rules)...

HTH...

-j

-- 
Jason Opperisano <opie@817west.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Fwd: set up my DMZ
       [not found]   ` <1403218a0409190112632977da@mail.gmail.com>
@ 2004-09-19  8:12     ` Mohamed Eldesoky
  2004-09-19 13:40       ` Jason Opperisano
  0 siblings, 1 reply; 5+ messages in thread
From: Mohamed Eldesoky @ 2004-09-19  8:12 UTC (permalink / raw)
  To: Netfilter Mailing List

---------- Forwarded message ----------
From: Mohamed Eldesoky <eldesoky.lists@gmail.com>
Date: Sun, 19 Sep 2004 11:12:13 +0300
Subject: Re: set up my DMZ
To: Jason Opperisano <opie@817west.com>

On Thu, 16 Sep 2004 13:39:51 -0400, Jason Opperisano <opie@817west.com> wrote:
> On Thu, 2004-09-16 at 10:44, hamals@infinito.it wrote:
> > I've a DMZ with two server, I would like to acces them
> > through my iptables firewall.
> >
> > IP_serve1_DMZ =192.168.2.2
> > IP_serve2_DMZ =192.168.2.3
> >
> > IP_server1_public = x.x.x.52
> > IP_server2_public = x.x.x.53   (x is for privacy..)
> >
> >
> > My firewall has
> >
> > eth1 internet interface = x.x.x.50
> > eth0 dmz interface = 192.168.2.1
> >
> > I need to have my server access with their pubbic IP, but
> > I've only eth1 as inteface to internet.
> >
> > I read that I can't use alias in iptables rules (like
> > eth1:1 etc) , then what kind of rules have I to write to
> > solve my problem?
>
>   ip address add x.x.x.52 dev eth1
>   ip address add x.x.x.53 dev eth1
>

He really needs to do this step ????
The firewall is his gateway !!




> --
> Jason Opperisano <opie@817west.com>
>
>


--
Mohamed Eldesoky
www.eldesoky.net
RHCE




-- 
Mohamed Eldesoky
www.eldesoky.net
RHCE


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: set up my DMZ
  2004-09-19  8:12     ` Fwd: " Mohamed Eldesoky
@ 2004-09-19 13:40       ` Jason Opperisano
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Opperisano @ 2004-09-19 13:40 UTC (permalink / raw)
  To: netfilter

On Sun, 2004-09-19 at 04:12, Mohamed Eldesoky wrote:
> >   ip address add x.x.x.52 dev eth1
> >   ip address add x.x.x.53 dev eth1
> >
> 
> He really needs to do this step ????
> The firewall is his gateway !!

yes.  he does.  the firewall is his gateway on the inside/dmz.  these IP
aliases are on the outside, internet-facing interface.

-j

-- 
Jason Opperisano <opie@817west.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-19 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 14:44 set up my DMZ hamals
2004-09-16 16:45 ` John A. Sullivan III
2004-09-16 17:39 ` Jason Opperisano
     [not found]   ` <1403218a0409190112632977da@mail.gmail.com>
2004-09-19  8:12     ` Fwd: " Mohamed Eldesoky
2004-09-19 13:40       ` Jason Opperisano

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.