LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2004, 07:49 AM   #1
gpamkenny
LQ Newbie
 
Registered: Oct 2004
Posts: 10

Rep: Reputation: 0
bad argument 'iptables'


I have just installed RH9 with medium firewall protection
I want to work with iptables a bit, and open the telnet port and port 5555.

/etc/init.d/iptables stop
I copied the original iptables to iptables.good
then rempved all lines from the original file and added

#Polices
iptables -P INPUT drop
iptables -P OUTPUT drop
iptables -P FORWARD drop
# in and out
iptables -A OUTPUT -p ALL -s 192.168.1.103
iptables -A INPUT -p ALL -i eth0 -s 192.168.1.03 -j ACCEPT

COMMIT

/etc/init.d/iptables start

et the error bad argument iptables
Basicly took the above from examples I found

Thanks
 
Old 10-29-2004, 08:16 AM   #2
mAineAc
Member
 
Registered: Nov 2000
Location: Hermon, ME
Distribution: slackware
Posts: 201

Rep: Reputation: 30
try iptables --help at the command line to see if it comes up. Make sure you have the iptables module modprobed. Are you in root when doing this?
 
Old 10-29-2004, 08:38 AM   #3
gpamkenny
LQ Newbie
 
Registered: Oct 2004
Posts: 10

Original Poster
Rep: Reputation: 0
yes I am in root, what is module modprobed is that an package I should load?

Thanks
 
Old 10-29-2004, 09:41 AM   #4
mAineAc
Member
 
Registered: Nov 2000
Location: Hermon, ME
Distribution: slackware
Posts: 201

Rep: Reputation: 30
do lsmod and see what you have for modules installed. If I remember right RH has the iptables in as modules. there are a few different ones depending on what you want to do with your firewall. When you type 'which iptables' what do you get? Look at the old firewall script you moved and see what it has for commands for loading modules. It would have a command like insmod or modprobe.
 
Old 10-29-2004, 10:25 AM   #5
gpamkenny
LQ Newbie
 
Registered: Oct 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Hi

lsmod
iptables_filter
ip_tables

which iptables
/sbin/iptables

iptables file
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.

# Note: ifup-post will punch the current nameservers through the

#firewall; such entries will *not* be listed here.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
-A INPUT -j RH-Lokkit-0-50-INPUT
-A FORWARD -j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6000:6009 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 7100 --syn -j REJECT
COMMIT

I tried edit telnet port 23 to this file with no luck
 
  


Reply


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, invalid argument, problem with modprobe ivanatora Linux - Software 1 05-11-2005 05:55 AM
bad iptables update jeffpoulsen Linux - Networking 3 06-25-2004 10:59 AM
[ Invalid Argument on 'iptables' ] benleung Linux - Security 1 09-23-2003 12:25 AM
Bad Argument '53' IPtables doesn't run and has no bash debug lines? piratebiter Linux - Security 3 09-02-2003 10:18 AM
iptables: Bad policy name rioguia Linux - Security 10 01-09-2003 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 AM.

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