0

I've installed FileZilla Pro Server on a VPS server, and have it working with SFTP.

At first, I just used the IP address to access the server, but I've since added an ftp.domain.com subdomain to my VPS. This is also working fine.

However, if instead of ftp.domain.com, I use any other domain or subdomain hosted on my server, that also works!

Is there any way to restrict SFTP access to only use ftp.domain.com? And to reject all other domains and subdomains?

Note: There is one IP address for the entire VPS server and adding additional IP addresses isn't an option in the immediate future.

Jonathan Wood
  • 269
  • 1
  • 3
  • 13
  • 1
    Does this answer your question? [Do the SSH or FTP protocols tell the server to which domain I am trying to connect?](https://serverfault.com/questions/672270/do-the-ssh-or-ftp-protocols-tell-the-server-to-which-domain-i-am-trying-to-conne) – Martin Prikryl Nov 28 '22 at 22:09
  • https://filezillapro.com/docs/server/filezilla-pro-enterprise-server/filezilla-pro-enterprise-server-how-to-configure-sftp/ Sounds like a messy question with a messy product site. Request edits to remove both ftp and iis tags. – Lex Li Nov 29 '22 at 07:06
  • Did you possibly only consider IPv4 addresses when you determined adding one is not an option? You might have something like 18446744073709552000 unused addresses ready to use, and not need the other kind. – anx Dec 07 '22 at 07:53
  • @anx: I don't follow you. It's a VPS server and the host is currently providing exactly one IP address. – Jonathan Wood Dec 07 '22 at 15:52

1 Answers1

2

SSH / SFTP does not have concept of virtual hosts in the way http / https protocols have.

Therefore the answer is no. You need to have a separate IP address to limit access.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63