I know I can use internet sharing in macOS to share the internet connection provided to one network interface over one or more other network interfaces on my Mac. However, the feature set is VERY limited. No choice of DHCP range. No DHCP reservations. No port forwarding. etc.

MacOS Server has a DHCP server and other services, but none of them actually share the mac's internet connection in any way, nor can they be used to control or add those features to the native macOS's internet sharing feature mentioned above.

Are there any software tools, Apple or third party, that can do what internet sharing does (share my mac's internet connection out over one or more other network interfaces), but with the kind of additional features listed above?

Thanks!

---

**Update:** Thanks to the two answers so far that have pointed me to the two pf based solutions. Admittedly, I'd prefer a solution that doesn't require a virtual machine, and a solution that doesn't require command line stuff but further research has pointed me to IceFloor and Murus and a couple of other GUIs for pfctl. However, pfctl seems to be a firewall not a router, and what I want is routing. Still, I'm limited in my understanding of all this and it's possible this is what I want still because...

With some more research and I find this:

<https://developcents.com/2013/08/12/routers-switches-firewalls-differences/>

Under the Firewalls section it says "Unlike routers and switches, firewalls are network security appliances" and "... most perimeter firewalls also have routing capabilities (although that is not a requirement)."

So... I'm guessing you guys are pointing me to the pfctl firewall utility because it's one of those firewalls that has routing capabilities, meaning if I want to use it purely as a router and not use any of the firewall functionality, I will be able to do that. Is that correct? And does it have included in its routing capabilities the functionality I'm looking for as described in the original question above (specifically, choice of DHCP range, DHCP reservations, and port forwarding)?

I realize it's possible I could answer this myself with enough study of the documentation and of networking in general, but the original reason for the question is because I'm used to setting up Apple Airport base station with the Airport utility and the original question is seeking something with that kind of clarity but for setting up a Mac instead of an Airport base station to do it.

Any of that make sense and can anyone help me, given all that extra info?