Skip to content

Instantly share code, notes, and snippets.

@thephucit
Last active January 24, 2019 04:48
Show Gist options
  • Select an option

  • Save thephucit/7b2d4486745341f797c3da46dc28dfe9 to your computer and use it in GitHub Desktop.

Select an option

Save thephucit/7b2d4486745341f797c3da46dc28dfe9 to your computer and use it in GitHub Desktop.

Cấu hình Firewall bằng UFW

apt-get install ufw

bật UFW lên

ufw enable

cho phép UFW chấp nhận tất cả các port của Nginx

ufw allow 'Nginx Full'

Xem trạng thái các port

ufw status

Bật cho phép SSH

ufw allow ssh

Cho phép một port được truy cập

ufw allow 2222

Từ chối một port được truy cập

ufw deny 2222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment