mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
fix iptables example to forbid outgoing port 25
iptables rule target should be REJECT instead of ACCEPT.
This commit is contained in:
parent
2a16b132c1
commit
a4ce64fd80
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
|
##### 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]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue