Hưng Thịnh
New member
How do I enable a specific port in Linux?
Answer
To open a specific range of ports, use the
syntax sudo ufw allow 6000:6007/tcp, replacing 6000:6007 with the actual range. If the range is UDP ports, replace tcp with udp . To specify an IP address that can access the port, use this syntax: sudo ufw allow from 10.0. 0.1 to any port 22 .
Answer
To open a specific range of ports, use the
syntax sudo ufw allow 6000:6007/tcp, replacing 6000:6007 with the actual range. If the range is UDP ports, replace tcp with udp . To specify an IP address that can access the port, use this syntax: sudo ufw allow from 10.0. 0.1 to any port 22 .