Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this situation: My Debian laptop is connected to the Internet via its wlan interface through my wireless router. Recently I decided to install FreeBSD on a very old machine (a celeron 300Mhz) which has only one ethernet interface.

I can't connect this desktop (celeron) to the router (distance and cable concerns), so I was wondering how to make the Debian laptop share its Internet access with the FreeBSD desktop with a little cable.

I've read about network bridging and think I can do that on the Debian side, but I still wonder how to proceed on the FreeBSD celeron desktop. How can I let this celeron access the Internet so I can upgrade/install stuff on it?

share|improve this question
 echo 1 > /proc/sys/net/ipv4/ip_forward

or edit /etc/sysctl.conf and set 1 to the net.ipv4.ip_forward (It should be net.ipv4.ip_forward=1). This will make that change persistant after a reboot.

 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

(or you can save it in rc.local file)

eth0 - replace with your Dell Wifi port

connect the two machines with crosover LAN cable

share|improve this answer
Thanks, @jet! I can in fact edit my current firewall script and add what you suggested. But do I still have to do the bridging? (I guess I should, right?) – bododo Jan 17 '11 at 18:59
nope, that is enough – jet Jan 17 '11 at 19:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.