LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-11-2005, 11:42 PM   #1
rjeeves33
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
iptables question re FTP access


Hi

please excuse my knowledge. I only started playing with IPtables today. I've currently got the following running on my Ubuntu box

:INPUT DROP [92:16380]
:FORWARD DROP [0:0]
:OUTPUT DROP [64:14558]
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 21 -j ACCEPT
COMMIT

Simple isn't it. Shame it doesn't work though. What have I done wrong? The ubuntu box is an ftp server and I at present only want FTP to be allowed over port 21. when I test this I can ftp to the box, log in anonymously. however, when I try to 'ls' from an ftp client it just times out.

Thanks in advance for some pointers. Also any good resources on iptables would be welcome ;-)
 
Old 12-12-2005, 06:03 AM   #2
abakali
Member
 
Registered: Dec 2005
Location: karachi
Distribution: RedHat
Posts: 75

Rep: Reputation: 15
allow 20 port also .This port using data factching
 
Old 12-12-2005, 06:29 AM   #3
allein2005
LQ Newbie
 
Registered: Dec 2005
Location: Brazil
Distribution: Debian and Slackware
Posts: 6
Blog Entries: 1

Rep: Reputation: 0
Iptables

Hello!
Maybe the following lines below will help.
]# modprobe iptable_nat
iptables -t nat -A POSTROUTING -o
eth0 -j MASQUERADE.
Note: it has help me a lot.

2) Prevent IP spoofing: IP spoofing consists of making one believe that a packet coming from the outside world comes from the interface by which it arrives. Then use as follow
]# echo 1 >/proc/sys/net/ipv4/conf/all/rp_filter.
Some kind of attack becomes avoidable.
I hope it can help you.
Allein2005


Quote:
Originally Posted by rjeeves33
Hi

please excuse my knowledge. I only started playing with IPtables today. I've currently got the following running on my Ubuntu box

:INPUT DROP [92:16380]
:FORWARD DROP [0:0]
:OUTPUT DROP [64:14558]
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 21 -j ACCEPT
COMMIT

Simple isn't it. Shame it doesn't work though. What have I done wrong? The ubuntu box is an ftp server and I at present only want FTP to be allowed over port 21. when I test this I can ftp to the box, log in anonymously. however, when I try to 'ls' from an ftp client it just times out.

Thanks in advance for some pointers. Also any good resources on iptables would be welcome ;-)
 
Old 12-12-2005, 06:55 PM   #4
rjeeves33
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Further info

Hi, thanks for the info. Is there anychance you'd be able to explain the command that is allowing the ftp to work. I don't understand the command and would appreciate if you could explain it. Thanks
 
  


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
*newbie* ftp question involving remote access MooMooMilk Linux - Networking 4 11-19-2005 10:44 PM
I lose ftp access when I disable shell access for user captainObvious Linux - General 3 11-13-2004 05:49 PM
Iptables, FTP, access herc Linux - Security 1 01-08-2004 07:51 PM
Allowing access to FTP server on LAN using IPTABLES - Help please sergio3986 Linux - Security 2 12-18-2003 12:22 PM
ftp and ftp port forwarding with IPtables?? FunkFlex Linux - Security 3 04-24-2002 03:03 AM

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

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