Minggu, 14 Agustus 2011

Cara Aktifkan Firewall - Ubuntu 11.10

Cara menggunakan UFW :

  • First, ufw needs to be enabled. From a terminal prompt enter:
    sudo ufw enable
    
  • To open a port (ssh in this example):
    sudo ufw allow 22
    
  • Rules can also be added using a numbered format:
    sudo ufw insert 1 allow 80
    
  • Similarly, to close an opened port:
    sudo ufw deny 22
    
  • To remove a rule, use delete followed by the rule:
    sudo ufw delete deny 22
    
  • It is also possible to allow access from specific hosts or networks to a port. The following example allows ssh access from host 192.168.0.2 to any ip address on this host:
    sudo ufw allow proto tcp from 192.168.0.2 to any port 22
    
    Replace 192.168.0.2 with 192.168.0.0/24 to allow ssh access from the entire subnet
  • ufw can be disabled by:
    sudo ufw disable
    
  • To see the firewall status, enter:
    sudo ufw status
    
  • And for more verbose status information use:
    sudo ufw status verbose
    
  • To view the numbered format:
    sudo ufw status numbered 
     
    • To view which applications have installed a profile, enter the following in a terminal:
      sudo ufw app list
      
    • Similar to allowing traffic to a port, using an application profile is accomplished by entering:
      sudo ufw allow Samba
      
    • An extended syntax is available as well:
      ufw allow from 192.168.0.0/24 to any app Samba
      
      Replace Samba and 192.168.0.0/24 with the application profile you are using and the IP range for your network.
      There is no need to specify the protocol for the application, because that information is detailed in the profile. Also, note that the app name replaces the port number.
    • To view details about which ports, protocols, etc are defined for an application, enter:
      sudo ufw app info Samba
      
     
     
     
     
     
     
     
    Sumber: https://help.ubuntu.com 

0 komentar:

Posting Komentar

 
www.Indo-pages.blogspot.com