Ufw configuration: Unterschied zwischen den Versionen
Aus Wiki
Chris (Diskussion | Beiträge) |
|||
| (4 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
ufw [delete] allow <port>:<port>/tcp | ufw [delete] allow <port>:<port>/tcp | ||
ufw [delete] allow [proto tcp] from <ip> to any port <port> | ufw [delete] allow [proto tcp] from <ip> to any port <port> | ||
| + | |||
| + | Examples: | ||
| + | |||
| + | ufw allow from <ip> to any port <port> comment '<comment>' | ||
SSH | SSH | ||
| Zeile 23: | Zeile 27: | ||
pasv_min_port=2020 | pasv_min_port=2020 | ||
pasv_max_port=2030 | 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>" | ||
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>"