Sharing internet connection, how?

Kilian Hagemann hagemann1 at
Tue Jan 24 08:42:36 PST 2006

On Tuesday 24 January 2006 18:19, cblasius pondered:
> Hello!
> I have two ethernet cards on my computer. The first is rl0 - with
> the adrress from my ISP (DSL 1M), and the second is vr0
> - with the address
> I want to use my computer as gateway to internet for the other
> computers in my home. How I can sharing internet connection on my
> computer to the rest computers in my home? I hve 2 computers (my and my
> wife (rl0
> Could somone help me, I'm beginner?
> I have the following rc.conf file:
> defaultrouter="vvv.vvv.vvv.vvv"
> gateway_enable="YES"
> natd_enable="YES"
> hostname="myhost"
> ifconfig_rl0="inet  netmask"
> ifconfig_vr0="inet netmask"
> linux_enable="YES"
> moused_enable="YES"
> moused_flags="-3"
> sshd_enable="YES"
> usbd_enable="YES"
> What I must to do else, because my wife could not connect to the
> internet?

Until recently I managed a very similar setup. I think all you need is

natd_flags="-log_ipfw_denied -log_denied"

The latter is just so that you can see spurious connection attempts 
in /var/log/security. Check man natd for more info.

Also, you'll have to either statically configure your wife's PC to use (or whatever), default gateway/route and proper DNS. 
Alternatively install and configure dhcpd, or, which I like more for a simple 
application like that, dnsmasq. Google will tell you more :-)

Kilian Hagemann

Climate Systems Analysis Group
University of Cape Town
Republic of South Africa
Tel(w): ++27 21 650 2748

More information about the freebsd-questions mailing list