LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 11:56 AM   #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, 04:02 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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
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 02:15 AM
iptables: No chain/target/match by that name qanopus 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07: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