[SOLVED] iptables setup error on VPS.NET Lucid
-
When executing; "iptables-restore < /etc/iptables.test.rules" in Guv's "Harden SSH and Create Firewall" tutorial, I get this error: "iptables-restore v1.4.4: option `--log-prefix' requires n argument
Error occurred at line: 18"Anyone have the solution to this problem?
Posted 1 year ago # -
Well this ended up being insanely easy to fix! Just edited, " ...--log-prefix \"iptables denied: \"..." in the Guvnr's scrip to "... --log-prefix: "iptables denied: "..."
Posted 1 year ago # -
Im having exact same issue but im struggling to fix it :-(
Posted 1 year ago # -
Brian,
My problem was just that in line 18 of the Guvnr's script \"iptables denied: \" needs to be "\iptable denied: \". i.e. the heading we're telling --log-prefix to use needs to be within the quotes. Also, make sure you copy any of these scripts using the little source link provided in the upper right of each section.Posted 1 year ago # -
I think ive made the correct change Lee ? Still seems to be chucking up the error though :-(
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "\iptables denied: \" --log-level 7
Posted 1 year ago # -
guys .. this will have affected:-
Harden the Secure Shell (SSH) & Create a Firewall
the stackscript was fine.
i've altered and tested the code in the original tutorial now (my syntax was wrong :P )
.. IT IS FINE NOW!!
Sorry for confusion. My thinking cap has been upgraded too :)
Posted 1 year ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
