04-09-2013 06:28 AM
What is the syntax for rewriting the destination port for a HTTP request?
For Example: Rewriting "http://www.test123.com" TO "http://www.test123.com:81"
Thanks!
Solved! Go to Solution.
04-09-2013 03:45 PM
04-10-2013 12:07 AM
Hi,
Please check if you have configured any rewrite rule or NAT rule.
If possible attach the config and I will have a look.
regards,
Ajay Kumar
04-09-2013 07:45 AM
Hi,
The simple solution is to specify port at rserver level to the desired port. In your case it should be like this :
host1/Admin(config-sfarm-host)# rserver SERVER1 81
this is from the documentation which explain the same:
You can associate one or more real servers with a server farm and enter real-server server-farm configuration mode by using the rserver command in either server farm host or server farm redirect configuration mode. The real server must already exist. For information about configuring a real server, see the "Configuring Real Servers" section. You can configure a maximum of 16,384 real servers in a server farm. The syntax of this command is as follows:
rserver name [port]
The arguments are as follows:
•name—Unique identifier of an existing real server. Enter an unquoted text string with no spaces and a maximum of 64 alphanumeric characters.
•port—(Optional) Port number used for the real server port address translation (PAT). Enter an integer from 1 to 65535.
If you choose not to assign a port number for the real server association with the server farm, the default behavior by the ACE is to automatically assign the same destination port that was used by the inbound connection to the outbound server connection. For example, if the incoming connection to the ACE is a secure client HTTPS connection, the connection is typically made on port 443. If you do not assign a port number to the real server, the ACE will automatically use port 443 to connect to the server, which results in the ACE making a clear-text HTTP connection over port 443. In this case, you would typically define an outbound destination port of 80, 81, or 8080 for the backend server connection.
For example, to identify real server SERVER1 and specify port 80 for the outgoing connection, enter:
host1/Admin(config-sfarm-host)# rserver SERVER1 80
host1/Admin(config-sfarm-host-rs)#
Hope that helps.
regards,
Ajay Kumar
04-09-2013 08:23 AM
Thanks Ajay. The server farm hosts are already defined as you described above. The problem I'm having is that the client is attempting to connect to http://www.test123:81, but the ACE is stripping the port 81, and sennding it to the server on port 80. Any ideas?
04-10-2013 12:07 AM
Hi,
Please check if you have configured any rewrite rule or NAT rule.
If possible attach the config and I will have a look.
regards,
Ajay Kumar
04-10-2013 01:01 PM
Ajay,
There's no NAT rules configured, but I'll check the configs.
04-09-2013 03:45 PM
04-18-2013 12:36 PM
I finally resolved the use by creating a header rewrite action-list, and then applying it to the appropriate policy map:
action-list type modify http HEADER_REWRITE
header rewrite request Host header-value "www.test123.com" replace "www.test123.com:81"
Thanks for your input,
Eric
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide