[CentOS] iptables

Christopher Chan christopher.chan at bradbury.edu.hk
Wed Sep 16 07:51:25 UTC 2009


> Thanks Christopher,
>
> I had updated my rules to
>
> *nat
> :OUTPUT ACCEPT [0:0]
> :PREROUTING ACCEPT [0:0]
> :POSTROUTING ACCEPT [0:0]
> -A PREROUTING -t nat -p tcp --dport 26 -j REDIRECT --to-port 25
> COMMIT
> # Completed
>
> When I did a restart, there is an error.
>
> Flushing firewall rules:                                   [  OK  ]
> Setting chains to policy ACCEPT: nat mangle filter         [  OK  ]
> Unloading iptables modules:                                [  OK  ]
> Applying iptables firewall rules: iptables-restore v1.3.5: Line 52 seems to
> have a -t table option.
>   
Argh...forgot to take the '-t nat' part out.

> Error occurred at line: 52
> Try `iptables-restore -h' or 'iptables-restore --help' for more information.
>                                                            [FAILED]
>
> Line 52 is -A PREROUTING -t nat -p tcp --dport 26 -j REDIRECT --to-port 25
>   

Just delete the '-t nat' portion. The table has already been set above 
(*nat).



More information about the CentOS mailing list