LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-16-2003, 07:02 AM   #1
eXor
Member
 
Registered: Mar 2002
Location: Sweden
Distribution: Slackware 10.1
Posts: 103

Rep: Reputation: 15
Question Two Ftp servers on diffrent computers?


Here is my big problem!

My system is:
Slackware 8.1 (router/firewall)
Running Arno's IPTABLES Firewall Script!


I wan't to run an FTP server (Proftpd standalone) on my Linux server on port 1111.
And I allso want to run a FTP server (G6 FTP server) on my windows XP box on port 1112 that is connect to my linux box on port 192.168.0.2.

What port should I forward to 192.168.0.2 to get i work on port 1112?
And what port should I open to my linux box to get port 1111 work?

Every thing is working on my internal net. I can connect to both ftp clients. No problems. But I can connect to none of the ftp servers from Internet. I can connect to the ftps but I can't list them. So I think there must be some problem with the ports. Is there any more port I must open to get it work.

Noteable is that if I configureat any of the ftp clients on port 21 than it works like a charm to connect from internet. Why I don't know!!!!

I have tested to connect to the ftp servers both in passive and in active mode!

PLEASE HELP ME!!!
 
Old 01-16-2003, 02:56 PM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
Well, I do not know Slack so maybe my suggestions turn out to be missed, but I see nobody wants to answer, so ...

You should have already got one of the line in the iptables chains:
iptables -t nat -A POSTROUTING -o $ext_eth -j SNAT --to-source=$linux_box_ext_ip
or
iptables -t nat -A POSTROUTING -o $ext_eth -j MASQUERADE
I believe you have also got the line:
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

To allow linux box ftp be seen on port 1111 as $linux_box_ext_ip:1111from the world add:
iptables -A INPUT -d $linux_box_ext_ip -m state --state NEW -i $ext_eth -p tcp --dport 1111 -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

To allow internal ftp working on 192.168.0.2:1112 to be seen from the world as $linux_box_ext_ip:1112 try:
iptables -t nat -A PREROUTING -i $ext_eth -p tcp --dport 1112 -j DNAT -to-destination=192.168.0.2
iptables -A FORWARD -m state --state NEW -i $ext_eth -p tcp --dport 1112 -j ACCEPT

Last edited by dorian33; 01-16-2003 at 02:57 PM.
 
  


Reply



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
FTP Servers grahammm Linux - Software 1 08-02-2004 07:15 AM
FTP Servers booya72 Linux - General 3 02-16-2004 09:02 AM
FTP Servers torman89 Linux - Software 3 11-30-2003 07:36 PM
two ftp servers on same machine alpesh Linux - Security 3 08-20-2003 10:20 PM
FTP and Web Servers xtremcoder Linux - Networking 2 06-16-2003 08:14 PM

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

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