The document presents the 'Geometric Efficient Matching Algorithm' (GEMA) for enhancing firewall packet matching efficiency, addressing challenges like firewall misconfiguration and high performance for network traffic filtering. This algorithm demonstrates improved speed and reduced space complexity when dealing with large rule sets compared to existing stateful firewall methods. Future work intends to explore its application with additional fields and for IPv6 addressing.