Hello all.
I need to create something like this:

/ - NIC1_PUBLIC_IP_1 ] - WWW,
EXIM ETC
--MODEM_IP -- [NIC1
\ - NIC1_PUBLIC_IP_2_ALIAS ]
COMP1
|
/
[ NIC2 - PRIVATE_IP ] ---
LAN --

\

COMP2

NIC1 is a ethernet cart with two public addresses. I want use first of them
for services like www or mail. Second one i want to use for make connection
between internet and LAN (Comp1 and Comp2 in this case).

I guess that rc.local should look like this:

gateway_enable="YES"
natd_enable="YES"
natd_program="/sbin/natd"
natd_interface="PUBLIC_IP_2_ALIAS"
defaultrouter="MODEM_IP"

firewall_enable="YES"
firewall_script="/etc/firewall"
firewall_type="OPEN"
firewall_logging="YES"
firewall_flags=""

And there is /etc/firewall file:

ipfw add 50 divert natd ip4 from PRIVATE_IP/8 to any via
NIC1_PUBLIC_IP_2_ALIAS
ipfw add 100 allow ip from any to any via lo0
ipfw add 200 deny ip from any to 127.0.0.0/8
ipfw add 300 deny ip from 127.0.0.0/8 to any
ipfw add 400 deny ip from PRIVATE_IP to any via NIC1_PUBLIC_IP_1
ipfw add 65535 allow ip from any to any

It does not work.... Could You help me with this? I'm going crazy a bit

Andrzej

P.S. Sorry for lang, I tried to be the most understandable as i can...