Daesden,


first off, since from your description your "modem" is terminating
your DSL line and providing you a number of other functions (e.g.
DHCP client and NAT for other internal PC's) i think what you may
have in your hands is a "broadband DSL router", not a DSL modem.
so it in fact is doing a lot of the common functionality that a
SOHO (small office/home office) application requires.

if you are *only* trying to protect the ipfliter box, then you can
do as follows

(config A)

  dhcp    192.168.0.1        ]----- [PC1] 192.168.0.2
----[dsl router]---------[hub]----- [PC2] 192.168.0.3
                             ]----- [ipf box] 192.168.0.4

configuring the interface and routing on the ipf box is very simple:
# ifconfig if0 192.168.0.4 netmask 255.255.255.0
# route add default 192.168.0.1

the rules on the ipf box should reflect 192.168.0.4 as the outside
IP address.  the rules are straightforward, and you will only use
ipnat to handle ftp proxy issues.

advantages of this setup:
  -DSL router handles DHCP, so your ipf box addresses stay fixed
   as do your ipf rules.
  -DSL router serves DHCP addresses to client PC's, no fuss no muss.
disadvantages of this setup
  -the ipf box protects itself, but nothing else.

the setup you may ultimately want, if i understand your question
correctly *AND* you want to use your ipfilter box as your border
router/firewall, is as such:

(config B)

dhcp    192.168.1.1    192.168.0.1   ]----- [PC1] 192.168.0.2
--[dsl router]------[ipf box]----[hub]----- [PC2] 192.168.0.3
                192.168.1.2          ]----- [PCn]

=== OR / OR / OR ===

(config C)

              dhcp   192.168.0.1     ]----- [PC1] 192.168.0.2
--[dsl modem]---[ipf box]--------[hub]----- [PC2] 192.168.0.3
                                     ]----- [PCn]

in (B),
the dsl router terminates the DSL line, obtains a DHCP address
from your service provider, and configures a /24 network on the
LAN port.  that /24 network you use as a "transit net" -- it
only serves to get traffic between two routers, namely the ipf
box and the dsl router.  you could make the transit net a lot
smaller from a subnet mask perspective but it's not necessary
as you are using plentiful RFC1918 "private" addresses.

configuring the interface and routing on the ipf box is again
very simple; just have to deal with two intefaces and enabling
routing as well:
# ifconfig if0 192.168.1.2 netmask 255.255.255.0  # outside
# ifconfig if1 192.168.0.1 netmask 255.255.255.0  # inside
# route add default 192.168.0.1
# /usr/sbin/ndd -set /dev/ip ip_forwarding 1    # solaris syntax

the rules on the ipf box should reflect 192.168.1.2 as the outside
IP address.  the rules are a little more complicated, since the
box is now routing and also perhaps NATing as well.  you will need
to configure the ftp proxy to assist clients behind the ipf box.
on the router, if you are NOT doing NAT on the ipf box, you will
need to set up a static route so that the "hidden" 192.168.0.0/24
network can be reached by the router.  the gateway for that net,
from the router's perspective, is the ipf box (192.168.1.2).

advantages of this setup:
  -DSL router handles PPPoE and DHCP, so your ipf box addresses
   stay fixed as do your ipf rules.
  -with the ipf box in place, you can set up client access rules
   or even a transparent http proxy/cache, among other things.
  -quick recovery from ipf box problems (*see comment at end*)
disadvantages of this setup
  -ipf box must serve up DHCP addresses to clients.
  -router has to be configured to forward ports to ipf box.
  -router+ipf NAT combo sometimes perplexes interal FTP clients.
  -no network if ipf box is down.
  -there is a disk in the way of your network connectivity.

in (C),
the dsl *modem* terminates the DSL line.  your ipf box has to
terminate whatever line protocol is there (generally PPPoE in
the USA), obtain a DHCP lease, configure the interface as such,
and reload the ipf ruleset.

advantages of this setup:
  -less equipment
  -with the ipf box in place, you can set up client access rules
   or even a transparent http proxy/cache, among other things.
disadvantages of this setup
  -somewhat complicated setup of PPPoE interface.
  -dynamic address means ipf rules are trickier/need reloading
  -ipf box must serve up DHCP addresses to clients.
  -REALLY no network if ipf box is down. (*see comment at end*)
  -there is a disk in the way of your network connectivity.



at home, i do (B).  it works for me.  if my ipf box crashes i
just plug the network hub into a small hub that is located on
the transit net.  reboot PC's, they get DHCP address from the
DSL router, and the network is back up while i work on fixing
the ipf box.

jim



Daesden Arevir wrote:

Hello Mailing List Readers,

I've been searching the Archived Mailing List to see if a poster has described my main doubt, found a few references, but none conclusive.

I have a DSL modem at home which my Phone Company provides. The company provides a public ip address through DHCP to the modem and renews leases every six hours. The modem has an Ethernet port which I connect to a HUB and finally to my internal network.

The doubt comes when all the examples I've found assumes the IPFilter box has a public IP address and the rules are built down from that assumption. In my internal network setup the IPFilter box's "untrusted" interface is connected to the hub, which connects to the ethernet port of the modem, using a private IP address: 192.168.x.x. From my googling and testing the only way I can use the modem to go through to the internet is by setting on the IPFilter box the default gateway pointing to the ethernet port of the modem. Then from there using the following rule to let clients, connected to the "trusted" interfaces, and IPFilter box to see the modem and pass through to the Internet.

## vr0 - 192.168.1.2, outside interface.
## 192.168.1.1, default gateway.

pass out quick on vr0 proto tcp/udp from 192.168.1.2/32 to any keep state
pass out quick on vr0 proto icmp from 192.168.1.2/32 to any keep state

Is this a normal rule to have in an ipfilter firewall, according to my setup? Is there a better way? Is my setup limiting a proper ipfilter firewall?

Thanks for your attention,

Daesden




Reply via email to