Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    how to save iptables

    dear all
    i am new user iptables...
    i use it for port conversion...
    smtp port and pop3 port..
    the configuration is as follow.
    iptables -t nat -A PREROUTING -p tcp --dport 9110 -j REDIRECT --to-ports 110
    iptables -t nat -A PREROUTING -p tcp --dport 9025 -j REDIRECT --to-ports 25
    when i test with MUA....whether the port conversation is work or not..
    it run on the service..
    but when i restart the iptables service or restart the machine..,the rule is not effective and go to the original..
    when i reconfigure again,the service run again..
    so i want to know ,how to save the iptables result...
    pls help me
    thanks a lot

  2. #2
    Look here and here.

  3. #3
    The best way to do this quickly if your just test is to run:

    /etc/init.d/iptables save
    and then

    /etc/init.d/iptables save

    If you just run stop it will flush the rules out of the system and cause all kinds of headaches. It will give you a status update once you do this, so donít worry, should look like this:

    /etc/init.d/iptables stop
    Flushing firewall rules:                                   [  OK  ]
    Setting chains to policy ACCEPT: filter                    [  OK  ]
    Unloading iptables modules:                                [  OK  ]

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts