How can I close external ports and stop them from responding?

Dear support team,

I created a UDP server using nrf9160 and SLM, but it seems to respond to external accesses automatically.

I don't want it to respond to ports that aren't in use. It's the same with a TCP server.

How can I close external ports and stop them from responding?

Related