The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

As an Amazon Associate I earn from qualifying purchases.
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 FreeBSD as a router
Author: cranky 
Date:   14-08-00 03:28


I'm setting up a FreeBSD 4.1 box for my first time. I have 2 nic cards in it
and FreeBSD see's them just fine.I'm trying to make it act like a router.

How do I configure a nic to address the internet, and configure the other nic to
address the LAN and then route packets between them?

Can someone please point me in the correct direction, or post some links
to help on this or anything? Thanks!

- Fred Algonquin

Reply To This Message
 RE: FreeBSD as a router
Author: Stu 
Date:   14-08-00 05:48


Best thing is to use is IP_FILTER


Reply To This Message
 RE: FreeBSD as a router
Author: cranky 
Date:   14-08-00 06:00

hmm yes.. but im wondering how I go about configuring each NIC card.

Reply To This Message
 RE: FreeBSD as a router
Author: Dan Langille 
Date:   14-08-00 07:13

All of these entries are from /etc/rc.conf

change ed0 and ed1 to that appropriate to your box.

Change the IPs to that approriate to your situation

ifconfig_ed0="inet netmask" <== private net
ifconfig_ed1="inet netmask" <== internet

This allows the box to forward packets?

You will also probably want NAT.

Reply To This Message
 RE: FreeBSD as a router
Author: Marco Raposo 
Date:   14-08-00 13:47

An easy way to do that is:

cd /stand

c Configure -> 6 Networking -> etc...

Configure both interfaces and don't forget to set it as a Gateway

Reply To This Message
 RE: FreeBSD as a router
Author: David Richards 
Date:   22-08-00 11:28

I am having the same problem. I tried everything u have suggested

Reply To This Message
 RE: FreeBSD as a router
Author: elliot 
Date:   23-08-00 12:14

as a 'router' do you mean a natd machine? do you have an internal network you need to share a dsl or cable modem connection?
use /stand/sysinstall or /etc/rc.conf to assign an ip address to each.


perhaps if you explained what you were tring to do, we could help you more with it

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum