You are not logged in.

#1 2009-01-25 23:36:57

nss
Member
Registered: 2007-05-08
Posts: 24

iptables command

I installed iptables with pacman but...

# which iptables
which: no iptables in (/usr/bin:/bin:/usr/bin/X11:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/root/bin)

Also, I have a firewall bash script that I've been using (with debian). Where is a good place to put it so the script is executed before any network interface is brought up?
Thanks.

Offline

#2 2009-01-25 23:39:58

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: iptables command

Try

pacman -Ql iptables

Offline

#3 2009-01-25 23:52:15

nss
Member
Registered: 2007-05-08
Posts: 24

Re: iptables command

# pacman -Ql iptables
--- snipped ---
iptables /usr/lib/pkgconfig/xtables.pc
iptables /usr/sbin/
iptables /usr/sbin/ip6tables
iptables /usr/sbin/ip6tables-multi
iptables /usr/sbin/ip6tables-restore
iptables /usr/sbin/ip6tables-save
iptables /usr/sbin/iptables
iptables /usr/sbin/iptables-multi
iptables /usr/sbin/iptables-restore
iptables /usr/sbin/iptables-save
iptables /usr/share/
--- snipped ---

Offline

#4 2009-01-25 23:59:28

Alexdsan
Member
Registered: 2007-07-10
Posts: 28

Re: iptables command

Or try

$ whereis iptables
iptables: /usr/sbin/iptables /etc/iptables /usr/lib/iptables /usr/share/man/man8/iptables.8.gz

Last edited by Alexdsan (2009-01-25 23:59:41)

Offline

#5 2009-01-26 00:01:32

nss
Member
Registered: 2007-05-08
Posts: 24

Re: iptables command

# whereis iptables
iptables: /etc/iptables

Offline

#6 2009-01-26 00:08:05

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: iptables command

echo $PATH


Give what you have. To someone, it may be better than you dare to think.

Offline

#7 2009-01-26 00:49:51

nss
Member
Registered: 2007-05-08
Posts: 24

Re: iptables command

# echo $PATH
/usr/bin:/bin:/usr/bin/X11:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/root/bin

Offline

#8 2009-01-26 01:35:02

nss
Member
Registered: 2007-05-08
Posts: 24

Re: iptables command

Thanks for the help. After reinstalling iptables, the command is found. Weird. Any ideas why that was happening? The command, patch, was doing the same. Maybe there are others...

I'm still wondering about the second part of my original posting: how do I have my firewall script run before the network is brought up (e.g. at boot)?

Offline

#9 2009-01-26 22:29:26

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: iptables command

1) Your path variable much have been wrong. iptables is located in /sbin which isn't normally in a 'normal' users PATH, only root. (This is because iptables can only be run as root)
2) Make sure 'iptables' is before 'network' in your rc.conf -- but depending on your filewall rules, that may or may not work. Some rules may require the network to be started before they can start. It's seriously not a major issue to start iptables after network smile

Offline

Board footer

Powered by FluxBB