NBI Security on docker

currently the nbi is accepting all connections and ufw rule is not working
if any person rune http://ip:7557/devices/ he will get data of all devices
is there any way to restrict the same??
GenieACS is installed in Docker currently

Firewall rules is what you need. Port 7557 should be restricted to what ever middleware you are using to communicate with GenieACS.

can you give example ?? i want to restrict it to local host only