LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-10-2003, 04:34 AM   #16
skull_crusher
LQ Newbie
 
Registered: Apr 2003
Location: Seattle,Wa
Distribution: Redhat
Posts: 3

Rep: Reputation: 0

type
/sbin/ipchains -L
/sbin/iptables -L
 
Old 04-10-2003, 06:14 AM   #17
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
OMFG.

It's not a path thing, you've gotta be root.
Otherwise:
iptables v1.2.5: can't initialize iptables table `filter': Permission denied (you must be root)
 
Old 04-10-2003, 06:28 AM   #18
skull_crusher
LQ Newbie
 
Registered: Apr 2003
Location: Seattle,Wa
Distribution: Redhat
Posts: 3

Rep: Reputation: 0
do you know if it is not a messed up path ?
if you login as user1 and then su then you have to type /sbin/iptables or ipchains

Joe..

Last edited by skull_crusher; 04-10-2003 at 06:36 AM.
 
Old 04-10-2003, 07:18 AM   #19
fostiator
Member
 
Registered: Mar 2003
Location: Marbella
Distribution: SuSE 10.0
Posts: 63

Original Poster
Rep: Reputation: 15
i've opened a root terminal:

Code:
[root@FOSTIATOR fostiator]# /sbin/iptables -L
bash: /sbin/iptables: No such file or directory
 
Old 04-10-2003, 09:37 AM   #20
Magueta
LQ Newbie
 
Registered: Apr 2003
Location: Toronto, Ontario, Canada
Distribution: Red Hat
Posts: 29

Rep: Reputation: 15
Quote:
Originally posted by fostiator
i've opened a root terminal:

Code:
[root@FOSTIATOR fostiator]# /sbin/iptables -L
bash: /sbin/iptables: No such file or directory
Provided you reached the root shell by logging in as root and not using su then this is a little puzzling, but I hope you can understand how much this looks like a firewall issue. If you used su then use "su -" instead as this will also give you root's path. Also, just humour us and do a "which iptables" and "which ipchains". Once that's done and we can be sure that it isn't the firewall we can also check /etc/hosts.allow and /etc/hosts.deny I know that has irked me once or twice. You should also do a port scan on your Linux box to see if they're open, if you don't have a firewall then when you do a port scan (you can use nmap) you should have ports open for all services that are listening. Another possibility is Xinetd, if it isn't running none of your services will be able to start because that's what starts your services.

Bentz,
services that are usually only run by root are located in directories that are not in the path of the regular user such as /sbin, so when you su to root your path stays the same as that of your original login unless you use "su -" (without brackets of course).

Joe
 
Old 04-10-2003, 09:15 PM   #21
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Thanks, I know. I was commenting on the lack of understanding that even if the entire file system was part of this login's path, you still wouldn't nessasarily get a rule listing unless you were root.

The problem with your logic is that we just saw this person, logged in as root, accessing the binary (in it's typical place) directly, without using any path at all. Good suggestion about the 'which iptables', though. I'd also suggest you try 'rpm -q iptables', as Mandrake uses rpm for package management, and should notify whether or not iptables is installed at all.
 
Old 04-10-2003, 09:44 PM   #22
Magueta
LQ Newbie
 
Registered: Apr 2003
Location: Toronto, Ontario, Canada
Distribution: Red Hat
Posts: 29

Rep: Reputation: 15
Check out the following.

Quote:
[joe@mylinuxbox]$ su
Password:
[root@mylinuxbox]# echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/joe/bin
[root@mylinuxbox]# exit
[joe@mylinuxbox]$ su -
Password:
[root@mylinuxbox]# echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/usr/sbin
[root@mylinuxbox]#
In both instances the person is root after su.

Joe
 
Old 04-10-2003, 10:08 PM   #23
serz
Member
 
Registered: Apr 2003
Location: Buenos Aires, Argentina
Distribution: Slackware, Gentoo
Posts: 397

Rep: Reputation: 30
Quote:
Originally posted by Magueta
Check out the following.



In both instances the person is root after su.

Joe
Yea.. but not in both cases you get a "command not found" lol
 
Old 04-10-2003, 10:17 PM   #24
Magueta
LQ Newbie
 
Registered: Apr 2003
Location: Toronto, Ontario, Canada
Distribution: Red Hat
Posts: 29

Rep: Reputation: 15
Quote:
Originally posted by serz
Yea.. but not in both cases you get a "command not found" lol
I don't get it.
 
Old 04-12-2003, 02:15 PM   #25
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
That's pretty obvious. The binary 'iptables' does not appear to exist on this person's system. Even if

PATH=`find / -type d | tr '\n' ':'`

'iptables' still wouldn't work unless it was installed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
can ping network computer, cannot ping google.com (help needed) ben_build#2.1.0 Linux - Wireless Networking 23 11-07-2010 12:55 PM
Can't PING to outside Network dibakar5173 Linux - Networking 2 09-16-2005 08:23 AM
Can ping network but can't ping any internet ip when I hard set the ip Streme Linux - Wireless Networking 4 04-13-2004 09:18 AM
Can't ping network rarezoo Linux - Networking 2 08-15-2003 08:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration