fix iptables example to forbid outgoing port 25

iptables rule target should be REJECT instead of ACCEPT.
This commit is contained in:
Yann Autissier 2023-05-16 20:46:57 +00:00
parent 2a16b132c1
commit a4ce64fd80

View file

@ -578,10 +578,11 @@ This hooks is run at the end of the command `yunohost firewall reload` or equiva
##### Examples ##### Examples
###### Forbid completely the outgoing 25 port ###### Forbid completely the outgoing 25 port except for postfix user
```bash ```bash
#!/bin/bash #!/bin/bash
iptables -A OUTPUT -p tcp -m tcp --dport 25 -j ACCEPT iptables -A OUTPUT -p tcp --dport 25 -m owner --uid-owner postfix -j ACCEPT
iptables -A OUTPUT -p tcp --dport 25 -m tcp -j REJECT --reject-with icmp-port-unreachable
``` ```
[/details] [/details]