1

Topic: Cannot add -t rule in /etc/default/iptables

==== Required information ====
- iRedMail version: iRedMail-0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 14.04
- Related log if you're reporting an issue: 
====

Hi ,
I seem to be having a problem with adding a rule in the iptables .

This is the configuration I added to the /etc/default/iptables:

-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s 10.8.0.0/24 -j ACCEPT
-A FORWARD -j REJECT
-t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
-A INPUT -i tun+ -j ACCEPT
-A FORWARD -i tun+ -j ACCEPT
-A INPUT -i tap+ -j ACCEPT
-A FORWARD -i tap+ -j ACCEPT

I get an error saying:-

* Applying iptables firewall rules                                                                                                                     
iptables-restore v1.4.21: The -t option (seen in line 79) cannot be used in iptables-restore.


Can someone explain how to solve this?
Thanks

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cannot add -t rule in /etc/default/iptables

Does it work if you place '-t nat' after '-A POSTROUTING'?
e.g.

-A POSTROUTING -t nat -s 10.8.0.0/24 -o eth0 -j MASQUERADE