Like the guy above, I would suggest iptables. Also if your up for another layer of security, which is always a good idea, take a look at snort. I am assuming that this is a home server type of setup. If I was you I would seperate my network so the webserver is in a DMZ. For instance My network would look something like this.
-----------
| internet |
------------______________________
| |_______ |
| | |
------------- ------------ -------------
| web server| | LAN | | VPN Pool |
------------- ------------ -------------
I would recommend doing something like this if what your doing is going to be in use for an extended period of time. I use a hardware Firebox x700 running pfsense. pfsense is much simpler to configure rules then iptables because of an existing gui. I also wrote a little tutorial on installing it on a x700, plus people in the forums are very helpful. If you have a spare box sitting around with 3 nic's you could imitate my network. The thing you have to realize when hosting stuff on your own is not just worrying about your web/db server, but your other, sometimes less updated, LAN computers.