IIS
21 Topicsusing IIS URL Rewrite module for HTTP to HTTPS
I have installed the URL Rewrite module in IIS 10 to redirect HTTP calls to HTTPS, and I have attempted to set up the redirect but have not gotten it working on one server. Here is the issue: Server1 with IP 1.1.1.1 is running IIS with an https enabled website. An outside DNS has assigned gohere.com to IP 1.1.1.1. When users attempt to get to http://gohere.com the connection times out and it is not redirected to https://gohere.com Accessing https://gohere.com works without an issue. Here is the rewrite code from the web.config file. <rewrite> <rules> <rule name="HTTP to HTTPS" patternSyntax="Wildcard" stopProcessing="true"> <match url="http://gohere.com*" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://gohere.com" appendQueryString="false" /> </rule> </rules> </rewrite> I have also tried using match url=".*" Any ideas on what might be causing the issue? Or something to try to get it working? Thanks! Jim3.3KViews0likes2CommentsHow to prevent Malicious HTTP Redirections on an Exchange server
Hello All! I am attempting to assist a customer who is trying to pass PCI scans. By default, their IP addresses redirects any HTTPS (443) requests to the Exchange server's OWA. This is fine, except the scan states that the server does not pass a couple of vulnerabilities, one of them being "Redirection via Arbitrary Host Header Manipulation". As a solution, they recommended whitelisting domains, only allow permitted domains to be included in the Host header. I (for the life of me) cannot figure out how to get this to work on a server who's default website is the Exchange OWA. Every time I try to implement a rule in IIS (see: https://techcommunity.microsoft.com/t5/iis-support-blog/host-header-vulnerability/ba-p/1031958) that would redirect any requests that don't match the supplied string to the desired domain name, the page won't load and I get "ERR_TOO_MANY_REDIRECTS" presumably because of Exchange's automatic OWA redirection. Is there a way I can prevent malicious HTTP redirections without breaking OWA? To clarify: there are two domain names on our DNS that lead to the IP address of the Exchange server: mail.domain.com and vpn.otherdomain.com, obviously one is meant for mail and the other one is meant for vpn access over port 8443. The main domain (domain.com) leads to a completely different IP address that hosts their public website. I would like to change the IIS settings on the Exchange server so that mail.domain.com is the only domain allowed to be requested through an HTTP request.2.7KViews0likes2CommentsIIS | APPCMD.exe nedir? (tr-TR)
AppCmd.exe, IIS 10.0 ve üstünde bulunan web sitelerini yönetmek için kullanılan komut satırı uygulama aracıdır. AppCmd, web sunucunuzu GUI kullanmadan kolayca kontrol etmenizi yönetmenizi kolaylaştıran komutlar bütünüdür. AppCmd başlıca kabiliyetleri aşağıdaki gibidir. Siteler, uygulamalar, uygulama havuzları ve sanal dizinler oluşturup yönetebilirsiniz. Siteleri, site havuzlarının işlemlerini başlatıp ve durdurabilirsiniz. Aktif işlemleri listeleyin ve anlık yürütülen işlemleri inceleyebilirsiniz. IIS yapılandırma ayarlarınızı import yada export edebilirsiniz. Appcmd.exe çalıştırmak için sisteminizde IIS 10.0 yüklü olması gerekmektedir. Ek bilgi olarak belirtmek isterim. IIS 7.0 ve sonrası web serverlarda appcmd.exe komutunu kullanabilirsiniz. Appcmd.exe komutunu çalıştırmak için CMD komut satırınızı yönetici olarak çalıştırınız ve "%windir%\system32\inetsrv\" dizinine gidiniz. Appcmd.exe yazıp enter basınız. C:\windows\System32\inetsrv>appcmd.exe General purpose IIS command line administration tool. APPCMD (command) (object-type) <identifier> </parameter1:value1 ...> Supported object types: SITE Administration of virtual sites APP Administration of applications VDIR Administration of virtual directories APPPOOL Administration of application pools CONFIG Administration of general configuration sections WP Administration of worker processes REQUEST Administration of HTTP requests MODULE Administration of server modules BACKUP Administration of server configuration backups TRACE Working with failed request trace logs BINDING Object for working with SSL bindings (To list commands supported by each object use /?, e.g. 'appcmd.exe site /?') General parameters: /? Display context-sensitive help message. /text<:value> Generate output in text format (default). /text:* shows all object properties in detail view. /text:<attribute> shows the value of the specified attribute for each object. /xml Generate output in XML format. Use this to produce output that can be sent to another command running in /in mode. /in or - Read and operate on XML input from standard input. Use this to operate on input produced by another command running in /xml mode. /config<:*> Show configuration for displayed objects. /config:* also includes inherited configuration. /metadata Show configuration metadata when displaying configuration. /commit Set config path where configuration changes are saved. Can specify either a specific configuration path, "site", "app", "parent", or "url" to save to the appropriate portion of the path being edited by the command, "apphost", "webroot", or "machine" for the corresponding configuration level. /apphostconfig Specify an alternate applicationHost.config file to edit. /debug Show debugging information for command execution. Use "!" to escape parameters that have same names as the general parameters, like "/!debug:value" to set a config property named "debug". C:\windows\System32\inetsrv> Appcmd komutu kullanımı sırasında parametre yada objelerle çalışırken yardım almak için tüm cmd komutlarında olduğu gibi appcmd.exe /? Yapmanız yeterli olacaktır. Örnek olarak en çok kullanılan appcmd site komutu ile başlayalım. appcmd site /? yaparak site komutu ile neler yapabilriz bakalım. C:\windows\System32\inetsrv>appcmd site /? Administration of virtual sites APPCMD (command) SITE <identifier> <-parameter1:value1 ...> Supported commands: list List virtual sites set Configure virtual site add Add new virtual site delete Delete virtual site start Start virtual site stop Stop virtual site (To get help for each command use /?, e.g. 'appcmd.exe add site /?'.) C:\windows\System32\inetsrv> Örneğimizi biraz dah geliştirip IIS10.0 üzerinde bulunan web sitelerimizin listesini alalım. appcmd list site komutu ile kontrol edelim. C:\windows\System32\inetsrv>appcmd list site SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started) SITE "Reporter" (id:2,bindings:https/:1239:,state:Started) SITE "ozan site" (id:7,bindings:http/*:80:ozantest.com,state:Unknown) C:\windows\System32\inetsrv> 3 adet web sitesi çalışmakta olduğunu görüntülüyorum. Web serverim üzerinde. Yeni bir tane site eklemek istediğimizde appcmd add site komutu ile bu işlemi gerçekleştirebilirsiniz. Ben bindings ve path yapılandırmasınıda bu komutuma ekleyeceğim sizlerinde bu şekilde yapmanızı tavsiye ederim. GUI üzerinde daha sonra hata almamanız için path ve bandings ayarlarınızı yapılandırmanız önemlidir. C:\windows\System32\inetsrv>AppCmd add site /name:ozan /id:18 /bindings:http/*:81: /physicalPath:C:\ozan SITE object "ozan" added APP object "ozan/" added VDIR object "ozan/" added C:\windows\System32\inetsrv> List komutu ile yeni web sitemi tekrar kontrol ediyorum. C:\windows\System32\inetsrv>appcmd list site SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started) SITE "VeeamReporter" (id:2,bindings:https/:1239:,state:Started) SITE "ozan site" (id:7,bindings:http/*:80:ozantest.com,state:Unknown) SITE "ozan" (id:18,bindings:http/*:81:,state:Started) C:\windows\System32\inetsrv> En son satırda eklediğimiz yeni web sitesini görebilirsiniz. Listeleme kapsamında çalışan durmuş olan yada bilinmeyen web uygulamalarını listeleyebilirsiniz. C:\windows\System32\inetsrv>appcmd list sites /state:started SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started) SITE "VeeamReporter" (id:2,bindings:https/:1239:,state:Started) SITE "ozan" (id:18,bindings:http/*:81:,state:Started) C:\windows\System32\inetsrv>appcmd list sites /state:stopped C:\windows\System32\inetsrv>appcmd list sites /state:unknown SITE "ozan site" (id:7,bindings:http/*:80:ozantest.com,state:Unknown) C:\windows\System32\inetsrv> Bir web sitenizin config görüntülemek için /config parametresini kullanabilrisiniz. C:\windows\System32\inetsrv>appcmd list sites "Default Web Site" /config <site name="Default Web Site" id="1"> <bindings> <binding protocol="http" bindingInformation="*:80:" /> </bindings> <limits /> <logFile> <customFields> </customFields> </logFile> <traceFailedRequestsLogging /> <hsts /> <applicationDefaults /> <virtualDirectoryDefaults /> <ftpServer> <connections /> <security> <dataChannelSecurity /> <commandFiltering> </commandFiltering> <ssl /> <sslClientCertificates /> <authentication> <anonymousAuthentication /> <basicAuthentication /> <clientCertAuthentication /> <customAuthentication> <providers> </providers> </customAuthentication> </authentication> <customAuthorization> <provider /> </customAuthorization> </security> <customFeatures> <providers> </providers> </customFeatures> <messages /> <fileHandling /> <firewallSupport /> <userIsolation> <activeDirectory /> </userIsolation> <directoryBrowse /> <logFile /> </ftpServer> <application path="/"> <virtualDirectoryDefaults /> <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" /> </application> </site> C:\windows\System32\inetsrv>1.8KViews1like0CommentsAsp.net site hosted on IIS and https Redirect
Hello Asp.net website hosted on IIS 10 and URL redirect only to https. <rewrite> <rules> <rule name="Redirect HTTP to HTTPS" stopProcessing="true" enabled="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="true"> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" /> </rule> </rules> <outboundRules> <rule name="Add the STS header in HTTPS responses"> <match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" /> <conditions> <add input="{HTTPS}" pattern="on" /> </conditions> <action type="Rewrite" value="max-age=31536000;preload=true;" /> </rule> </outboundRules> </rewrite> it works with IE but Edge/chrome browser show this error message and then displays actual page. Hmmm… can't reach this page. It looks like the webpage at https://URL might be having issues, or it may have moved permanently to a new web address.ERR_UNEXPECTED How to resolve this issue? Thank you1.4KViews0likes0CommentsIIS | HTTP Error 404.11 hata kodunun APPCMD.exe ile çözümü
IIS kullanıcılarının zaman zaman karşılaştığı bir sorundur. Genelde HTTP Error 404.11 - URL_DOUBLE_ESCAPED hatası olarak bilinine bu hatanın temel sebebi HTTP istekleri çift gelmesinden kaynaklıdır. Sunucu da bu istekleri kabul etmediği için bu hatayı alırsınız. Çözümü için aşağıdaki adımları uygulayabilirsiniz. Windows işletim sisteminizin CMD komut satırını açınız. Komut satırında "%windir%\system32\inetsrv" dizininde gidiniz. appcmd.exe ve ilgili parametreleri aşağıdaki şekilde giriniz ve enter tuşuna basınız. Appcmd set config "Default Web Site" /section:system.webServer/Security/requestFiltering -allowDoubleEscaping:True Bu komut ile web.config dosyasında gerekli düzenlemeleri yapmış olacaksınız appcmd set config "Default Web Site" /section:system.webServer/Security/requestFiltering -allowDoubleEscaping:True /commit:appHost Bu komut ile appllicationHost.config dosyasında gerekli düzenlemeleri yapmış olacaksınız. Not: Yazılımınıza ait özel bir web.config dosyası kullanıyorsanız "allowdoubleescaping" parametresini kontrol etmenizi öneririm.1.1KViews1like0CommentsIIS | APPCMD.exe ile default document eklemek (tr-TR)
APPCMD komutları ile IIS 10.0 yonetimi yazılarımıza devam ediyorum. Varsayılan dokuman kapsamında yeni bir default documents eklemek isterseniz APPCMD komutu ile bu işlemi çok basit bir komut ile gerçekleştirebilirsiniz. APPCMD ile default document oluştumak isterseniz ilk olarak IIS "default documant" feature yüklü olması gerekmektedir. "Default Document" yüklemek için aşağıdaki PowerShell komutu ile "default document" feature yükleyebilirsiniz. Install-WindowsFeature Web-Default-Doc Feature yüklemesi tamamlandıktan sonra default document tanımlamak için APPCMD komut dizinine gidiyoruz. Yazımızda örnek olarak index.php ekleyerek devam edebiliriz. IIS10.0 kurulumu sonrası default document listesinde gelmeyen "index.php" ekleyerek işlemimiz gerçekleştreceğim. appcmd set config /section:defaultDocument /+files.[value='index.php'] C:\Windows\System32\inetsrv>appcmd set config /section:defaultDocument /+files.[value='index.php'] Applied configuration changes to section "system.webServer/defaultDocument" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST" Eklediğinzi yada yükleme ile gelen varsayılan bir default document silmek içinde komutumuzda "+" yerine "-" kullanarak gerçekleştirebilirsiniz. appcmd set config /section:defaultDocument /-files.[value='index.php'] C:\Windows\System32\inetsrv>appcmd set config /section:defaultDocument /-files.[value='index.php'] Applied configuration changes to section "system.webServer/defaultDocument" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"1KViews1like0CommentsIIS | APPCMD.exe ile config backup işlemi (tr-TR)
IIS10.0 üzerinde bir çok config yaptınız ve IIS configlerinizi bir başka web server üzerinde kullanmanız yada bunları bir şekilde yedekleme ihtiyacı duyduğunuzda APPCMD komutu ile config dosylarınızın yedeklerini alabilir hatta bunları sıkıştırararak saklayabilirsiniz. Mesala bu komutları task schedule ile planlayıp düzenli olarak yedeklerini alabilirsiniz. Appcmd add backup "0zan-%date%" C:\Windows\System32\inetsrv>Appcmd add backup "0zan-%date%" BACKUP object "0zan-Sal 21.05.2019" added Aldığınız backupları sıkıştırıp arşivlemek içinde aşağıdaki komutu kullanabilirsiniz. "C:\Program Files\WinZip\winzip64.exe" a "C:\inetpub\backup\ozan-%date%.zip" u "C:\Windows\System32\inetsrv\backup\ozan-%date%" C:\Windows\System32\inetsrv>"C:\Program Files\WinZip\winzip64.exe" a "C:\inetpub\backup\ozan-%date%.zip" u "C:\Windows\System32\inetsrv\backup\ozan-%date%"852Views1like0CommentsIIS Server Loads suspicious DLL
Hello, I am encountering an unusual behavior with the IIS Worker Process (w3wp.exe) and require assistance in understanding it. The process initiates with the following arguments: Application Pool: "TestApplicationAPI" CLR Version: "v4.0" Managed Pipeline Mode: Integrated Named Pipe: "\.\pipe\iisipmc[unique-id]" Configuration File: "C:\inetpub\temp\apppools\TestApplicationAPI\TestApplicationAPI.config" Other Parameters: Default settings Subsequently, a DLL is filelessly loaded into the process. The DLL has a name following the pattern "zx_[md5hash].dll", where [md5hash] represents a specific hash value. I have searched extensively but found no information regarding such fileless DLL loading in IIS, particularly with a name that seems to be dynamically generated. Can anyone provide insights into: The nature and purpose of this "zx_[md5hash].dll"? The implications of this behavior for the security and stability of the IIS environment? Any known issues or documentation related to this kind of scenario in IIS? Any help or guidance would be greatly appreciated. Thank you!700Views0likes0CommentsIIS7 issue. I cant edit or add files in the "wwwroot" folder under "inetpub"
Hi All, I have a web app thats in a VM and has IIS installed. I need to be able to change some configuration settings in the file and save it. But it won't save saying access is denied. I can t drag any new files to it either. Whats the best approach to fix this? I tried adding my self to the admin group but didn't work. Any tips and resources that can help would be great.600Views0likes0Commentscreate customized user group for IIS similar to IUSR and IIS_IUSRS
Is it possibe to create customized user group for IIS similar to IUSR and IIS_IUSRS. So that we can users to those whom we want to give access to site deployed on IIS and will be removing IUSR and IIS_IUSRS from permission of the folder or site.524Views0likes1Comment