All of lore.kernel.org
 help / color / mirror / Atom feed
* DMZ Question
@ 2004-10-04 17:41 Deepak Seshadri
  2004-10-04 18:06 ` John A. Sullivan III
  0 siblings, 1 reply; 7+ messages in thread
From: Deepak Seshadri @ 2004-10-04 17:41 UTC (permalink / raw)
  To: netfilter
  Cc: 'Imran Bashir', 'Veena Rao',
	'Syed Amjad Ali', 'Zia Ullah'

Hello everybody,

 

 

                             --------------------------

                             |                               |     WAN
(x.x.x.58/28, default gateway - x.x.x.49)

                             |       FC2           e0
|-------------------------- ISP

             LAN         |                               |

-----------------------|  e1                         |     DMZ

    10.0.1.x            |                        e2
|--------------------------

                             |                               |

                             |-------------------------|

I have 3 computers that need to have public addresses and their IP addresses
are:

A - x.x.x.50/28, DG - x.x.x.49

B - x.x.x.51/28, DG - x.x.x.49

C - x.x.x.55/28, DG - x.x.x.49

Now the problem is I do not understand how I will give access to these PCs
from public without putting these PCs on a different subnet. Some firewalls
such as sonicwall do not require an IP for the DMZ port. You can add any
number of IPs behind the DMZ and it works. How is that done? Is it possible
with Linux?

If I connect them on the DMZ interface, should they all be put in a
different subnet, probably with /29 bit mask? If I do it this way, should I
use iptables & DNAT or should/can I use just the "routing" in linux?

If you have a better way to do it, please let me know. Any help will be
greatly appreciated.

Thank you,

Deepak Seshadri

 


^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: DMZ Question
@ 2004-10-04 18:09 Daniel Chemko
  2004-10-06  3:44 ` Deepak Seshadri
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Chemko @ 2004-10-04 18:09 UTC (permalink / raw)
  To: Deepak Seshadri, netfilter
  Cc: Imran Bashir, Veena Rao, Syed Amjad Ali, Zia Ullah

You ASCII arts looks like death!

In order to 'bind' any number of DNAT addresses to the firewall, you
have two choices.

1. Actually bind the IP address to the physical interface, such as:
	ip addr add w.x.y.z/24 dev eth1
This will then get the DNAT from iptables.
	iptables -t nat -A PREROUTING --destination w.x.y.z -j DNAT --to
${My_NEW_ADDR}

2. ProxyARP the IP address (http://www.sjdjweis.com/linux/proxyarp/):
	echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
	echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
This will then get the DNAT from iptables.
	iptables -t nat -A PREROUTING --destination w.x.y.z -j DNAT --to
${My_NEW_ADDR}


There is one to catch when doing this. If you have a single DNS source
for external and internal machines, you'll have to resolve the machine's
ip's the external IP. Netfilter will not work performing what I call
reflective nat out of the box.

I consider reflective nat to be when you want to connect to a machine on
your subnet but under a different IP address.

# You should have something like this line already
iptables -t nat -A PREROUTING --destination w.x.y.z -j DNAT --to
${My_NEW_ADDR}

# Allow traffic to bounce off the interface
iptables -A FORWARD -o ${IF_DMZ} -o ${IF_DMZ} -j ACCEPT
# Force the firewall to rewrite the source IP of the packet since
conntrack refuses to allow SRC->FW->DST->SRC flows
iptables -t nat -A POSTROUTING --destination ${My_NEW_ADDR} --source
${DMZ_NET}/${DMZ_MSK} -j SNAT --to ${FW_DMZ_IP}


^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: DMZ Question
@ 2004-10-04 18:11 Daniel Chemko
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Chemko @ 2004-10-04 18:11 UTC (permalink / raw)
  To: Daniel Chemko, Deepak Seshadri, netfilter
  Cc: Imran Bashir, Veena Rao, Syed Amjad Ali, Zia Ullah


> 2. ProxyARP the IP address (http://www.sjdjweis.com/linux/proxyarp/):
> 	echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
> 	echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
> This will then get the DNAT from iptables.
> 	iptables -t nat -A PREROUTING --destination w.x.y.z -j DNAT --to
> ${My_NEW_ADDR}

Scratch this: It only applies to bridged configurations where NAT is NOT
used...


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

end of thread, other threads:[~2004-10-06 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-04 17:41 DMZ Question Deepak Seshadri
2004-10-04 18:06 ` John A. Sullivan III
  -- strict thread matches above, loose matches on Subject: below --
2004-10-04 18:09 Daniel Chemko
2004-10-06  3:44 ` Deepak Seshadri
2004-10-06 12:02   ` John Black
2004-10-06 12:35     ` Jason Opperisano
2004-10-04 18:11 Daniel Chemko

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.