iptables command not working

Hello

When I run the /etc/init.d/iptables status command, the system responds with:

-bash: /etc/init.d/iptables: No such file or directory

This makes a bit of sense seeing as I can’t find the iptables file in the /etc/init.d directory, but how do I fix the problem?

Thanks in advance

Hi

try ‘which iptables’ as root.

The command should be found at this location:

/usr/sbin/iptables

I think you are both talking about things a bit different rom each other.

vodoo talks about the iptables tool. A command in /usr/bin/iptables that also has a man page on the system. In that man page you find that there is no place for

iptables status

I think that BushSnake talks about a start/stop/status script. They are to be found in /etc/init.d and have a status command.
You probably think that this script will exist from experience with other Linux distributions. In openSUSE iptables are created/maintained by SuSEfirewall2.

Thanks. I don’t think we were talking about the same thing, as I definitely meant the script with the start/stop/status commands. All I want to do is make sure the Firewall is COMPLETELY disabled, so if the GUI in YaST does that when I disable it, then I don’t need the iptables command. Someone just mentioned that the GUI way doesn’t completely disable it, but he may have been referring to another distribution of Linux. If SUSE doesn’t need the iptables script, then I assume (or rather hope) I’ll never have to use it…

I have SuSEfirewall2 switched off (using YaST).

You can see which IP tabels are active with

iptables -L

In my system nothing shows (apart from some headers).

For me that is sufficient.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Using:

sudo /sbin/rcSuSEfirewall2 status

should get you the info needed as well I believe. The rcSuSEfirewall2
script (which points to /etc/init.d/SuSEfirewall2_setup) is probably the
best way to manipulate the firewall. For clarity the firewall (NetFilter)
is never completely turned off as it is a kernel module. With that said
when you set the firewall to ACCEPT everything (INPUT, OUPUT, etc.) it is
effectively keeping its hands off of all data and “disabled”. Another way
to see the rules is with:

/usr/sbin/iptables-save

Also all of this begs the question… why disable the firewall
completely? It’s fine to do I suppose, but I can’t think of a good reason
unless it’s for troubleshooting to completely rule out issues with it.

Good luck.

hcvv wrote:
> I have SuSEfirewall2 switched off (using YaST).
>
> You can see which IP tabels are active with
>
> Code:
> --------------------
> iptables -L
> --------------------
>
> In my system nothing shows (apart from some headers).
>
> For me that is sufficient.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJKoRfpAAoJEF+XTK08PnB55csP/iN1dJwsf7+6vkIzzEQgd50d
MeIKP3JD/HOHMxsQsbvF6SeuNhG09uWzSTypCy30+jzbxPt5ryPBwncRLRbkjpEM
5VPyuVThVhAn72XT1xmio1OaoLyoFFFA6B6THhMqmtp396eI/V1nrY+UNC+WN7QF
18Qzs3nOZ4gU+iLRiKg5xuPs7NGH7Vog+5bsl9oSt8nGYTDgQHlVSK7jfEbZ5EKB
IKZkP5tk8sG9HnsjMrMx39PAuLDnmHxgbQk1+t2zOzZFEL16LqAUEiJJKX6jhgVu
+2GK8QaSkdx2oIwbJmn56+J270ohV0ULcR3mLaGorJ6NlEXWd61quUXrCAYBwX6i
grmBRwiyJumkWA0TJycnK6f427dRfc7B5924osIg6W1tOSUX5y9hTNJiKCtzsEos
j86ImS1qCwnKrCzkvpJNarQ5iEbJCRUkQmG/pggojt/7CdVXAw59Qb+5pQSsy6ho
U6OsXVIHINPpZbcLWtd/Rsky8CzGHgoRdS187IZhrs655LWbtcpUIiYO1TF4agwQ
Go+lr3NFH4bpTompEQ2+xZgNju4Lnk+a2jCreCmolDvDU3bCPix5jVIcfgoS0W2a
M9/Zns8ibPJsx/w1z7DC+VPcxhcmM+G5Id/R8etCHxX69WLjL+zy1W/iMcN12Q4l
tdNINdsC/7uwvT7/H4u3
=HQ9k
-----END PGP SIGNATURE-----