Citrix ADC

Beispiele für重写和响应器政策

Im Folgenden finden Sie einige Beispiele für重写和响应- richtlinien:

Beispiel 1:那么fügen Sie einen lokalen Client-IP-Header mit der Befehlszeilenschnittstelle hinzu

添加NS-Client的CLIENT.IP。SRC添加重写策略pol_ins_client http.req。is_valid act_ins_client bind rewrite global pol_ins_client 300 END namem@obelix:~$ curl -v http://10.10.10.10/testsite/file5.html * Hostname was NOT found in DNS cache * Trying 10.10.10.10…* Connected to 10.10.10.10 (10.10.10.10) port 80 (#0) > GET /testsite/file5.html HTTP/1.1 > User-Agent: curl/7.35.0 > Host: 10.10.10.10 > Accept: \*/\* > < HTTP/1.1 200 OK < Date: Tue, 10 Nov 2020 10:06:48 GMT * Server Apache/2.2.15 (CentOS) is not blacklist < Server: Apache/2.2.15 (CentOS) < Last-Modified: Thu, 20 Jun 2019 07:16:04 GMT < ETag: "816c5-5-58bbc1e73cdd3" < Accept- ranges: bytes < Content-Length: 5 < Content-Type: text/html;charset=UTF-8 < NS-Client: 10.102.1.98 < *连接0到主机10.10.10.10未被破坏JLEwxt_namem@obelix:~$ 

Beispiel 2: Maskieren Sie den HTTP-Servertyp

添加重写动作action - rewrite - server_mask替换HTTP.RES.HEADER(“服务器”)"Web服务器1.0""添加重写策略-重写- server_mask HTTP.RES。IS_VALID Action-Rewrite-Server_Mask NOREWRITE namem@obelix:~$ curl -v http://10.10.10.10/testsite/file5.html * Hostname was NOT found in DNS cache * Trying 10.10.10.10…*连接到10.10.10.10(10.10.10.10)端口80 (#0)> GET /testsite/file5.html HTTP/1.1 > User-Agent: curl/7.35.0 > Host: 10.10.10.10 > Accept: \*/\* > < HTTP/1.1 200 OK < Date: Tue, 10 Nov 2020 10:15:42 GMT * Server Web Server 1.0 is not blacklist < Server: Web Server 1.0 < Last-Modified: Thu, 20 Jun 2019 07:16:04 GMT < ETag: "816c5-5-58bbc1e73cdd3" < Accept- ranges: bytes < Content-Length: 5 < Content-Type: text/html;charset=UTF-8 < *连接#0到主机10.10.10.10未被破坏JLEwxt_namem@obelix:~$ 

Beispiel 3: Reagieren Sie, indem Sie zu einer anderen URL umleiten, wenn eine URL empfangen

> add responder action act1 redirect ""www.google.com"" Done > add responder policy pol1 'HTTP.REQ.URL.CONTAINS("file")' act1 Done > bind responder global pol1 1 Done > name:~$ curl -v http://10.10.10.10/testsite/file5.html * Hostname was NOT found in DNS cache * Trying 10.10.10.10…*连接到10.10.10.10(10.10.10.10)端口80 (#0)> GET /testsite/file5.html HTTP/1.1 > User-Agent: curl/7.35.0 > Host: 10.10.10.10 > Accept: \*/\* > < HTTP/1.1 302 Found: Moved temporary < Location: www.google.com < Connection: close < Cache-Control: no-cache < Pragma: no-cache < *关闭连接0 name@obelix:~$ 

贝斯皮尔第4章:安特瓦特·埃纳·纳赫里克特,die ein beliebiger Ausdruck oder in Text sein kann

add responder action act123 respondwith ""Please reach out to administrator"" add responder policy pol1 "HTTP.REQ.URL.CONTAINS("file")" act123 bind responder global pol1 100 END name@obelix:~$ curl -v http://10.10.10.10/testsite/file5.html * Hostname was NOT found in DNS cache * Trying 10.10.10.10. "响应器动作和策略:>add Responder Action redirect -Action redirect ""https://xyz.abc.com/dispatcher/SAML2AuthService?siteurl=wmav"" -responseStatusCode 302 >add Responder Policy redirect -Policy "HTTP.REQ.HOSTNAME.CONTAINS("abc")"重定向动作绑定LB虚拟服务器:>bind LB vserver Test1_SF -policyName重定向策略-priority 100 -gotoPriorityExpression END -type REQUEST。*连接到10.10.10.10(10.10.10.10)端口80 (#0)> GET /testsite/file5.html HTTP/1.1 > User-Agent: curl/7.35.0 >主机:10.10.10.10 >接受:\*/\* > *连接#0到主机10.10.10.10 left完整请到达administratort_name@obelix:~$ 

Beispiel 5: Reagieren Sie mit einer importierten HTML-Seite

import responder htmlpage http://10.10.10.10)/testsite/file5.html page112 add responder action act1 respondwithHtmlpage page1 add responder policy pol1 true act1 bind responder global pol1 100 name@obelix:~$ curl -v http://10.10.10.10)/testsite/file5.html * Hostname was NOT found in DNS cache * Trying 10.10.10.10…*连接到10.10.10.10(10.10.10.10))端口80 (#0)> GET /testsite/file5.html HTTP/1.1 > User-Agent: curl/7.35.0 > Host: 10.102.58.140 > Accept: \*/\* > < HTTP/1.1 200 OK < Content-Length: 5 < Content-Type: text/html < *连接#0到主机10.10.10.10 left original JLEwxt_name@obelix:~$ 

Beispiel 6: Umleitung von URL basierend auf HOSTNAME mithilfe der Responder-Richtlinie

响应器动作和策略:>add Responder Action redirect -Action redirect ""https://xyz.abc.com/dispatcher/SAML2AuthService?siteurl=wmav"" -responseStatusCode 302 >add Responder Policy redirect -Policy "HTTP.REQ.HOSTNAME.CONTAINS("abc")"重定向动作绑定LB虚拟服务器:>bind LB vserver Test1_SF -policyName重定向策略-priority 100 -gotoPriorityExpression END -type REQUEST