LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-26-2003, 12:33 AM   #1
d33pdream
Member
 
Registered: Jan 2003
Distribution: LFS
Posts: 90

Rep: Reputation: 15
iptables doesn't know what -dport 80 is... ?


[root@amazon oneiric]# /sbin/iptables -A INPUT -i eth0 -p tcp -dport 80 -j ACCEPT
Bad argument `80'


Why is it giving me an error? This is what otehr threads and netfilter documentation says to type..


I use Redhat 8.0 if that makes any difference.
 
Old 03-26-2003, 04:30 AM   #2
hereiam
LQ Newbie
 
Registered: Mar 2003
Posts: 7

Rep: Reputation: 0
Did you try only below command?

iptables -A INPUT -i eth0 -p tcp -dport 80 -j ACCEPT
 
Old 03-26-2003, 07:22 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
You might want to post your entire firewall script. It could be something like you never set up the INPUT table.
 
Old 03-26-2003, 08:23 AM   #4
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
try --dport instead of -dport
 
Old 03-26-2003, 12:16 PM   #5
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820

Rep: Reputation: 46
Or stop using lazy shortcuts ( I do it too) and use
--destination-port 80
 
Old 03-26-2003, 01:55 PM   #6
Darkl0rd
LQ Newbie
 
Registered: Mar 2003
Location: Netherlands
Posts: 15

Rep: Reputation: 0
you have to specify --dport (two dashes) which is pretty clearly stated in the documentation, the short help and about all the help you can find on the internet.
also you ALWAYS have to specify a protocol to be able to specify a sport / dport (in your case you did -p tcp/udp)

cheers,

Nils
 
Old 04-04-2003, 06:22 PM   #7
bkeating
Member
 
Registered: Mar 2002
Location: San Francisco, CA
Distribution: Open/FreeBSD, Gentoo, SuSE
Posts: 511

Rep: Reputation: 38
replaced -dport with --dport and that worked. Thank you
 
  


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
Using --dport --sport... When to use one or another Palula Linux - Security 7 09-02-2005 11:32 AM
dport 113 yoursmile Linux - Networking 2 06-23-2005 09:58 PM
Iptables - Couldn't load target `ACCPET':/lib/iptables/libipt_ACCPET.so: z00t Linux - Security 3 01-26-2004 02:24 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

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

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