The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
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


Hello,

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

Arvo

Best thing is to use is IP_FILTER
http://www.freebsddiary.org/topics.php3#firewalls
http://www.freebsddiary.org/ipfilter334.html


Stu


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 192.168.1.1 netmask 255.255.255.0" <== private net
ifconfig_ed1="inet 192.168.0.20 netmask 255.255.255.0" <== internet


This allows the box to forward packets?
gateway_enable="YES"

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

./sysinstall
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

Hey
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.

gateway_enable="yes"
routed_enable="yes"

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 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 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

phorum.org