Atlas
September 2nd, 2003, 21:00
Please bear with me as this story is full of twists, turns, and fun surprises for the whole family!

First, allow me to introduce into evidence the fact that I am a complete and utter *BSD newb. I consider myself fairly well-versed in general networking principles and I have several years of experience with Linux (Debian) and Windows (2000 and NT). However, as this is a FreeBSD story, we'll stick to that.

I was running a webserver from a friend of mine's dorm room at Georgia Tech (no policy against this) and it was running Win2k with IIS (I know, I know). The box was also functioning as a router using ICS so my friend's computer could sit behind it. Tech only allows one IP address per port and only one port per student. After the umteen-gazillionth patch, I decided to switch. The new bloatware Linux kernels were waaay too slow, so I decided to give FreeBSD a shot. After the initial growing pains, I began to love FreeBSD. The ports made me giddy, honestly. And, in my home test lab, routing worked perfectly with a box behind my FreeBSD server. Here is my basic home setup:

Cable modem -> LinkSys Cable/DSL router -> FreeBSD-5.1 -> TestLaptop

With that setup and gateway_enable="YES" in rc.conf, packets were routing beautifully. When I moved the box back to GaTech, packets stopped routing.

An ordinary person would have asked for help at this juncture; I decided to press on. I tried setting ipnat_enable, ipfw_enable and everything else I could find with google in rc.conf. Nothing helped.

The box behind the FreeBSD server could ping both interfaces of the BSD box but not a single hop further. The BSD server could ping anywhere, no problem.

Currently, after spending almost seven hours (!!!) working on this, I'm sitting here with my head in my hands and hoping that someone can point out what stupid mistake I made. Please let me know if there is any more information I can provide.

soup4you2
September 2nd, 2003, 21:10
here's a nice perl script that will setup a gateway for you using ipf and ipnat.. also sets up a dhcpd server for ya

http://www.roq.com/bsd/ipfilter.pl

Atlas
September 2nd, 2003, 22:03
Thank you very much, soup4you2. My friend says I can come by and try again, so I'll give this script a shot. Any idea why it would work at my house and not in the dorm room?

soup4you2
September 2nd, 2003, 22:10
really it's hard to just shoot the ball and say it's this.. really hard to tell unless i was to dig into your configuration files.

Atlas
September 3rd, 2003, 00:06
I understand; thanks for your help!