I have a quick question, I have my DMZ set up on the 192.168.0.0 network, on that network I have a Server running Proxmox, where I have a VM that has Virtualmin installed on it, I also have another VM with OpenMediaVault on it, that I want to make a public facing FTPS site.
Right now my Virtualmin uses webhost,domain,com. And on it, I have a my www,domain,com virtual host. So I have both of those redirected to my public IP from my DNS provider. What I want to do is create a ftps,domain,com subdomain and redirect it to my server. Now I’m guessing since it’s coming through HTTPS, it will be redirected to virtualmin, is there a way to use virtualmin to redirect it to the ftp server IP?
Virtualmin is not the web server you use to serve your sites in a Virtualmin system. That’s either Apache or nginx, depending on the installation you chose.
This guess is wrong.
It is not redirected anywhere. https (port 443) is served by the web server (Apache or nginx) in a Virtualmin system.
FTP, as in the FTP protocol? Of course not. An FTP client is not (generally) an HTTP client and cannot be sent HTTP status codes like a 301/302 redirect. (But, an FTP client would not be connecting to HTTPS; there are dedicated ports for FTP.)
I don’t know what you’re trying to accomplish here. If you want to run an FTP server on a different IP just add an ftp.domain.tld A record to your DNS with the IP of the FTP server.
Sorry if my question was a little confusing, it was late at night and I’m not sure I explained very well. My question is, both my FTP and webhost server are in my home network, so they share the same external IP. As far as I understand, I would need either Apache or Nginx to redirect ftp,domain,tld to port 21 internally so my router can redirect it to the FTP server, or just making it ftp,domain,tld on my A Record will attach the port 21 to the package for my router to redirect?
This is how my DMZ is set up, to what I can understand, I would need a webserver in between the Router and the servers to redirect the packages right? That’s why I was wondering if I could use the Apache server in Virtualmin to achieve this.
Just forward the FTP ports to your FTP server and the HTTP/HTTPS ports to your web server at your router. Redirecting from a web server to an FTP server doesn’t even make sense. They’re two different protocols, and while some web browsers can make FTP requests and some FTP clients have HTTP clients built-in, you cannot do a 301/302 redirect on your web server and expect it to be usable by the majority of FTP users.
A “redirect” is not the same thing as port forwarding (or proxying). You need to do port forwarding.
Ok, I think I’m understanding what you’re saying. So I redirect the A record, and then Port Foward 21 to my FTP server on my router, which I already did, but then I have to use a third part program Filezilla or something to connect to it? What I wanted to achieve was go to the ftp,domain,tld from Chrome and be able to access it, would that be something doable?
You keep using the word “redirect” in ways it does not make sense. You do not redirect anything. Your A record is always for your public IP, if you only have one. There is nothing to redirect. All of your names, whatever names you have, point to one IP, because you only have one public IP.
The work happens on your router. You forward the web ports (80/443, maybe 10000 and 20000 if you want Virtualmin and Usermin visible to the world) to your web server internal IP, and you forward the FTP ports to the FTP server internal IP.
Finally, you are no longer allowed to use the word “redirect” again until you learn what it means. (But, since what you need to do does not involve any “redirects” at all, you could just not say it anymore, and you won’t have to learn what it means.)
Haha, okay. So like right now, when I go to ftp,domain,tld, Chrome adds the https up front and the router sends it to my website hosted on Virtualmin. So my question would be, how can I make the router know that ftp,domain,tld is supposed to be used on port 21.
Edit: I was doing some thinking in the shower just now, I believe I have my concepts mixed up. What I’m trying to accomplish is like a SharePoint or DropBox website, but that cannot be accomplished through FTP, by definition you need an FTP client for that, sorry for my lack of judgement there. Now the new question arise, how can a file sharing website be done in Virtualmin?
Read for example about owncloud or nextcloud ( dropbox alike) is free and could do it i guess.
For most of that solutions you need a kind of software at client side, is better to have that, it should be a little proactive thing , for dropbox you have such extra little work to for almost all file sharing it should nog be to open or easy.
You cannot and should not. You can make your router forward ports 20 and 21 to your FTP server and ports 80 and 443 to your web server. Names are irrelevant.