LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-05-2004, 07:48 AM   #1
spank
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278

Rep: Reputation: 30
port forwarding using iptables (ftp)


i have a linux router and in its lan i have 192.168.0.2 a box that is running a ftpd... i want outside users to be able to connect to it... how can I do it ?
please help... i really don't have the time to read the iptables firewall how-to
 
Old 01-05-2004, 11:15 AM   #2
spank
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278

Original Poster
Rep: Reputation: 30
is this a stupid question ? can it be done ?
thank you

Last edited by spank; 01-05-2004 at 01:09 PM.
 
Old 01-05-2004, 05:52 PM   #3
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
You should know how to use iptables before proceeding. Having said that...
Here is what I have in my router to forward ftp

iptables -A FORWARD -p tcp -d 176.16.1.101 --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 21 -j DNAT --to-destination 176.16.1.101

That may not be the best way to do it, but those would be the lines I would use in MY setup. Yours may be slightly diiferent keeping these from working.
 
Old 01-20-2004, 06:14 AM   #4
spank
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278

Original Poster
Rep: Reputation: 30
I have a ftp on 192.168.0.101 the routers ip is xxx.xxx.xxx.xxx I would like people to be able to connect to 192.168.0.101 through me!
Thanx!
 
  


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
iptables port forwarding geoff3425 Slackware 13 12-20-2011 10:50 AM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
port forwarding with iptables kkennedy Linux - Networking 1 09-01-2005 06:48 PM
iptables port forwarding jefmwols Linux - Networking 9 05-20-2005 04:08 PM
ftp and ftp port forwarding with IPtables?? FunkFlex Linux - Security 3 04-24-2002 03:03 AM

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

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