PDA

View Full Version : [ubuntu] iptables problem


josephmcnelis
September 28th, 2009, 03:45 PM
Hey all,

Im using my MAC mini to attempt to set up a Hardy Heron server via SSH.

Its the first time ive ever done this sort of thing so im pretty much clueless but anyway i was following a nice set of tutorials at slicehosts (detailed below)

http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-1

but ive got to the iptables section but any command i attempt to run results in

-bash: iptables: command not found

any ideas would be greatly appreciated??

-Cheers

DaithiF
September 28th, 2009, 03:56 PM
iptables is located at /sbin/iptables
is /sbin in your path?if not then you need to provide the explicit path to it.

josephmcnelis
September 28th, 2009, 04:25 PM
how could i find out my path?

DaithiF
September 28th, 2009, 04:35 PM
echo $PATH

josephmcnelis
September 28th, 2009, 04:45 PM
it returns the following

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

how would i go about adding iptables to it?

-Cheers

josephmcnelis
September 28th, 2009, 05:15 PM
I thought iptables came as default but when i try whereis iptables it returns a blank.

Sorry if thats a terribly simple question :(

DaithiF
September 28th, 2009, 05:15 PM
i guess i wasn't very clear. iptables should be located in the directory /sbin. Where the tutorial says to run iptables xyz..., use the full path instead: /sbin/iptables xyz...

The path you posted indicates that /sbin is already in your path, which means the command not found error is a little surprising. Try /sbin/iptables as described above first, if you still get an error then post back.