UFW ubuntu fire wall

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
UFW ubuntu fire wall

Post by Stevyn » Mon Feb 04, 2019 11:09 am

UFW ubuntu fire wall

Show firewall status including your rules:

Code: Select all

sudo ufw status numbered
delete rule number # 4:

Code: Select all

sudo ufw delete 4
block specific IP address:

Code: Select all

sudo ufw insert 1 deny from 178.137.80.191 comment 'block spammer'

Code: Select all

sudo ufw insert 1 deny from 202.54.1.0/24 comment 'Block DoS attack subnet'
reload :

Code: Select all

sudo ufw reload
To allow incoming SSH connections from a specific IP address or subnet, specify the source. For example, if you want to allow the entire 15.15.15.0/24 subnet, run this command:

Code: Select all

sudo ufw allow from 15.15.15.0/24  to any port 22
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply