Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Dec 2002 13:20:41 -0600
From:      "Jack L. Stone" <jackstone@sage-one.net>
To:        "bowen" <b0w3n@attbi.com>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: rc.firewall/ipfw/nat
Message-ID:  <3.0.5.32.20021208132041.01194730@mail.sage-one.net>
In-Reply-To: <018801c29ee6$302e42c0$020aa8c0@morpheous>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:18 AM 12.8.2002 -0700, bowen wrote:
>Hi all need a little help ,)
>
>what I currently have
>internet --- cable modem(via DHCP) ---[ed0 Smoothwall0.9.9se ed1] ---
>10/100Switch --- int network
>
>what I want to have
>internet --- cable modem --- [ "dc0"{FreeBSD4.7-RELEASE}"dc1"]-----
>10/100Switch ---- internal network
>
># set these to your outside interface network and netmask and ip
>oif="dc0"
>onet="?.?.?.?" <----- DHCP -- how do I set this value?
>omask="???.???.???.?" DHCP again
>oip="??.??.??" DHCP
>
># set these to your inside interface network and netmask and ip
>iif="dc1"
>inet="192.168.10.0/24"
>imask="255.255.255.0"
>iip="192.168.10.1/24"
>
>then in the services
>natd        6668/divert
>or is it
>natd         8868/divert
>or does it matter?
>
>I've been trying to do this both with ipfilter and ipfirewall via various
>how to's found googling and the book The Complete BSD 3rd Edition but I just
>can't seem to get it to work.. any help would be greatly appreciated
>
>Thanks to all of you
>
>Rick
>

Well, here is a little help as you request:

On your outside interface, since it is dynamic, the IP may change I suppose
rather than be static... (never used a cable). These lines will interrogate
your actual settings for the dc0 interface each time:

# onet=`ifconfig dc0 | awk '/inet / {print $4}'`
# omask=`ifconfig dc0 | awk '/netmask / {print $6}'`
# oip=`ifconfig dc0 | awk '/inet / {print $2}'`

For your inside interface, this will work:
# inet="192.168.10.0"
# imask="255.255.255.0" (or - "0xffffff00")
# iip="192.168.10.1"

As for divert, I believe that should be 8668.

I think that should do it....


Best regards,
Jack L. Stone,
Administrator

SageOne Net
http://www.sage-one.net
jackstone@sage-one.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20021208132041.01194730>