pfSense Gold Subscription

Author Topic: FTP - client IP instead of pfSense IP?  (Read 8059 times)

0 Members and 1 Guest are viewing this topic.

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
FTP - client IP instead of pfSense IP?
« on: February 07, 2008, 05:27:35 pm »
I've currently got pfSense forwarding FTP traffic to an internal machine with an FTP server running. As it is setup, I always get the pfSense machine's IP address as the connecting IP.

How can I (if possible) configure pfSense so the FTP server sees the original client IP addresses instead of the pfSense IP? I'm assuming I'll have to make a 1:1 mapping or something, I'm just not versed enough in this area to muddle my way through. :)


Thanks!
« Last Edit: February 08, 2008, 11:30:56 am by tthibodeau »

Offline max_firewall

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #1 on: February 20, 2008, 05:41:42 pm »
Hi,

Someone have an answer for that problem, i'm searching this answer too, it's a big bug when you dont know what is the ip address ...

Thank you for your answer.

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #2 on: April 30, 2008, 12:54:20 pm »
bump. Noone?

Offline hoba

  • Administrator
  • Hero Member
  • *****
  • Posts: 5837
  • Karma: +3/-0
  • What was the problem to this solution again?
    • View Profile
    • pfSense
Re: FTP - client IP instead of pfSense IP?
« Reply #3 on: April 30, 2008, 01:15:47 pm »
bump. search!

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #4 on: December 21, 2008, 11:48:08 pm »
bump. search!
Wow! Thank you for that incredibly helpful remark! I NEVER would have imagined of trying to SEARCH for a solution before posting about it...
And thank you for being so helpful as to post a link to a search term that actually brings up the solution for the 2 people in this thread who are searching for help (and probably countless others who don't want to ask for help because of arrogant admins like you boosting their egos by making others feel inferior)...oh, that's right...you didn't!

Offline GruensFroeschli

  • Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5065
  • Karma: +4/-0
  • No i will not fix your computer!
    • View Profile
    • FFXI related
Re: FTP - client IP instead of pfSense IP?
« Reply #5 on: December 22, 2008, 03:12:55 am »
The arrogant admins that develop the software you're using.
Dont you think they might have better things to do than explain to the userbase how networking works?
You have to understand that questions regarding ftp are asked countless times each week.
After a while you get tired of always giving the same answer.
Also it's a sticky at the top of the page of this subforum.

My "personal solution" to ftp-problems:
1: Disable the ftp-helper on all interfaces.
2: Define a port-range on your ftp-server for the data-transfer.
3: forward port 21 and your data-transfer-range to your server. You can do that for multiple WANs.
« Last Edit: December 22, 2008, 03:23:13 am by GruensFroeschli »
We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #6 on: December 22, 2008, 10:37:10 am »
The arrogant admins that develop the software you're using.
Dont you think they might have better things to do than explain to the userbase how networking works?

Then they should have better things to do than insult the very userbase that supports the software

You have to understand that questions regarding ftp are asked countless times each week.
After a while you get tired of always giving the same answer.

That's no excuse for being rude and condescending. If you don't have anything helpful to say, don't say anything. It's not like I was begging for an answer every day. I asked once, 8 months ago.



Offline submicron

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 741
  • Karma: +0/-0
  • I like pie!
    • View Profile
    • BSDPerimeter
Re: FTP - client IP instead of pfSense IP?
« Reply #7 on: December 23, 2008, 10:01:01 am »
Then they should have better things to do than insult the very userbase that supports the software

When you pay their bills, then perhaps you can be critical of their efforts.  If, however, all you want to do is gripe about some problem that has been covered ad nauseum in the support list and forums, then your whining can go to /dev/null.

That's no excuse for being rude and condescending. If you don't have anything helpful to say, don't say anything. It's not like I was begging for an answer every day. I asked once, 8 months ago.

Rudeness and condescention are the norm for people who don't do the basic research.  As was pointed out several times already, this problem has been asked about, and answered.  Do a little looking before posting and maybe you won't be so maltreated. 
I do not respond to PMs demanding help.

Offline GruensFroeschli

  • Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5065
  • Karma: +4/-0
  • No i will not fix your computer!
    • View Profile
    • FFXI related
Re: FTP - client IP instead of pfSense IP?
« Reply #8 on: December 23, 2008, 10:56:24 am »
Someone on the mailing list once sent a great page which you might find interresting:

How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html

I especially like the introduction since it pretty accurately describes what just happend in this thread:
Quote
In the world of hackers, the kind of answers you get to your technical questions depends as much on the way you ask the questions as on the difficulty of developing the answer. This guide will teach you how to ask questions in a way more likely to get you a satisfactory answer.

Now that use of open source has become widespread, you can often get as good answers from other, more experienced users as from hackers. This is a Good Thing; users tend to be just a little bit more tolerant of the kind of failures newbies often have. Still, treating experienced users like hackers in the ways we recommend here will generally be the most effective way to get useful answers out of them, too.

The first thing to understand is that hackers actually like hard problems and good, thought-provoking questions about them. If we didn't, we wouldn't be here. If you give us an interesting question to chew on we'll be grateful to you; good questions are a stimulus and a gift. Good questions help us develop our understanding, and often reveal problems we might not have noticed or thought about otherwise. Among hackers, “Good question!” is a strong and sincere compliment.

Despite this, hackers have a reputation for meeting simple questions with what looks like hostility or arrogance. It sometimes looks like we're reflexively rude to newbies and the ignorant. But this isn't really true.

What we are, unapologetically, is hostile to people who seem to be unwilling to think or to do their own homework before asking questions. People like that are time sinks — they take without giving back, and they waste time we could have spent on another question more interesting and another person more worthy of an answer. We call people like this “losers” (and for historical reasons we sometimes spell it “lusers”).

We realize that there are many people who just want to use the software we write, and who have no interest in learning technical details. For most people, a computer is merely a tool, a means to an end; they have more important things to do and lives to live. We acknowledge that, and don't expect everyone to take an interest in the technical matters that fascinate us. Nevertheless, our style of answering questions is tuned for people who do take such an interest and are willing to be active participants in problem-solving. That's not going to change. Nor should it; if it did, we would become less effective at the things we do best.

We're (largely) volunteers. We take time out of busy lives to answer questions, and at times we're overwhelmed with them. So we filter ruthlessly. In particular, we throw away questions from people who appear to be losers in order to spend our question-answering time more efficiently, on winners.

If you find this attitude obnoxious, condescending, or arrogant, check your assumptions. We're not asking you to genuflect to us — in fact, most of us would love nothing more than to deal with you as an equal and welcome you into our culture, if you put in the effort required to make that possible. But it's simply not efficient for us to try to help people who are not willing to help themselves. It's OK to be ignorant; it's not OK to play stupid.

So, while it isn't necessary to already be technically competent to get attention from us, it is necessary to demonstrate the kind of attitude that leads to competence — alert, thoughtful, observant, willing to be an active partner in developing a solution. If you can't live with this sort of discrimination, we suggest you pay somebody for a commercial support contract instead of asking hackers to personally donate help to you.

If you decide to come to us for help, you don't want to be one of the losers. You don't want to seem like one, either. The best way to get a rapid and responsive answer is to ask it like a person with smarts, confidence, and clues who just happens to need help on one particular problem.
« Last Edit: December 23, 2008, 10:59:48 am by GruensFroeschli »
We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #9 on: December 23, 2008, 04:52:33 pm »
Thank you for the post, GruensFroeschli. I completely understand how these forums work. I have been involved on both sides for over 12 years now.

What bothers me is that people would rather be rude than just ignore the "stupid newbies".

If you look at some of the other posts I've made to this forum, you'll see that I've "given back" wherever I've found a solution so that others would benefit.

The assumption that I didn't even try to search before blindly begging for help is the problem here. The fact is that I searched ad nauseum for a solution, but wasn't able to see anything that was a match. I inquired about the problem to the general user base to see if someone had a suggestion or helpful nudge in the right direction. Not once did I beg an administrator or developer of the app for help, nor did I once criticize the product!

Anyway....this topic has already gone way off and will never be resolved anyway because there will always be the l33t "hackers" who are socially inept and don't know how to interact with other human beings, and there will be the "user" who will never be as knowledgeable as the hackers from whom they are requesting help.

I'll continue searching for the answer that is apparently readily available and not bother asking for assistance in the future.

Offline sullrich

  • Hero Member
  • *****
  • Posts: 5110
  • Karma: +3/-0
    • View Profile
    • pfSense
Re: FTP - client IP instead of pfSense IP?
« Reply #10 on: December 23, 2008, 05:19:11 pm »
The problem is that we employ a ftp helper to help during the process.

Guessing you are using a NAT port forward on port 21 and that invokes the ftp helper behind the scenes.   So incoming FTP from the internet connects to the ftp proxy listening on port 21 of the firewall on the WAN IP.   That then makes the connection back to the FTP server behind the firewall.   Since the connection is coming from the firewall itself that is why you see the firewalls IP address as opposed to the client.

The correct way to resolve this is to employ a 1:1 nat to the ftp server in question and if the ftp server software supports it you might need to turn on PASV nat rewriting.   I know vsftp supports this but I am not privy to the details at the moment.

And finally I take offense to the l33t hackers statement.   I already spend over 50+ hours a week on this project and hold a full time job.   I have a feeling most of the "l33t hackers" are in this same predicament.

If you need quality answers and are not satisfied with the status quo around here then you need to look into commercial support.

But do me a favor and stop targeting folks that spend all of their free time helping this project.  It's not productive and just makes folks want to stop helping that much more....


Offline GruensFroeschli

  • Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5065
  • Karma: +4/-0
  • No i will not fix your computer!
    • View Profile
    • FFXI related
Re: FTP - client IP instead of pfSense IP?
« Reply #11 on: December 23, 2008, 05:24:59 pm »
Quote
I'll continue searching for the answer that is apparently readily available and not bother asking for assistance in the future.

Did my post above how i solve most of my ftp-problems not work?
I know for a fact that the

ftpserver built into the Synology-NAS's
G6 ftpserver
FileZilla ftpserver

work with this solution. So i assume it should work for most other servers as well.
We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #12 on: December 23, 2008, 08:47:15 pm »
And finally I take offense to the l33t hackers statement.   I already spend over 50+ hours a week on this project and hold a full time job.   I have a feeling most of the "l33t hackers" are in this same predicament.

If you need quality answers and are not satisfied with the status quo around here then you need to look into commercial support.

But do me a favor and stop targeting folks that spend all of their free time helping this project.  It's not productive and just makes folks want to stop helping that much more....
I apologize. It was a generalization that obviously doesn't apply to all. I was frustrated that the first response to a request was met with rudeness and I know that I shouldn't respond right away when upset. I really do appreciate all of the hard work that goes into this product. It is the best open source firewall I've ever found and I'm thoroughly impressed with the functionality.

I am actually quite experienced in networking and understand how FTP works and why it is such an issue to setup through NAT, etc. I DID search quite a bit for an answer, but perhaps I was not searching for the correct terms.

I have a perfectly working FTP server. Everything's setup just fine. What I was originally wondering was if there is any way, without locking my external IP to a single machine (ie. 1:1 NAT), to have the originating IP address flow through to the FTP server. I understand that this isn't something that is possible using pfSense and port forwarding and the ftphelper, but I thought there may be a feature that I wasn't aware of that would provide this functionality in conjunction with port forwarding.

As is stands, my FTP server works just fine, and I can live with the fact that I don't see the actual IP connecting to the FTP server.

Thank you all for your comments.


Offline GruensFroeschli

  • Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5065
  • Karma: +4/-0
  • No i will not fix your computer!
    • View Profile
    • FFXI related
Re: FTP - client IP instead of pfSense IP?
« Reply #13 on: December 24, 2008, 02:11:49 am »
Hmmm. I have a filezilla here and it works without 1:1 NAT.
After disabling the ftp-helper i used just normal portforwards.
I assumed every client uses a maximum of 4 connections at a time.
And i expect a maximum of 10 users so i set the passive portrange to 23456 to 23496 --> 40 ports.
We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)

Offline tthibodeau

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: FTP - client IP instead of pfSense IP?
« Reply #14 on: December 24, 2008, 01:30:01 pm »
GruensFroeschli: I had ftphelper on the WAN inteface turned on so that I could connect from inside my network out to the WAN and back in to test the ftp port forwards. I did shut of the ftphelper on all interfaces and, although I can't connect by using my external ftp DNS, I can see the outside users' IP addresses when they connect to FTP.

I mistakenly assumed that because I couldn't access my FTP server using the external DNS name that no external users could either, which is why I kept the ftphelper on in the first place.

So, it IS working as I thought after all. My test methods were just flawed... :(

Is there a way to test external FTP access from within the network where the FTP server is hosted?

Thanks.