Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 03-18-2007, 11:56 AM   #1
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, 04:02 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
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, 09:26 AM   #3
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.



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

All times are GMT -5. The time now is 07:36 AM.

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