LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-04-2011, 02:39 AM   #1
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Rep: Reputation: 8
FTP replies with external IP address from within LAN


Hi,

I've set up an ftp-server using Vsftpd and it's working perfect outside the LAN.
The server replies with it's external IP address, so for example 213,49,117,194,11,224.
But when I connect locally from within the LAN, it ALSO returns an external IP address. But, obviously, I cannot transfer files then.
How could I fix it?
I use Ubuntu Server 10.04 LTS

Code:
#passive settings
pasv_enable=YES
pasv_max_port=3100
pasv_min_port=3000
pasv_address=ftpronse.dyndns.org
pasv_addr_resolve=YES
port_enable=YES
I know, I use a domain name as passive address, but when I comment this option, the server returs an unroutable IP address...

Thanks in advance!
 
Old 08-04-2011, 03:08 PM   #2
Fantasio
Member
 
Registered: Nov 2007
Location: Vinsobres - Drome - France
Distribution: SuSE Linux 11.3
Posts: 152

Rep: Reputation: 19
Alias in /etc/hosts

You can set an alias in the /etc/hosts with the local address. It should work.
 
Old 08-04-2011, 10:44 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
perhaps this is an overkill of a solution (as a matter of fact, it's a hack).

Did you try setting the IP address of the network interface for this traffic with iptables? perhaps a MASQUERADE or SNAT on POSTROUTING?
 
Old 08-06-2011, 02:04 AM   #4
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Original Poster
Rep: Reputation: 8
Quote:
You can set an alias in the /etc/hosts with the local address. It should work.
That worked for me, thanks!
 
  


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
Can ssh into host on lan using WLAN address, but not through LAN address gurkakrieg Slackware 4 01-05-2010 07:19 AM
How to Bind External IP address to Internal IP address tdog89 Linux - Networking 2 06-28-2009 06:21 AM
Is it possible to adjust NAT settings so one external address is allowed onto LAN NetGuru Linux - Networking 5 03-06-2009 11:00 AM
Can't access my apache2 webserver using external address from LAN eldoran Linux - Networking 6 10-26-2008 03:51 PM
LAN Traffic (Ping, HTTP, FTP) Cannot reach External IP (but can internet) Jkm3141 Linux - Networking 9 04-05-2007 07:46 AM

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

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