# Iptables saving help

**URL:** https://forum.yunohost.org/t/iptables-saving-help/15818
**Category:** Support
**Tags:** english
**Created:** [May 14, 2021, 6:11pm UTC](https://forum.yunohost.org/t/iptables-saving-help/15818 "2021-05-14T18:11:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Horrorfiend](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/h/9d8465/32.png) [@Horrorfiend](https://forum.yunohost.org/u/Horrorfiend)
#### Post date: [May 14, 2021, 6:11pm UTC](https://forum.yunohost.org/t/iptables-saving-help/15818/1 "2021-05-14T18:11:43Z")

</div>

my isp blocks port 25 so im trying to use iptables -t nat -I PREROUTING -p tcp -–dport 587 -j REDIRECT -–to-port 25 to redirect on debian but im having trouble saving as iptables-save doesnt work

---

<div class="post-metadata">

### Author: ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)
#### Post date: [May 16, 2021, 12:03pm UTC](https://forum.yunohost.org/t/iptables-saving-help/15818/2 "2021-05-16T12:03:15Z")

</div>

iptables-save command should be called iptables-dump…

You can’t use this command to save iptables rules.

In yunohost the prefer way to manage that usecase to create a hook by following these steps:

1. create a dir /etc/yunohost/hooks.d/post\_iptable\_rules
2. add a file in this dir called 99-specific\_rules with 🙂

```auto
#!/bin/bash
sudo iptables <YOUR SPECIFIC RULES HERE>
sudo ip6tables <YOUR SPECIFIC RULES HERE>

```

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [June 15, 2021, 12:04pm UTC](https://forum.yunohost.org/t/iptables-saving-help/15818/3 "2021-06-15T12:04:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
