sudo ufw reject 23/tcp

Category: VPS Management

sudo ufw reject 23/tcp

Reject telnet port with a refusal response

Unlike deny, which silently drops packets, reject answers with a connection-refused response so the client fails fast instead of timing out — useful on ports you want to signal as closed. Port 23 (telnet) is plaintext and should be rejected or denied on any modern server. Note the distinction when diagnosing connectivity.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.