Re: iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

On Tue, Sep 15, 2009 at 07:43, CentOS List <centoslist@xxxxxxxxx> wrote:
> How do add a redirect port 26 to 25. I had googled the net and notice that
> the syntax is different
>
> iptables -A INPUT -p tcp --dport 26 -j ACCEPT
> iptables -A PREROUTING -t nat -p tcp --dport 26 -j REDIRECT --to-port 25

I suggest you use "iptables" commands to add and delete rules until
you set the firewall the way you want, and when everything is ready
use the "service iptables save" command, that will write a new
/etc/sysconfig/iptables with the current rules you have. That way you
don't risk having a syntax error or typo prevent your rules from
loading during the next reboot. If you want to preview the new file
you can run "iptables-save" that will dump the rules to the console
where you can inspect them. I also suggest that you make regular
backups of /etc/sysconfig/iptables and that you do a backup just
before running "service iptables save" just in case something goes
wrong...

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux