There’s another way: grant your java binary full network access. How to do that is described in the Openhab setup documentation.
The port forwarding section of the binding docu need to be reworked. It doesn’t work in all conditions the documented way.