Notre blog en mousse \o/ - Mot-clé - installation2024-03-01T10:31:54+01:00Les Lamas !urn:md5:16d806c26b4faf0eabfff608393c3d26DotclearReverse proxy Apache pour RDP over HTTPS (Windows Server 2008 R2)urn:md5:3c59e2ea95e24be30b2d72d2fba4e7d62016-07-25T18:16:00+02:002017-02-09T14:28:49+01:00RulianeAdministrationApachecertificatinstallationlinuxnatpasserelleproxyrdpreversesslwebwindows <p>Générer un certificat autosigné :<br /></p>
<blockquote><p>openssl req -newkey rsa:2048 -nodes -keyout myrdp.mydomain.key -x509 -days 365 -out myrdp.mydomain.crt<br /></p></blockquote>
<blockquote><p>openssl pkcs12 -inkey myrdp.mydomain.key -in myrdp.mydomain.crt -export -out myrdp.mydomain.pfx<br /></p></blockquote>
<p><br />
Importer le certificat dans le magasin "Personnel" du serveur RDS et désactiver tous les rôles sauf "Authentification du serveur".<br />
<br />
Installer le rôle "services de bureau à distance" avec les services de rôle "gestionnaire de passerelle"<br />
<br />
<br />
Config Apache :</p>
<pre>
<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>
</pre>
<p>Issue : le certificat doit être reconnu comme CA sur le client.</p>Échec de l'installation de Mint 17 depuis un live-PXEurn:md5:5af325fc61ccd1c1e7cff22050a2ed262015-05-18T14:32:00+02:002017-02-09T14:14:31+01:00RulianeGeekeriebootdisklessinstallationinstallerlinuxlivemintpxe <p>Suite à <a href="http://www.leslamas.net/index.php?post/2012/08/02/Linux-Mint-Live-en-PXE-par-NFS" hreflang="fr" title="Linux Mint Live en PXE par NFS">ce billet</a>, je me suis rendu compte que l'installateur plante s'il est lancé depuis un "live-PXE".<br />
À l'origine du problème, la procédure de fabrication du fichier de configuration d'APT (gestionnaire de paquets), qui n'est pas adaptée à un "live-PXE". Néanmions, voici comment le contourner.<br />
<br /></p>
<h3>Solution 1 : one-shot</h3>
<p>Une fois Mint démarré, éditer /usr/lib/ubiquity/apt-setup/apt-setup et trouver la ligne suivante :<br /></p>
<pre>
mv $ROOT/etc/apt/sources.list.new $ROOT/etc/apt/sources.list
</pre>
<p>La remplacer par ceci :</p>
<pre>
if [ -f $ROOT/etc/apt/sources.list.new ]; then
mv $ROOT/etc/apt/sources.list.new $ROOT/etc/apt/sources.list
fi
</pre>
<p>Attention : cette modification n'est pas enregistrée. Elle doit donc être faite à chaque redémarrage.<br />
<br /></p>
<h3>Solution 2 : correction permanente</h3>
<p>Cette solution consiste à appliquer le patch ci-avant à l'image SquashFS. Pour ceci, installer les outils squashfs :<br /></p>
<blockquote><p>apt-get install squashfs-tools</p></blockquote>
<p>Décompresser le squashfs de Mint :</p>
<blockquote><p>unsquashfs casper/filesystem.squashfs</p></blockquote>
<p>Appliquer le patch indiqué précédemment.<br />
Recompresser le squashfs :<br /></p>
<blockquote><p>mksquashfs squashfs-root/ filesystem.squashfs -noappend -always-use-fragments</p></blockquote>
<p><br />
3... 2... 1... bootez !</p>Installer Windows depuis un serveur PXE Linuxurn:md5:a86d3b9aa8d21f380f8806a27ba0a69d2012-07-07T20:50:00+02:002014-02-24T20:36:19+01:00RulianeAdministrationdisklessinstallationpxesevenwindowswinpe<p>Voyons comment installer Windows depuis un démarrage PXE. Ceci revient en fait à lancer l'installation de Windows (7 par exemple) depuis un environnement WinPE personnalisé de la manière suivante :<br />
- intégration du pilote Realtek Gigabit PCIe, de plus en plus répandu et indispensable pour lancer l'installation par le réseau ;<br />
- une fois WinPE chargé, montage du media en CIFS contenant le répertoire "source" du média d'installation et lancement de l'assistant.</p> <p>Cette méthode et ce billet sont très largement inspirée de ce très bon billet : <a href="http://doomclaw.de/index.php/2009/08/18/installing-windows-7-with-a-pxe-boot-server/trackback/" hreflang="en" title="Installing Windows 7 with a PXE boot server">Installing Windows 7 with a PXE boot server</a>. Il consiste essentiellement en quelques modifications du script.<br />
<br /></p>
<ul>
<li><a href="http://www.microsoft.com/fr-fr/download/details.aspx?id=5753" title="WAIK pour Windows 7">Télécharger</a> et installer le Windows Automated Installation Kit (WAIK) ;<br /></li>
<li><a href="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#1" hreflang="en">Télécharger</a> le pilote Realtek et le décompresser.<br /></li>
<li>Dans un nouveau fichier (par exemple build.cmd), coller le code suivant après avoir adapté les variables :</li>
</ul>
<pre>
@echo off
cls
REM Variables
echo Setting variables ...
REM the path to your WAIK installation
set WAIKPath=%ProgramFiles%\Windows AIK
echo Set WAIK directory to %WAIKPath%.
REM possible values are: x86, amd64 and ia64
set ARCH=amd64
echo Set architecture to %ARCH%.
set PEPath=C:\winpe_%ARCH%
echo Set temporary working directory for Windows PE to %PEPath%.
set TFTPPath=C:\tftp\Boot
echo Set TFTP boot directory to %TFTPPath%.
set CIFSShare=\\boot\seven_x64
echo Set CIFS share containing the media to %CIFSShare%
set AdditionalDriver=C:\GBE\64\rt64win7.inf
echo Set driver to be added to %AdditionalDriver%
set BCDStore=%TFTPPath%\BCD
echo Set BCDStore to %BCDStore%.
echo All variables set!
echo.
REM Environment check
echo Checking for clean environment...
if not exist "%WAIKPATH%" set NoWAIK=1 && goto :end
if not exist "%WAIKPath%\Tools\PETools\%ARCH%" set NoARCH=1 && goto :end
if exist %PEPath% echo Temporary working directory not empty! Need to remove && rd %PEPath% /S
if exist %PEPath% echo Temporary working directory still not empty! Trying again ... && cd "%WAIKPath%\Tools\%ARCH%" && imagex /unmount %PEPath%\mount && rd %PEPath% /S /Q
if exist %PEPath% set NotClean=1 && goto :end
if exist %TFTPPath% echo TFTP boot directory not empty! Need to remove && rd %TFTPPath% /S
if exist %TFTPPath% set NotClean=1 && goto :end
echo.
echo Starting real work now ...
cd "%WAIKPath%\Tools\PETools"
echo Copying PE-Files ...
call copype %ARCH% %PEPath%
imagex /mountrw %PEPath%\winpe.wim 1 %PEPath%\mount
echo Personnalisation de l'environnement WinPE
echo net use y: %CIFSShare% >> "%PEPath%\mount\Windows\System32\startnet.cmd"
echo y:\setup.exe >> "%PEPath%\mount\Windows\System32\startnet.cmd"
dism /image:%PEPath%\mount /add-driver /driver:%AdditionalDriver%
md %TFTPPath% > NUL
copy %PEPath%\mount\Windows\Boot\PXE\*.* %TFTPPath% > NUL
copy "%WAIKPath%\Tools\PETools\%ARCH%\boot\boot.sdi" %TFTPPath% > NUL
echo Creation du BCD...
cd %PEPath%\mount\Windows\System32
bcdedit -createstore %BCDStore%
bcdedit -store %BCDStore% -create {ramdiskoptions} /d "Ramdisk options"
bcdedit -store %BCDStore% -set {ramdiskoptions} ramdisksdidevice Boot
bcdedit -store %BCDStore% -set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
REM Tokens=3 sur un WAIK en anglais
for /f "Tokens=2" %%i in ('bcdedit /store %BCDStore% /create /d "Windows 7 Install Image" /application osloader') do set GUID=%%i
bcdedit -store %BCDStore% -set %GUID% systemroot \Windows
bcdedit -store %BCDStore% -set %GUID% detecthal yes
bcdedit -store %BCDStore% -set %GUID% winpe yes
bcdedit -store %BCDStore% -set %GUID% osdevice ramdisk=[boot]\Boot\winpe.wim,{ramdiskoptions}
bcdedit -store %BCDStore% -set %GUID% device ramdisk=[boot]\Boot\winpe.wim,{ramdiskoptions}
bcdedit -store %BCDStore% -create {bootmgr} /d "Windows 7 Boot Manager"
bcdedit -store %BCDStore% -set {bootmgr} timeout 30
bcdedit -store %BCDStore% -set {bootmgr} displayorder %GUID%
cd "%WAIKPath%\Tools\PETools"
imagex /unmount /commit %PEPath%\mount
copy %PEPath%\winpe.wim %TFTPPath%
goto :exit
:end
if %NoWAIK%=1 echo "Your WAIK directory was not found. Execution aborted." && pause && goto :exit
if %NoARCH%=1 echo "Your Architecture doesn't seem to be right. Or at least it is not known by your WAIK installation. Execution aborted." && pause && goto :exit
if %NotClean%=1 echo "Your environment was not clean. Execution aborted." && pause && goto :exit
:exit
</pre>
<p><br /></p>
<ul>
<li>Démarrer la console ("Deployment Tools Command Prompt") <strong>en administrateur</strong> et lancer le script build.cmd. Cela génère dans %TFTPPath% plusieurs fichiers à copier dans un répertoire "Boot", lui-même à la racine du serveur TFTP.<br /></li>
</ul>
<p><br /></p>
<ul>
<li>Ajouter le remapping suivant grâce à l'option -m de tftpd-hpa :</li>
</ul>
<pre>
rg \\ /
</pre>
<p><br /></p>
<ul>
<li>Il faut créer le lien symbolique suivant dans <racine TFTP>/Boot :</li>
</ul>
<pre>
ln -s pxeboot.n12 startrom.0
</pre>
<p><br /></p>
<ul>
<li>Ajouter une entrée dans le fichier <racine TFTP>/pxelinux.cfg/default :</li>
</ul>
<pre>
LABEL winpe
MENU LABEL Installation de Windows 7 64 bits
KERNEL Boot/startrom.0
</pre>
<p><br />
<br /></p>
<p>EDIT 24/02/2014 : correction de quelques erreurs dans le script.</p>