Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/styllloz/public_html/qa-include/qa-base.php on line 1175

Warning: session_start(): Cannot start session when headers already sent in /home/styllloz/public_html/qa-include/app/users.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /home/styllloz/public_html/qa-include/qa-base.php:1175) in /home/styllloz/public_html/qa-include/app/users.php on line 1267

Warning: Cannot modify header information - headers already sent by (output started at /home/styllloz/public_html/qa-include/qa-base.php:1175) in /home/styllloz/public_html/qa-include/app/page.php on line 356
CentOS and iptables - code-flow.club | Q&A

CentOS and iptables


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
93 views
Gentlemen, I decided then to get acquainted with centos, actually need to configure iptables, it's all just principle, and on other systems does not cause problems, but then came to a screeching halt. opened documentation
wiki.centos.org/HowTos/Network/IPTables
in fact all is clear, create the script, write the rule from the example, the result is:
./firewall.sh: line 7: iptables: command not found
and so all commands that are not so can not understand

centos 5.5 final
by | 93 views

6 Answers

0 like 0 dislike
which iptables what gives?
And check whether the path in the PATH variable.
by
0 like 0 dislike
Correct the scripts to do:
IPT=/sbin/iptables (or other)
\r
$IPT (the rule)
$IPT (the rule)
by
0 like 0 dislike
The most simple — whereis iptables
and then in the script add the first
IPTABLES=/sbin/iptables (or more General option —
IPTABLES=`whereis -b iptables | cut-d" " -f2`
) and then use in design
$IPTABLES -A <...>
by
0 like 0 dislike
sudo?
by
0 like 0 dislike
Root script launch?
\r
If you don't. Start from the root.
Full path to iptables: /sbin/iptables
by
0 like 0 dislike
sudo chmod 755 firewall.sh
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
asked Aug 4, 2019 by Vlad1983
110,608 questions
257,186 answers
0 comments
35,182 users