Forward public port to localhost
Solution 1:
iptables -A INPUT -p tcp -i eth0 -s 0/0 --dport 8888 -j DROP
Replace eth0 with whatever interface you want to block connections from. If the application communicates in UDP, replace tcp with udp, or just apply both.