FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 8th, 2002, 06:23 PM
munkfish's Avatar
munkfish munkfish is offline
funky munky
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2001
Location: UK
Posts: 1,446 munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 18 h 33 m
Reputation Power: 10
Accessing FTP Services From a NAT'd client

I have my FreeBSD working as a NAT router for my home network, so I use my Windows machine as my primary machine and connect to the internet through the FreeBSD machine.

Now whilst this setup is fine for accessing services such as http, pop and smtp from the masqueraded client, I cannot access FTP services consistently. By consistently I mean to say that I can access some FTP servers OK (upload and download is fine), but with some others I cannot - the aliased ftp client connects to the remote ftp server, but then fails to retrieve a directory listing on it.

Presently I am using a PPP connection, using the following /etc/ppp/ppp.conf settings:
Code:
# the next uncommented line indicates that NAT should be used:
nat enable yes

# the next uncommented line indicates that the NAT engine
# should use sockets (ensures FTP ok):
nat use_sockets yes

which I thought had resolved the problem since it works ok on some ftp servers, as mentioned above. However on other ftp servers it does not allow me access from the aliased ftp client. Is this an ftp client configuration issue (anything to do with the transfer mode 'PASSIVE/ACTIVE')?

Regardless of the fact I'm using PPP, what would be the preferred option for correctly routing ftp transfers to/from the masqueraded client (I'd really rather not do it using PPP to masquerade clients on the LAN)? Should I begin to look at ipf or another filtering package to address my NAT requirements?

Thanks in advance,
Jez

Reply With Quote
  #2  
Old January 8th, 2002, 07:43 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> an ftp client configuration issue (anything to do with the transfer mode 'PASSIVE/ACTIVE')

Yes.

>>Should I begin to look at ipf or another filtering package to address my NAT requirements?

Yes.

For example, /etc/ipnat.rules:

map dc0 192.168.0.0/24 -> 12.34.56.78/32 proxy port ftp ftp/tcp
map dc0 192.168.0.0/24 -> 12.34.56.78/32 portmap tcp/udp 10000:60000
map dc0 192.168.0.0/24 -> 12.34.56.78/32

where 12.34.56.78/32 is the static IP on external NIC: dc0. If you have dynamic IP, use 0/32 instead.

Reply With Quote
  #3  
Old January 9th, 2002, 03:41 PM
munkfish's Avatar
munkfish munkfish is offline
funky munky
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2001
Location: UK
Posts: 1,446 munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 18 h 33 m
Reputation Power: 10
Thanks for the reply. I think I'll read up on ipf tonight - I presume filtering at the kernel level is more stable/secure than at the software/ppp level and so should be done.

As for your ruleset posted above, I'll keep the ftp proxy idea in mind and no doubt I'll come across it in reading the ipf man and other docs (any links on setting up NAT on FreeBSD welcomed!). I am right in looking at ipf for NAT aren't I - what other options are there, or is ipf the standard?

Thanks in advance.

Reply With Quote
  #4  
Old January 9th, 2002, 04:22 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Go to the official site -> http://coombs.anu.edu.au/~avalon/ip-filter.html
There should be plenty of Howtos for you to get started.

You are welcome to post some rulesets if you have any questions.

>> what other options are there, or is ipf the standard?

In FreeBSD, of course, there is ipfw. Not trying to start a flame war of ipf vs. ipfw. Personally I like ipf over ipfw.

Reply With Quote
  #5  
Old January 23rd, 2002, 04:43 PM
munkfish's Avatar
munkfish munkfish is offline
funky munky
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2001
Location: UK
Posts: 1,446 munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 18 h 33 m
Reputation Power: 10
Well, after a while I've got the ftp proxy support enabled ok (and learnt a fair bit in the process). Thanks for your time freebsd.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Accessing FTP Services From a NAT'd client


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT