LinuxQuestions.org
Review your favorite Linux distribution.
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 09-19-2002, 01:18 PM   #1
ComFox
LQ Newbie
 
Registered: Sep 2002
Posts: 4

Rep: Reputation: 0
Problem With FTP and Maybe Port forwarding


Hello,

I am trying to set up an ftp server inside my network. Is this possible??? I am trying to forward port 2000 to my internal computer at ip 192.168.0.4 and I think that I am doing that right because I am not getting a log put in the drop log so I am assuming that it is getting through. But on the computer that has the ftp server there is nothing coming up in the log and the person trying to connect gets a timeout error. I type in the internal ip from a machine inside the network and this works fine. Just nothing outside can get in. Please help. I am using Mandrake 8.2 and the ftp server is on WinXP.

P.S is there and walkthrough/how-to for setting up an FTP server on the linux box...then I guess I cuold samba all the computers together and get the files anywhere on the network. This would work too but I don't know how to do it. Thanks in advance.

ComFox
 
Old 09-19-2002, 11:16 PM   #2
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
From the HOW-TO:

http://www.netfilter.org/documentati...T-HOWTO-6.html

6.2 Destination NAT

This is done in the PREROUTING chain, just as the packet comes in; this means that anything else on the Linux box itself (routing, packet filtering) will see the packet going to its `real' destination. It also means that the `-i' (incoming interface) option can be used.

Destination NAT is specified using `-j DNAT', and the `--to-destination' option specifies an IP address, a range of IP addresses, and an optional port or range of ports (for UDP and TCP protocols only).

## Change destination addresses to 5.6.7.8
# iptables -t nat -A PREROUTING -i eth0 -j DNAT --to 5.6.7.8

## Change destination addresses to 5.6.7.8, 5.6.7.9 or 5.6.7.10.
# iptables -t nat -A PREROUTING -i eth0 -j DNAT --to 5.6.7.8-5.6.7.10

## Change destination addresses of web traffic to 5.6.7.8, port 8080.
# iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 \
-j DNAT --to 5.6.7.8:8080

Hope this is helpful,

-bbeers
 
  


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
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 08:35 PM
FTP port forwarding tomammon Linux - Networking 1 10-15-2004 07:49 AM
port forwarding using iptables (ftp) spank Linux - Newbie 3 01-20-2004 07:14 AM
port forwarding problem roueleader Linux - Newbie 9 06-11-2002 05:44 PM
ftp and ftp port forwarding with IPtables?? FunkFlex Linux - Security 3 04-24-2002 04:03 AM


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