I can't access my FTP server through web browser from remote computer
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can't access my FTP server through web browser from remote computer
Hi,
I have a linux server computer and made FTP server there. The Linux server uses Red Hat v.7.3 (Mapio).
So, in the linux server computer, I can access my FTP server through web browser. The FTP server address is "ftp://ftp.wang-linux1.com".
However, once I try to access my FTP server through web browser from remote computer, I can't access it and I got this error message.
ftp.wang-linux1.com’s server DNS address could not be found.
How can I set DNS address and access it through web browser from remote computer? What am I missing?
I googled to solve this problem. Someone said that I have configure firewall in the linux server computer, but it doesn't have firewall to configure. In terminal, I typed "system-config-firewall" or tried to find "System → Administration → Firewall" but I can't find anything.
First, is this remote computer on the same network or on a different network? (Same network, this will work, different network, we need dynamic DNS or a static publicly routable IP)
If this is the same network.
On the FTP server, find your ip address (ip a)
From the remote computer, ping that IP, and ping ftp.wang-linux1.com
What is likely going to happen here is that the ping to the ip address will work, but the hostname will fail. The remote computer doesn't know what wang-linux1.com is, so it asks your dns server, who also doesn't know what wang-linux1.com is, so it fails. The reason why this works on the local computer is that it knows who wang-linux1.com is, it's itself. (if that's not what happens, let us know)
The "quick and dirty" approach is to add the FTP server as an entry into your /etc/hosts file on the remote computer (if it's linux) or C:\Windows\System32\Drivers\etc\hosts (if the remote computer is windows), then restart the network services on the remote computer
The long term solution is to have a DNS server running and add an entry for the ftp server, which I would defer to a dedicated DNS guide.
The remote computer is windows 10. According to your advice, I edited C:\Windows\System32\Drivers\etc\hosts and added
134.142.322.422 ftp.wang-linux1.com
and reset network. But, it still doesn't work.
The complicate thing is that the linux server computer and the remote windows10 computer are in the same lab, but they are in different network; the linux server is under hospital network, but the windows computer is under university network. I put the linux server computer under S2S VPN, so I can access the linux server from my windows computer through SSH protocol. But it seems like FTP protocol is not open between the two computers. I am going to ask University IT support to open FTP protocol. Then, I will update you.
The "quick and dirty" approach is to add the FTP server as an entry into your /etc/hosts file on the remote computer (if it's linux) or C:\Windows\System32\Drivers\etc\hosts (if the remote computer is windows), then restart the network services on the remote computer
The long term solution is to have a DNS server running and add an entry for the ftp server, which I would defer to a dedicated DNS guide.
It appears that wang-linux1.com is not a "real" domain name...it is available for registration, and has no DNS entries. It must be the hostname of the "linux server computer" or is defined in /etc/hosts as
Code:
127.0.0.1 wang-linux1.com
As such, it would work on the "linux server computer" but not from elsewhere. To use that "domain" from any "remote" computer, you'll need to add it to the /etc/hosts file on the remote computer:
Code:
<IP of the linux server> wang-linux1.com
and that remote computer must be on the same network as the server.
This is the only way you can have a reference to a not-real name for a server.
I added "134.142.322.422 ftp.wang-linux1.com" to etc\hosts file and rebooted the computer. When I typed "ftp://ftp.wang-linux1.com" on the google chrome, I got the same error message.
ftp.wang-linux1.com’s server DNS address could not be found.
I think this is because the linux server and the windows computer are in different network and ftp protocol is not open, even though the two computers are in S2S VPN. I am going to ask university IT support to open ftp protocol between the the computers.
I added "134.142.322.422 ftp.wang-linux1.com" to etc\hosts file and rebooted the computer. When I typed "ftp://ftp.wang-linux1.com" on the google chrome, I got the same error message.
ftp.wang-linux1.com’s server DNS address could not be found.
I think this is because the linux server and the windows computer are in different network and ftp protocol is not open, even though the two computers are in S2S VPN. I am going to ask university IT support to open ftp protocol between the the computers.
Thank you,
Sanghoon
"DNS addess could not be found." would have nothing to do with the status of ftp on the server or in the VPN. The windows PC can't resolve the "domain name" to the IP address...that's a DNS, or in your case, a hosts file problem.
Where is ftp.wang-linux1.com defined on the server? Something there is pointing that "domain" to 127.0.0.1
Can you ping the server from the windows PC by IP address?
Can you ftp://IP_address from the windows PC?
The remote computer is windows 10. According to your advice, I edited C:\Windows\System32\Drivers\etc\hosts and added
134.142.322.422 ftp.wang-linux1.com
and reset network. But, it still doesn't work.
The complicate thing is that the linux server computer and the remote windows10 computer are in the same lab, but they are in different network; the linux server is under hospital network, but the windows computer is under university network. I put the linux server computer under S2S VPN, so I can access the linux server from my windows computer through SSH protocol. But it seems like FTP protocol is not open between the two computers. I am going to ask University IT support to open FTP protocol. Then, I will update you.
Thank you,
Sanghoon
I'm hoping that's not the actual entry you put in the /etc/hosts file (that's an invalid IP address)
If you can telnet from the windows server to the linux server using the IP address on port 21 (Using PuTTY or similar), then you should be fine to go by IP address. Otherwise, you need to open the port.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.