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?

1 Answer 1

 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

  • 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, 2011 at 18:59
  • nope, that is enough
    – jet
    Jan 17, 2011 at 19:29

You must log in to answer this question.