Security

A server runs a legacy application that accepts TCP connections on every port from 6000 through 6007. Which ufw command opens exactly these ports and no UDP ports?

Show the answer

Correct answerB. sudo ufw allow 6000:6007/tcp

ufw expresses a port range with a colon, and a range must name a protocol, here tcp. A hyphen is not valid range syntax. Omitting the protocol makes ufw reject the range, and the udp form opens the wrong protocol.