top of page

Firewall Ports

Updated: Jul 25, 2023


Ubuntu

Turn Firewall On or Off

sudo ufw enable
sudo ufw disable

Check Firewall Ports

sudo ufw status verbose
sudo ufw app list

Open a Port

sudo ufw allow 22/tcp
sudo ufw allow from 192.168.1.10 to any port 22

Delete a Port

sudo ufw status numbered
sudo ufw delete 3
or
sudo ufw delete allow 22/tcp


Centos

Open/Close a Port

sudo firewall-cmd --zone=public --add-port=55555/tcp --permanent
sudo firewall-cmd --zone=public --remove-port=55555/tcp --permanent

sudo firewall-cmd --reload

Check Firewall Ports

sudo firewall-cmd --list-all

sudo yum install nmap
sudo nmap -n -PN -sT -sU -p- localhost

sudo yum install net-tools 
netstat -pnltu


Windows

  1. Open Windows Firewall by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type firewall, and then click Windows Firewall.

  2. In the left pane, click Advanced settings. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  3. In the Windows Firewall with Advanced Security dialog box, in the left pane, click Inbound Rules, and then, in the right pane, click New Rule.

  4. Now select port and click next, now enter your port in specific local ports OR check on All local port.

  5. Select your preferred setting on next two panel, and the last give your Inbound rule.



References:



How to Install netstat Command in Linux. https://www.tecmint.com/install-netstat-in-linux/


 
 
 

Recent Posts

See All
Harbor Install & Setup

1. Go to the Harbor releases page & Download either the online or offline installer for the version you want to install. 2. Use tar to...

 
 
 

留言


Contact Me

Tel: 678-642-8051

cspeed@jcsassoc.com

  • Google+ Long Shadow
  • LinkedIn Long Shadow
  • Facebook Social Icon
  • Twitter Long Shadow

© 2005 by Christopher Speed

Your details were sent successfully!

bottom of page