LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2013, 07:04 AM   #1
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Rep: Reputation: Disabled
Unable to connect to FTP


I have a physical machine and virtual machine which is using NAT.

IP for physical : 172.24.0.254
IP for virtual: 10.254.0.2

I have setup vsftpd server on virtual machine and opened ports 20,21 on virtual machine in iptables using:

Code:
iptables -I INPUT -s 172.24.0.0/24 -p tcp -m multiport --dport 20,21 -j ACCEPT
iptables -I INPUT -s 172.24.0.0/24 -p udp -m multiport --dport 20,21 -j ACCEPT
But physical machine is unable to connect to ftp. It says.
ftp> no route to host

However, when I use the commands

Code:
iptables -I INPUT -p tcp -m multiport --dport 20,21 -j ACCEPT
iptables -I INPUT  -p udp -m multiport --dport 20,21 -j ACCEPT
it works.

I want to know why is it not accepting a particular source address range.
 
Old 03-16-2013, 08:01 AM   #2
spazticclown
Member
 
Registered: Sep 2010
Distribution: Fedora, Android, CentOS
Posts: 91
Blog Entries: 2

Rep: Reputation: 21
Does it work if you use 10.254.0.0/(I assume 24 for your network) instead of 172.24.0.0/24?

The virtual machine probably sees the incoming address as 10.254.0.1 (assuming that is the virtual gateway address for the NAT virtual network).

I just tested this on my virtual server (using ssh, tcp port 22) and it works for me using the NAT virtual network address.
 
1 members found this post helpful.
Old 03-16-2013, 08:20 AM   #3
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spazticclown View Post
Does it work if you use 10.254.0.0/(I assume 24 for your network) instead of 172.24.0.0/24?

The virtual machine probably sees the incoming address as 10.254.0.1 (assuming that is the virtual gateway address for the NAT virtual network).

I just tested this on my virtual server (using ssh, tcp port 22) and it works for me using the NAT virtual network address.
Thanks for clearing me. It worked as you told.
 
  


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
unable to connect to FTP using squid ganfun Linux - Software 3 05-14-2010 10:33 AM
Unable to connect to redhat 5 server using ssh, ftp. Avadhut Linux - Newbie 6 03-12-2009 12:18 AM
FC9 : SSH OK but unable to connect via FTP, VNC, etc. revof11 Linux - Networking 5 05-29-2008 11:06 AM
Unable to connect with telnet, ssh, ftp, etc... djlerman Linux - Server 1 09-05-2007 03:13 PM
Suddenly unable to connect to my web server and my ftp server. HELP! Silly22 Linux - Software 4 05-23-2004 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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