Merge pull request #2266 from aya/fix-iptables-example

fix iptables example to forbid outgoing port 25
This commit is contained in:
Alexandre Aubin 2023-06-20 18:35:56 +02:00 committed by GitHub
commit 5bea8c2720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -578,10 +578,11 @@ This hooks is run at the end of the command `yunohost firewall reload` or equiva
##### Examples
###### Forbid completely the outgoing 25 port
###### Forbid completely the outgoing 25 port except for postfix user
```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]