This is really impressive.
Since yesterday, I’ve been dealing with some strange behavior on the customer’s firewall, and honestly, it took up my entire day.
After looking into it more closely, it seemed like a NAT-related issue, so I started collecting evidence data — but the data just didn’t line up.
We’re running R81.20 in an HA setup.
For Public IP A, when checking cpview → Advanced → NAT, the utilization shows only about 62%.
However, in reality, SmartLog shows a large number of NAT Hide Failure logs.
On the other hand, Public IP B is the one that is actually causing service issues, and internal IT teams are opening tickets because of it — yet it doesn’t even appear in cpview → Advanced → NAT.
Maybe this is because SecureXL is disabled… I’m not sure, but in any case—
When searching FW logs (SmartLog) for NAT Hide Failure related to Public IP B, there are no logs at all.
But when I checked using the bash shell script you shared, the problematic IPs and the symptoms matched perfectly.
Right now, Public IP A and B are using over 70,000 and 120,000 ports respectively, so it’s clear that port exhaustion is the real issue.
Thanks to this, I now have objective evidence data that I can share with the customer.
I really think this kind of useful functionality should be built directly into the Check Point OS.
Thank you for sharing such an excellent tool.
Have a great day.
Regards,