Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There is a requirement where clients should not know the port on which a particular service is running in the server.

Written a firewall script to redirect the port, where user will see some different port. e.g

 ip1:portA:portB
 ip2:portC:portD

here ip1 and ip2 are clients ip. PortB and PortD are original port. But client can see portA and portC

But when client typed https://server_ip:portA/some_service The url got changed to https://server_ip:portB/some_service

The actual port got display during access, that is what we are trying to prevent. netstat command is displaying portA and portC at the client's space. So from netstat commnd client wont be knowing the actual port number, but accessing the url is revealing the actual port number. Now changing url is not in the scope of the script. How to prevent showing actual port.

share|improve this question

migrated from stackoverflow.com Oct 26 '11 at 14:06

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

The webserver must have sent a redirect, and used the hostname and port which it is configured with. You need to reconfigure your webserver to use the contents of the Host header sent by the client instead.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.