nobaloney
NoBaloney Internet Svcs - In Memoriam †
If you're running Linux, then you can do a lot, maybe even what you want, using the iptables firewall, netfilter. But it's quite complex; whole books have been written on it, and the forum is hardly the place to teach it
.
Jeff

Jeff