I am new to Linux. In CentOS 6.3 I added this rule:

iptables -I INPUT -p udp --dport 9494 -j ACCEPT

Now I am trying to save it:

/sbin/service iptables save It gives me: [FAILED]

I tried to do: /sbin/service iptables stop but it gives me FAILED on unloading modules iptable_filter iptable_filter [FAILED]es

  • "new to Linux" doesn't really fit the subject matter of Server Fault. unix is a better place when you're first starting out.
    – Andrew B
    Feb 27 '13 at 3:58
  • 1
    @AndrewB - that is absolutely inaccurate. Serverfault has no requirement that site users be of a certain skill level. The only requirement is that they are performing these duties as part of their profession. Even new linux admins are professionals. If you don't care to answer simple questions, than feel free to ignore them.
    – EEAA
    Feb 27 '13 at 4:08
  • @EEAA I apologize then, I appear to have picked up a false impression from watching others. The point is fair, there was nothing to indicate a home setting, so it was an inappropriate assumption.
    – Andrew B
    Feb 27 '13 at 4:15
  • @AndrewB - no problem. Lesson learned.
    – EEAA
    Feb 27 '13 at 4:17

You run:

$ iptables-save > /path/to/file

That will store the current iptables rules in /path/to/file.

Then to re-load the rules:

$ iptables-restore < /path/to/file

OK, I added rules to file /etc/sysconfig/iptables and it worked

  • If by "it worked" you mean "it still isn't automatically saving your tables but it's enough", then yes. That's not an answer to the question you posed though.
    – Andrew B
    Feb 27 '13 at 3:57
  • Well, I don't know what is good enough and what is not! If it works, it should be good?
    – Andrew
    Feb 27 '13 at 4:01
  • @AndrewB I think the OP is qualified to determine what answer truly answers his question. It's clear that he figured out how to solve the problem and then posted his solution. What's the problem with that? FWIW, I'm giving him a +1.
    – EEAA
    Feb 27 '13 at 4:10
  • @EEAA respect! Thank you for your help-- I have a lot to learn!
    – Andrew
    Feb 27 '13 at 4:12
  • @Andrew Right on. Don't let the naysayers get you down. We all started somewhere. Keep the questions coming!
    – EEAA
    Feb 27 '13 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.