Hi guys.
I'll start with saying I'm a bit new to FreeBSD, but I wanted to get to know it. And so my first project was to turn an old computer I once used as a linux firewall/gateway router into a FreeBSD firewall/gateway router. I decided to do this using a vanilla copy of FreeBSD 7.2-p2 and after reading the handbook and man pages, I decided to use a combination of ipfw and natd to accomplish what I need.
However, I've run into some serious difficulty in understanding how ipfw and natd work and therefore, only barely got it working the way I need. I basically followed the recommendations in the handbook for ipfw and natd with just enough modifications to tailor it to my needs.
But after testing some things, and doing an audit on my network, its got some strange behavior I cannot explain. They are as follows.
For one, my check-state rule seems to never apply according to the ipfw show command stats counters (unless this is by design).
And if I run a tcpdump -ni dc0 net 192.168.0.0/24 (which is the externally facing NIC and the subnet I'm using internally behind the FreeBSD firewall), I actually see traffic occasionally leaving my network with a source IP address of the original host on the LAN, YIKES!!!
Why would an otherwise stable and reliable Unix box let packets "slip" through at "random"? The only thing I can think of is my ruleset is seriously bad.
I am posting my ipfw.rules file and my natd.conf file.
Would anyone be able to guide or coach me as to why my ruleset does not work as expected?
Thanks
Sly
I'll start with saying I'm a bit new to FreeBSD, but I wanted to get to know it. And so my first project was to turn an old computer I once used as a linux firewall/gateway router into a FreeBSD firewall/gateway router. I decided to do this using a vanilla copy of FreeBSD 7.2-p2 and after reading the handbook and man pages, I decided to use a combination of ipfw and natd to accomplish what I need.
However, I've run into some serious difficulty in understanding how ipfw and natd work and therefore, only barely got it working the way I need. I basically followed the recommendations in the handbook for ipfw and natd with just enough modifications to tailor it to my needs.
But after testing some things, and doing an audit on my network, its got some strange behavior I cannot explain. They are as follows.
For one, my check-state rule seems to never apply according to the ipfw show command stats counters (unless this is by design).
And if I run a tcpdump -ni dc0 net 192.168.0.0/24 (which is the externally facing NIC and the subnet I'm using internally behind the FreeBSD firewall), I actually see traffic occasionally leaving my network with a source IP address of the original host on the LAN, YIKES!!!
Why would an otherwise stable and reliable Unix box let packets "slip" through at "random"? The only thing I can think of is my ruleset is seriously bad.
I am posting my ipfw.rules file and my natd.conf file.
Would anyone be able to guide or coach me as to why my ruleset does not work as expected?
Thanks
Sly