Ufw configuration: Unterschied zwischen den Versionen

Aus Wiki
Wechseln zu: Navigation, Suche
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 35: Zeile 35:
 
  ufw allow from <ip> port <port> comment "<comment>"
 
  ufw allow from <ip> port <port> comment "<comment>"
 
  ufw allow [proto tcp] from <ip> port <port> comment "<comment>"
 
  ufw allow [proto tcp] from <ip> port <port> comment "<comment>"
 +
ufw allow [proto tcp] to any port <port> comment "<comment>"
 +
 +
Allow from IP to port
 +
ufw allow [proto tcp] from <ip> to any port <port> comment "<comment>"

Aktuelle Version vom 16. September 2020, 12:49 Uhr

Allgemein

ufw [delete] allow <port>/tcp
ufw [delete] allow <port>:<port>/tcp
ufw [delete] allow [proto tcp] from <ip> to any port <port>

Examples:

ufw allow from <ip> to any port <port> comment '<comment>'

SSH

ufw allow 22/tcp

Webserver

ufw allow 80/tcp
ufw allow 443/tcp

MySQL

ufw allow 3306/tcp

FTP

ufw allow 20/tcp
ufw allow 21/tcp
ufw allow 2020:2030/tcp
add config to vsftp.conf
ftp_data_port=20
pasv_min_port=2020
pasv_max_port=2030

Delete Entry

ufw status numbered
ufw delete <id>

Add entry // from port and ip with comment

ufw allow from <ip> port <port> comment "<comment>"
ufw allow [proto tcp] from <ip> port <port> comment "<comment>"
ufw allow [proto tcp] to any port <port> comment "<comment>"

Allow from IP to port

ufw allow [proto tcp] from <ip> to any port <port> comment "<comment>"