Spread Linux

Categories


Recent Comments:



FeedWind
FeedWind
Get Linux

Baudizm at Blogged

August 20, 2008

Allow outbound FTP through PFSense firewall

Filed under: General OpenSource, Tips and Tricks - baudizm @ 1:30 pm

PFSense is a great tool to have that provides a firewall, traffic shaping capabilities, load balancing and failover, and other features plus fully extensible by way of third party opensource “plugins” and packages that you can install via its web console.

Recently though, some of our devs need to connect via FTP to a remote server. And apparently they’ve encountered some weird problem with FTP:

user@ubuntu:~$ ftp some-server.com
Connected to some-server.com.
220 ProFTPD 1.3.1 Server (some-server.com) [143.44.52.54]
Name (some-server.com:user): ftpuser
331 Password required for ftpuser
Password:
230 User ftpuser logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
500 Illegal PORT command
ftp: bind: Address already in use

ftp>

A little investigation revealed that in order for FTP to work, we need to have the FTP Helper proxy application working on the LAN interface of our PFSense box, then add a firewall rule, more like a “transparent FTP proxy”. If you get my drift.

Let’s do it

1. In PFSense, click on Interfaces, LAN

Click on Interfaces | LAN

2. Make sure that “Disable the userland FTP-Proxy application” is unchecked.

3. Save your setting, and then click “Apply this setting”.

4. We will now add a rule to permit our LAN traffic to access our FTP-Proxy application ports 8000-8030 on 127.0.0.1 . To do so, click on the “+” button at the bottom or at the top, of the list of rules to add your new rule. Make sure that the new rule will be on top of all the other rules.

Click  Firewall

Setup your new rule.

Put the new rule above all other rules.

5. Save your new settings, and apply.

Test your FTP connection.

Enjoy!

Technorati Technorati , , , , ,
Site Search Tags: , , , , ,


8 Comments »

The URI to TrackBack this entry is: http://baudizm.blogsome.com/2008/08/20/allow-outbound-ftp-through-pfsense-firewall/trackback/

  1. DUDE! You’re a freakin lifesaver. I was bashing my head against the wall trying to fix this…

    Comment by Arvin — August 28, 2008 @ 7:22 am

  2. Hi Arvin,

    Thanks for dropping by. Glad that it helped you out. It also bugged me for a few hours. Feel free to send a trackback or a link.

    Regards!

    Comment by hardwyrd — August 28, 2008 @ 9:53 pm

  3. Wow, I had the same problem, But your solution was wow. Thanks a million.

    Comment by Edward Odonkor — October 7, 2008 @ 4:41 pm

  4. Thanks a alot this help me a lot.

    WOW you are a star

    Comment by Edward Odonkor — October 7, 2008 @ 5:08 pm

  5. Just to add one little thing that if load balancing add one more rule to forward FTP traffic to default Gateway or some defined gateway.

    Comment by Tariq — November 27, 2008 @ 5:30 pm

  6. WOW! You rock! It worked. I’ve been looking for this fix for a long time.

    Thanks.

    Comment by Benson — August 17, 2009 @ 5:36 am

  7. thank you man. you’ve really helped me

    Comment by r00t — September 8, 2009 @ 6:19 pm

  8. Thank so much, this has been driving me mad!

    Comment by Nick — October 7, 2009 @ 6:11 pm

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Get free blog up and running in minutes with Blogsome | Theme designs available here