Hi dear Asher, First: Thank you TOO much for your detailed replay, its really a help! in your configurations you depend that ISP will give the BSD an IP.
But in fact, Iam using a DSL MODEM ROUTER, which will call the internet automatically, and will assign (the router) the IP 192.168.0.1 plus the real ip which ISP will give. and this Router will be connected to the FreeBSD box. This is why I'm missed, in your sweet drawing (wan nic)FreeBSD(lan nic) what the gateway should be? The router IP I assume? is it on (wan nic)? and do i need a DHCP?on xl0 ? manly im setting this configuration just to controll the network I need to block some IPs from internet and someother IPs a few ports, so im setting this BSD box because of the ipfw rules.. Can you explain it accoring to DSL MODEM ROUTER which will assign an IP automaticaly ? how we will setup the freebsd to be the main gateway for clinets? insted the router? Iam sory for the long email. VERY warm thanks for you. Marwan On Mon, 8 Dec 2003 08:47:22 -0600, Bill Asher wrote > Do you have a static IP you can use on the BSD box? Typically when > we setup DSL we take it straight from the DSL or Cable "modem" to > the BSD Box which gets assigned an IP address from the provider > either static or dynamic. You then run NATD for your internal > clients to use the FreeBSD's public IP. Like so: > > Internet --> DSL Modem --> (wan nic)FreeBSD(lan nic) --> Switch/Hub - > -> Clients > > FreeBSD IPs > Wan nic(xl0) = DHCP > Lan nic(xl1) = 10.2.2.1 > > To assign your IP addressess edit /etc/rc.conf, Heres and example using > DHCP on the wan nic: > > defaultrouter="10.2.2.1" > gateway_enable="YES" > hostname="fw01.domain.com" > ifconfig_xl0="DHCP" > ifconfig_xl1="inet 10.2.2.1 netmask 255.255.255.0" > linux_enable="YES" > sendmail_enable="YES" > sshd_enable="YES" > usbd_enable="YES" > natd_program="/sbin/natd" # path to natd, if you want a different > one. > natd_enable="YES" # Enable natd (if firewall_enable == > YES). > natd_interface="xl0" # Public interface or IPaddress to > use. natd_flags="-f /etc/natd.cf" # Additional flags for natd. > > Your clients would be setup like this: > Client 01 > IP = 10.2.2.10 > Gateway = 10.2.2.1 > DNS = Your.DNS.Server.IP > > You can run DHCP server on your FreeBSD box to hand Ips out to your > clients if you'd like, make sure you bind it to your LAN Nic of your > FreeBDS box though. > > If you have Static Ips just substitute those instead of using DHCP > for your wan nic. > > Hope this helps, this is just the way I do it. > > Let me know if you have other questions in setting this up. > > B.Asher - PND,LLC - www.protechnet.com > > -----Original Message----- > From: Marwan Sultan [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2003 10:56 AM > To: FreeBSD questions List > Subject: NATd question > > Hello Everybody, > > Im on FreeBSD 4.8-R fresh installation. > and this is the configuration i will use on my LAN > > Internet ->connected-> DSL Router -> FreeBSD box -> HUB -> LAN > > DSL Router has an IP 192.168.0.1 and the real IP too. > > FreeBSD box has 2 NIC's > My question is: > > Where and How to sign 2 IPs for 2 NICs? > > which IP the NIC connected to DSL should sign? > Which IP the NIC connected to HUB should sign? > Which of these IPs will be as gateway IP the clients will sign? > > I have read the instructions of freebsd.org, > and it says the gateway will be the BSD machine 192.168.0.1 > BUT this IP in my LAN is signed to the router automatilcaly. > > Can someone explain? advise? This machine will be only for this use. > > Thank you > -- > Marwan Sultan > > _______________________________________________ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" -- Marwan Sultan Network Administrator _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"