» firewall の記事

~ Ubuntu Firewall Setting ~

connie 2012.12.27 | ubuntu | | No Comments

以下cmd 需要在有root權的acc使用

Install ufw

sudo apt-get install gufw

Check firewall status

ufw status

Turn on Firewall

ufw enable

Turn off Firewall

ufw disable

Allow a port

ufw allow [port number]

Allow an ip address

ufw allow from [ip address]

Allow a specific ip address and port

ufw allow from [ipaddress] to any port [port number]

Allow ip address range – to port 22

ufw allow from to any port 22

Blocking a port

ufw deny port [port number]

To remove a deny or allow rule

ufw delete deny  [port number]
| HOME |