Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support name-based hosts via TLS SNI #5

Closed
Castaglia opened this issue Apr 5, 2017 · 13 comments
Closed

Support name-based hosts via TLS SNI #5

Castaglia opened this issue Apr 5, 2017 · 13 comments
Assignees

Comments

@Castaglia
Copy link
Owner

Some sites may wish to host large numbers of vhosts on the same IP address. One way that mod_autohost could handle these, in addition to (or related to) [HOST] (see Issue #1) could be to look up the vhost config based on TLS SNI.

Given that the TLS handshake for FTPS connections happens sometime after the initial TCP connection, where any number of commands might happen, supporting SNI will not be as straightforward as destination IP-based lookups. There might be an "initial" config for use such connections, until such time as they provide an SNI via TLS handshake (and/or HOST command).

@Castaglia Castaglia self-assigned this Apr 5, 2017
@jrhay1
Copy link

jrhay1 commented Aug 16, 2018

Any thoughts on when this might be available?

@e-fik123
Copy link

e-fik123 commented Feb 8, 2019

Any progress here? Would be great to have a sni support for PROFTPD

@FGasper
Copy link

FGasper commented Apr 12, 2019

@Castaglia NB: Pure-FTPd just implemented SNI support. Maybe the implementation there would be a useful blueprint?

@Castaglia
Copy link
Owner Author

@e-fik123 ProFTPD's mod_tls does support SNI. This particular feature request is specifically for the mass vhosting capabilities of mod_autohost, to use the SNI, if provided, to select the appropriate configuration. I'm looking into this now.

@FGasper
Copy link

FGasper commented May 25, 2019

Where is the current SNI support documented?

@e-fik123
Copy link

@Castaglia i read the docu for mod_autohost but there is reference only to IP addresses, missing hostnames. If you got any progress or need help, let me know.
as @FGasper mentioned pure-ftpd uses extra deamon for sni support maybe this can be a way to do this.
Pure-ftpd does not support proxying so no alternative for me

@FGasper
Copy link

FGasper commented Jul 22, 2019

If possible, perhaps even use the same SNI daemon that Pure-FTPd uses. There’s no reason to reinvent the wheel, after all.

@e-fik123
Copy link

Any update here? to me this is still important topic. If you need any help let me know.

@Castaglia
Copy link
Owner Author

Notes for myself, for SNI-related configurations:

  • When can we do the lookup for a config, using SNI? Answer: in a LOG_CMD handler for the AUTH TLS command; that is when we know that a TLS handshake occurred.
  • What happens if no SNI is provided? Nothing different than normal.
  • What happens if no matching config for the given SNI is available? Nothing different than normal.
  • What about connection-time limits/ACLs in the new config? They will be ignored.

@Castaglia
Copy link
Owner Author

@FGasper @e-fik123 @jrhay1 FYI, this ticket is about supporting SNI as part of the lookup syntax for these dynamically loaded config files. For SNI support in mod_tls, see proftpd/proftpd#850.

@FGasper
Copy link

FGasper commented Oct 21, 2019

@Castaglia: Just so I’m clear, does the current feature set allow ProFTPd to allow the SNI string to determine which of a set of certificates (either pre-loaded or runtime-determined) is served up?

@Castaglia
Copy link
Owner Author

Castaglia added a commit that referenced this issue Mar 15, 2020
…variable,

for both TLS SNI and FTP HOST uses.
Castaglia added a commit that referenced this issue Mar 15, 2020
…variable,

for both TLS SNI and FTP HOST uses.
Castaglia added a commit that referenced this issue Mar 15, 2020
Issue #5: Implement support for name-based host configs via the `%n` …
@Castaglia
Copy link
Owner Author

Fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants