Reverse proxy Apache pour RDP over HTTPS (Windows Server 2008 R2)

Générer un certificat autosigné : openssl req -newkey rsa:2048 -nodes -keyout myrdp.mydomain.key -x509 -days 365 -out myrdp.mydomain.crt openssl pkcs12 -inkey myrdp.mydomain.key -in myrdp.mydomain.crt -export -out myrdp.mydomain.pfx Importer le certificat dans le magasin “Personnel” du serveur RDS et désactiver tous les rôles sauf “Authentification du serveur”. Installer le rôle “services de bureau à distance” avec les services de rôle “gestionnaire de passerelle” Config Apache : <VirtualHost *:443> ServerName myRDP.domain SSLEngine On SSLCertificateFile /etc/apache2/ssl/myrdp.crt SSLCertificateKeyFile /etc/apache2/ssl/myrdp.key CustomLog ${APACHE_LOG_DIR}/myrdp.log combined ErrorLog ${APACHE_LOG_DIR}/myrdp.log #LogLevel info proxy_msrpc:trace2 SSLProxyEngine On SSLProxyCheckPeerCN Off SSLProxyCheckPeerName Off # Enable RPC over HTTPS OutlookAnywherePassthrough On #LogLevel info proxy_msrpc:trace2 ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / https://RDPServer/ ProxyPassReverse / https://RDPServer/ </VirtualHost> <VirtualHost *:80> ServerName myrdp.domain Redirect / "https://myrdp.domain/" CustomLog ${APACHE_LOG_DIR}/myrdp.log combined ErrorLog ${APACHE_LOG_DIR}/myrdp.log </VirtualHost> Issue : le certificat doit être reconnu comme CA sur le client.

July 25, 2016 · Ruliane

Reverse proxy avec Apache

1) Activer les modules proxy, proxy_http et proxy_connect pour apache # a2enmod proxy # a2enmod proxy_http # a2enmod proxy_connect 2) Définir le VirtualHost (exemple pour un webmail) <VirtualHost *:80> ServerName webmail.leslamas.net ServerAlias webmail.leslamas.net ProxyPass / http://addresse_du_serveur/ ProxyPassReverse / http://addresse_du_serveur/ <Proxy *> Order deny,allow Allow from all </Proxy> </VirtualHost> 3) Activer le VHost (sauf si défini dans /etc/apache2/site-enabled/) 4) Redémarrer Appache

November 30, 2010 · Bishop