UFW
Installation
1 |
|
Activation
Here it should be noted that already active connections are not disconnected, but new ones are not possible after activating the firewall, if no rule exists for the service.
Before or directly after this, SSH should be allowed on the corresponding port.
1 |
|
Default policies
By default, all outgoing traffic should be allowed and all incoming traffic should be prohibited. Individual ports for incoming traffic can then be specifically enabled afterwards.
Incoming:
1 |
|
Outgoing:
1 |
|
Show status
Displays a list of all defined rules. However, the firewall must be active for this.
1 |
|
Create rules
1 |
|
Alternatively a short version could be used.
1 |
|
Pre-configuration
Rules can be added even if the firewall is disabled.
Allow protocol TCP from localhost on port 80 to localhost on port 80.
1 |
|
Allow proto UDP from localhost to any IP address on port 80.
1 |
|
Comments
A comment can be added to every rule. Add COMMENT "<comment>"
at the end.
Allow from localhost to any IP address and add a comment for this rule.
1 |
|
Short version of allow protocol TCP from any address to any address on port 80.
1 |
|
Insert a rule before another rules.
1 |
|
Deny access from localhost before any other rule is executed.
1 |
|
Delete rules
Displays all rules with numbers as a list.
1 |
|
Deletes the rule with the number from the list.
1 |
|