LinuxQuestions.org
Register a domain and help support LQ
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 01-22-2004, 09:31 AM   #1
Agent007
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Rep: Reputation: 15
iptables doesn't work with me


first of all .. im newbie when it comes to networking in all operating systems not just linux .. so please be patient with me
I'm trying to open ftp port on my linux box .. but I can't get it to work .. don't know
when i type: iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT
it works .. but when i try to upload something or download something (using any account) from another windoze pc .. it refuses my connection
what's wrong ????
 
Old 01-22-2004, 10:45 AM   #2
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
You may find this useful:
http://www.sns.ias.edu/~jns/security...track.html#FTP
 
Old 01-22-2004, 05:30 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
Hi, I think this is what you need:

Quote:
iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -j ACCEPT

Try that and see if that helps....

-twantrd
 
Old 01-23-2004, 01:32 AM   #4
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Quote:
Originally posted by twantrd
Hi, I think this is what you need:



iptables -A INPUT -p tcp --dport 21 -j ACCEPT

Try that and see if that helps....

-twantrd
The problem with FTP is that it uses more than one port. One port is used as the connection port and one is used as a data channel.

The data channel will vary. If active FTP is being used then the client can choose which port to use. If it is passive FTP then the server chooses. So one rule for FTP will not work.
 
Old 01-23-2004, 07:14 AM   #5
palmercabel
Member
 
Registered: Oct 2003
Posts: 64

Rep: Reputation: 15
Agent007, you may need to control access to FTP through tcp wrappers rather than iptables. It would help to know which FTP server you are running.
 
  


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 question: Will this work? lucktsm Linux - Networking 7 07-06-2005 03:22 PM
Iptables command won't work no_names_left Linux - Networking 9 04-23-2005 07:53 PM
IPTABLES doesn't work!!! help... saruman666 Linux - Networking 11 08-16-2003 04:15 PM
IPTables doesn't seem to work X11 Linux - Software 7 07-08-2002 12:39 AM
iptables doesn't work correctly themorph Linux - Networking 1 02-20-2002 09:33 PM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
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