LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-03-2003, 06:34 PM   #1
RVK
Member
 
Registered: Mar 2003
Distribution: Mandrake 9.1
Posts: 42

Rep: Reputation: 15
NAT, linux, XP Pro, and FTP


My XP Pro box is behind a Linux NAT box, can I configure the linux box to forward all FTP requests to my XP box's private IP on my LAN?

How would I do that?

Thanks

-R
 
Old 04-03-2003, 09:50 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Your going to have to use your iptables NAT. Adding this to your iptables should forward outside ftp requests:

iptables -A PREROUTING -t nat -d xxx.xxx.xxx.xxx -i eth0 -p tcp -m tcp --dport 21 -j DNAT --to-destination yyy.yyy.yyy.yyy

Where xxx... is the ip address of your linux box and yyy... is the internal LAN address of your ftp server. And eth0 is your external NIC and eth1 is your internal NIC.

Might have to add this as well to the filter:

iptables -A FORWARD -i eth0 -o eth1 -p tcp -m tcp --dport 21 -m state --state NEW,RELATED -j ACCEPT


HTH
 
  


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
NAT + SMTP problem on SuSE 9.1 Pro Malakim Linux - Networking 0 07-27-2004 11:14 PM
Can't use ftp nat whhappy Linux - Software 4 08-11-2003 05:33 AM
ftp server behind nat alansk Linux - Networking 2 07-17-2003 01:31 AM
ftp server behind NAT bax Linux - Networking 6 03-04-2003 09:41 PM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM

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

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