dslreports logo

If you don't want to purchase a second NIC, you'll have to bind two IP addresses to the same interface.

Suppose you have a single IP from your ISP. Let's say it's 192.168.1.1. Suppose your internal network uses the IP range 10.1.1.0 - 10.1.1.255 exclusive. The single NIC in your system is device "ep0".

In your /etc/rc.conf you would have:
    ifconfig_ep0="inet 192.168.1.1 netmask 255.255.255.0"
    ifconfig_ep0_alias0="inet 10.1.1.1 netmask 255.255.255.0"
    gateway_enable="YES"
    router_enable="YES"
You would then plug everything, your DSL router/bridge, all your internal network, and the FreeBSD box into the same hub. Set up your internal network (10.1.1.x) to use 10.1.1.1 as their default gateway.

This setup is not secure if you don't set up ipfw or similar. After you have filtering configured and enabled, you should be secure if you have a routed connection to the Internet. You could theoretically have trouble if your connection is bridged, or if you have a cable modem. It really depends on the characteristics of your internal network. You'll probably need NAT as well.

Note: I tested this on FreeBSD 3.4. The 4.x series should be the same, but your mileage may vary.


Expand got feedback?

by Eatmeingreek See Profile edited by hacheelle See Profile
last modified: 2001-07-02 15:17:24