Friday, June 26, 2020

Add a firewall exception to a port

For windows

CentOS/Redhat:

firewall-cmd --permanent --add-port=16700/tcp
firewall-cmd --permanent --add-port=80/tcp

For Ubuntu:

ufw allow port-number/protocol
Examples
ufw allow 53
The Above rule will open both TCP and UDP port 53 to All networks.
ufw allow 22/tcp

No comments:

Post a Comment