UFW Ubuntu Firewall: Difference between revisions

From Free Knowledge Base- The DUCK Project
Jump to navigation Jump to search
Created page with "To block a port in UFW we use ufw deny command ufw deny port/protocol Examples ufw deny 53"
 
No edit summary
Line 1: Line 1:
To block a port in UFW we use ufw deny command
To block a port in UFW we use ufw deny command
ufw deny port/protocol


ufw deny port/protocol
Examples
ufw deny 53


Examples
block specific IP address
 
The syntax is:
sudo ufw deny from {ip-address-here} to any


ufw deny 53
To block or deny all packets from 192.168.1.5, enter:
sudo ufw deny from 192.168.1.5 to any

Revision as of 12:38, 15 July 2018

To block a port in UFW we use ufw deny command

ufw deny port/protocol

Examples

ufw deny 53

block specific IP address

The syntax is:

sudo ufw deny from {ip-address-here} to any

To block or deny all packets from 192.168.1.5, enter:

sudo ufw deny from 192.168.1.5 to any