Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    5

    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
    iptables-save
    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
    Linux Newbie
    Join Date
    Feb 2005
    Posts
    129
    Look here and here.

  3. #3
    Just Joined!
    Join Date
    Dec 2004
    Posts
    22
    The best way to do this quickly if your just test is to run:


    Code:
    /etc/init.d/iptables save
    and then

    Code:
    /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:

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

Posting Permissions

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