Forum Discussion
SNAT is not working in a one-arm configuration.
- Jul 19, 2023
Could you add the follow irule to the virtual server?
when HTTP_REQUEST { # Disable the stream filter for client requests STREAM::disable } when HTTP_RESPONSE { # Disable the stream filter for server responses STREAM::disable # Enable the stream filter for text responses only if {([HTTP::status] == 200) && ([HTTP::header value Content-Type] starts_with "text")} { # Replace '10.100.100.200' with '10.200.6.1' STREAM::expression {@10.100.100.200@10.200.6.1@} # Enable the stream filter STREAM::enable } }
Thank you for the reply.
I applied the curl -v http://10.200.6.1/ from the client PC
* Trying 10.200.6.1:80...
* Connected to 10.200.6.1 (10.200.6.1) port 80 (#0)
> GET / HTTP/1.1
> Host: 10.200.6.1
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.20.1
< Date: Wed, 19 Jul 2023 00:54:17 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/8.1.14
< Link: <http://10.100.100.200/wp-json/>; rel="https://api.w.org/"
<
<!DOCTYPE html>
<html lang="en-US">
<head>
Could you add the follow irule to the virtual server?
when HTTP_REQUEST {
# Disable the stream filter for client requests
STREAM::disable
}
when HTTP_RESPONSE {
# Disable the stream filter for server responses
STREAM::disable
# Enable the stream filter for text responses only
if {([HTTP::status] == 200) && ([HTTP::header value Content-Type] starts_with "text")} {
# Replace '10.100.100.200' with '10.200.6.1'
STREAM::expression {@10.100.100.200@10.200.6.1@}
# Enable the stream filter
STREAM::enable
}
}
- Beginner-TJul 21, 2023Altostratus
Thank you so much.
I resolved the issue using your answer's iRule.
- Jul 21, 2023
Your welcome.
But be aware, this will only work if you access the website on IP address.
This irule will work if you access the website on DNS name.when HTTP_REQUEST { # Disable the stream filter for client requests set orig_host [HTTP::host] STREAM::disable } when HTTP_RESPONSE { # Disable the stream filter for server responses STREAM::disable # Enable the stream filter for text responses only if {([HTTP::status] == 200) && ([HTTP::header value Content-Type] starts_with "text")} { # Replace '10.100.100.200' with 'host header' STREAM::expression {@10.100.100.200@$orig_host@} # Enable the stream filter STREAM::enable } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com