Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ufw add rule

# from anywhere
ufw allow 22
# specific client addr
ufw allow from 15.15.15.0/24 to any port 22
Comment

add ufw rule from

sudo ufw allow from 203.0.113.4 to any port 22
Comment

Ufw rules

- name: Install UFW.
  apt:
    name: ufw
    state: present
    
- name: Setup default firewall rules.
  command: "ufw {{ item }}"
  with_items: 
    - default deny incoming on eth0
    - default allow outgoing on eth0
    - default allow incoming on eth1
    - default allow outgoin on eth1
    - default allow FORWARD
    - allow ssh

- name: Set up custom firewall rules.
  command: "ufw {{ item }}"
  with_items: firewall_rules

- name: Start UFW.
  command: ufw --force enable # Force flag used to skip `are you sure` query.
Comment

PREVIOUS NEXT
Code Example
Shell :: set an editor for git 
Shell :: how to get the digit count of number swift 
Shell :: docker run commands 
Shell :: docker machine keep restarting 
Shell :: print next 10 lines after grep 
Shell :: Docker: Copying files from Docker container to host 
Shell :: samba check config 
Shell :: extract rar centos 
Shell :: git force overwrite of local files 
Shell :: npm checkup 
Shell :: react native cannot connect to metro server 
Shell :: anaconda for ubuntu 18.04 
Shell :: install nodejs via homebrew 
Shell :: pytest_check 
Shell :: linux how to execute a file 
Shell :: environment variable setup 
Shell :: git unstash 
Shell :: git initialize 
Shell :: how to setup a gitignore 
Shell :: comment copier un fichier linux 
Shell :: cp command 
Shell :: git hub 
Shell :: git create new repo from branch 
Shell :: install kubernetes ubuntu 20.04 
Shell :: how to update git password in windows 
Shell :: mac terminal curl trim response 
Shell :: install sonarqube on ubuntu 
Shell :: permissions in linux 
Shell :: windows run shell script 
Shell :: permission to var/cache 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =