mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Merge pull request #2266 from aya/fix-iptables-example
fix iptables example to forbid outgoing port 25
This commit is contained in:
commit
5bea8c2720
1 changed files with 3 additions and 2 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue