LinuxQuestions.org
Help answer threads with 0 replies.
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 07-31-2012, 10:33 AM   #1
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Rep: Reputation: Disabled
FTP with VSFTPD


I set up a FTP server on my computer with vsftpd. I am able to connect to the server with any computer that is connected to the internet on the same network as the server. But when I try to access the server from a computer on another network i geat the errors.
Connection timed out
No route to host
I tried to set up portforawding for ports 20 and 21 but that didn't work.
 
Old 07-31-2012, 11:07 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by wil neeley View Post
No route to host
Does 'host [name of server]' (a the host name like "ftp.domainnam.e") return an IP address?
Does 'tcptraceroute [IP address of server] 21' show it reaches the FTP server?
If the IP address of the FTP server is known (and public) but the port closed then you may be experiencing NAT problems as per your "didn't work".


Quote:
Originally Posted by wil neeley View Post
didn't work.
Show us what rules you set or your complete rule set ('sudo /sbin/iptables-save') if unsure because "doesn't work" means nothing.
 
Old 07-31-2012, 11:49 AM   #3
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
I only know the IP address of the server because a never set up a hostname.
I ran this command but nothing happened.
Quote:
sudo /sbin/iptables-save
I rand the command
Code:
tcptraceroute [IP address of server] 21
and got 1 [my ip] [open] 0.181 ms 0.057 ms 0.051 ms

when i set up port forwarding on my router
I got the error no route to host

with out port forawrding it got the error
connection timed out
and
no route to host

I attached the configuration files for vsftpd
Attached Files
File Type: txt vsftpd.conf.txt (5.4 KB, 6 views)

Last edited by wil neeley; 07-31-2012 at 11:56 AM. Reason: typo
 
Old 07-31-2012, 12:06 PM   #4
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
I just ran the tcptraceroute for port 20 ftp data and it was closed
 
Old 07-31-2012, 12:46 PM   #5
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
that was from a computer on same network

this is from off network computer
21 ftp
tcptraceroute 192.168.1.125 21
Selected device eth0, address 128.119.116.251, port 52522 for outgoing packets
Tracing the path to 192.168.1.125 on TCP port 21 (ftp), 30 hops max
1 mor1-rt-n124a-1-vl551.gw.umass.edu (128.119.116.1) 0.588 ms 0.451 ms 0.428 ms
2 core1-rt-ae-1.gw.umass.edu (128.119.0.226) 0.398 ms 0.435 ms 0.387 ms
3 lgrc-rt-106-8-po-10.gw.umass.edu (128.119.0.233) 0.578 ms 0.527 ms 0.490 ms
4 128.119.2.197 0.641 ms 0.643 ms 0.575 ms
5 * * *
6 * * *
7 128.119.2.197 0.668 ms !H * *

20 ftp data
tcptraceroute 192.168.1.125 20
Selected device eth0, address 128.119.116.251, port 38930 for outgoing packets
Tracing the path to 192.168.1.125 on TCP port 20 (ftp-data), 30 hops max
1 mor1-rt-n124a-1-vl551.gw.umass.edu (128.119.116.1) 0.615 ms 0.504 ms 0.489 ms
2 core1-rt-ae-1.gw.umass.edu (128.119.0.226) 0.442 ms 0.435 ms 0.438 ms
3 lgrc-rt-106-8-po-10.gw.umass.edu (128.119.0.233) 0.606 ms 0.516 ms 0.572 ms
4 128.119.2.197 0.581 ms 0.729 ms 0.573 ms
5 128.119.2.197 0.601 ms !H * *

Last edited by wil neeley; 07-31-2012 at 12:47 PM.
 
Old 07-31-2012, 12:55 PM   #6
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
that was from a computer on network

from off network
port 20 ftp data
tcptraceroute 192.168.1.125 20
Selected device eth0, address 128.119.116.251, port 38930 for outgoing packets
Tracing the path to 192.168.1.125 on TCP port 20 (ftp-data), 30 hops max
1 mor1-rt-n124a-1-vl551.gw.umass.edu (128.119.116.1) 0.615 ms 0.504 ms 0.489 ms
2 core1-rt-ae-1.gw.umass.edu (128.119.0.226) 0.442 ms 0.435 ms 0.438 ms
3 lgrc-rt-106-8-po-10.gw.umass.edu (128.119.0.233) 0.606 ms 0.516 ms 0.572 ms
4 128.119.2.197 0.581 ms 0.729 ms 0.573 ms
5 128.119.2.197 0.601 ms !H * *

port 21 ftp
tcptraceroute 192.168.1.125 21
Selected device eth0, address 128.119.116.251, port 52522 for outgoing packets
Tracing the path to 192.168.1.125 on TCP port 21 (ftp), 30 hops max
1 mor1-rt-n124a-1-vl551.gw.umass.edu (128.119.116.1) 0.588 ms 0.451 ms 0.428 ms
2 core1-rt-ae-1.gw.umass.edu (128.119.0.226) 0.398 ms 0.435 ms 0.387 ms
3 lgrc-rt-106-8-po-10.gw.umass.edu (128.119.0.233) 0.578 ms 0.527 ms 0.490 ms
4 128.119.2.197 0.641 ms 0.643 ms 0.575 ms
5 * * *
6 * * *
7 128.119.2.197 0.668 ms !H * *
 
Old 07-31-2012, 02:38 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by wil neeley View Post
Tracing the path to 192.168.1.125 on TCP port 21 (ftp), 30 hops max
That IP address is in one of the ranges without valid routing on the Internet, namely 192.168.0.0/16 (http://www.team-cymru.org/Services/Bogons/). It is only routable inside your LAN.


Quote:
Originally Posted by wil neeley View Post
I attached the configuration files for vsftpd
You set anonymous_enable=YES. Do not do that unless you know exactly what you are doing. If you must enable anonymous access at least set anon_upload_enable=NO and anon_mkdir_write_enable=NO, harden the machine, limit access through the firewall and ensure you monitor for abuse. Also enable and set a log file with xferlog_file=/var/log/vsftpd.log and log_ftp_protocol=YES or set syslog_enable=YES.
 
Old 07-31-2012, 02:43 PM   #8
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
Is there any way to get a routable Ip address
 
Old 07-31-2012, 02:49 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You already have 128.119.2.197, haven't you?.
 
Old 07-31-2012, 02:54 PM   #10
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
When i run ifconfig i only get 192.168.1.125
i think that 128.119.2.197 is a UMASS ip adrress

thanks for point out the anonymous_enable=YES i thought i had disabeled it
 
Old 07-31-2012, 02:58 PM   #11
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
ok i just thought that was my ip addres because it came up in the connection information
and for if config

do you know how to make a domain name so i don't have to remember my ip address

thanks for point out the anonymous_enable=YES i thought i had disabeled it
 
Old 07-31-2012, 03:11 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by wil neeley View Post
When i run ifconfig i only get 192.168.1.125
Try a whatismyipaddress.{net,com,au,pk,whatever}, browserSpy IP info or see the "REMOTE_ADDR" variable in any publicly accessible env.cgi?


Quote:
Originally Posted by wil neeley View Post
i think that 128.119.2.197 is a UMASS ip adrress
Yes it is. Check if you're allowed to use it?


Quote:
Originally Posted by wil neeley View Post
do you know how to make a domain name so i don't have to remember my ip address
Use any free DDNS service.
 
Old 07-31-2012, 03:17 PM   #13
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
thanks
I don't think i'm using the umass ip. the computer that wasn't on my network was connected to UMASS wireless
when it ran the traceroute program

Last edited by wil neeley; 07-31-2012 at 03:19 PM.
 
Old 07-31-2012, 03:53 PM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by wil neeley View Post
I don't think i'm using the umass ip. the computer that wasn't on my network was connected to UMASS wireless when it ran the traceroute program
Ah, yes, I overlooked that. But the router the FTP server at 192.168.1.125 resides behind does have a public IP address, right? If so and it's hardware what's the brand and type? OTOH if the router is a Linux machine what distribution and version?
 
Old 07-31-2012, 04:29 PM   #15
wil neeley
LQ Newbie
 
Registered: Mar 2012
Distribution: Ubuntu 12.04
Posts: 21

Original Poster
Rep: Reputation: Disabled
The router is a linksys WRT54G

i think it is 192.168.1.1
 
  


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
How to change default /var/ftp/pub in ftp(vsftpd) mohd anas Linux - Networking 3 07-08-2011 02:14 PM
[SOLVED] vsftpd: FTP clients work, ftp://xxxx in mozilla does not. Anonymous user prob? arashi256 Linux - Server 8 01-13-2010 09:31 AM
About the ftp daemon vsftpd lawrence_lee_lee Linux - Software 4 07-12-2007 02:41 AM
What is the FTP Folder in vsFTPd? Ordinary12 Fedora 2 05-14-2007 12:53 AM
vsftpd in ftp clients - a no go ?? ycamera2mank Linux - Software 3 09-04-2005 04:48 PM

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

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