LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 03-18-2007, 12:56 PM   #1
slang830
LQ Newbie
 
Registered: Aug 2006
Posts: 9

Rep: Reputation: Disabled
no chain/target match by that name


Trying to get my head round firewall stuff but I'm obviously doing something really dumb which is stopping me from getting ahead with implementing my iptables script. I can enter (sudo) iptables commands at the command line no problem but as soon as I try running the same command(s) within a bash script I get 'no chain/target match by that name' error message. Even a simple line e.g. 'iptables -L' when scripted will produce this error. Is this an ownership/permissions issue with bash rather than an iptables issue? Thanks for any assistance anyone can offer.
 
Old 03-18-2007, 05:02 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,540

Rep: Reputation: 149Reputation: 149
I guess it's a permission issue. The simply test I recommend is to run iptables -L in a script as root, what should obviously work nicely. Then, add sudo when needed (or change the user your script runs as).
 
Old 03-19-2007, 10:26 AM   #3
slang830
LQ Newbie
 
Registered: Aug 2006
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you for your help

I think the problem was that I copied the original script from a win32 (NTFS) system and it didn't seem to like that. When I re-created the script on the Linux box it executed ok. I knew it would be something dumb I was doing wrong.

 
  


Reply

Tags
bash, iptables, permissions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
iptables: No chain/target/match by that name - with 2.6.17.7 tp11235 Linux - Kernel 10 03-24-2010 03:15 AM
iptables: No chain/target/match by that name schatoor Linux - Networking 6 01-04-2009 10:10 PM
Tool chain geek_comp Linux - Software 0 02-20-2006 04:07 AM
"iptables: No chain/target/match by that name" error PennyroyalFrog Linux - Security 2 11-28-2004 02:57 PM
no chain/target/match creznedmick Linux - Networking 1 03-08-2004 05:47 AM


All times are GMT -5. The time now is 05:31 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration