0

I have an Apache Web Server (2.4) behind a WAF (ModSecurity). 10 remote hosts have static IP addresses and expect to reach "test.com".

I would like to do some filtering and routing based on the remote IP addresses.

For example:

  • when 192.168.1.1 reaches test.com, he gets test.com/1/ and only this subdirectory.
  • when 192.168.1.2 reaches test.com, he gets test.com/2/ and only this subdirectory.
  • etc.

On the web server, I tried to set restrictions in the Virtual Hosts configuration, but as the WAF is used as a proxy, Apache receives the WAF's private IP address and not the remote hosts' IP address.

Do someone have any solution to do this trick ?

Thank you in advance. Tom

neuro
  • 14,948
  • 3
  • 36
  • 59
TomFR
  • 1

1 Answers1

0

Somethings can be done easily to answer to your problem. You should use Vhost configuration and choice specific port.

For example:

  • when 192.168.1.1 reaches test.com:8081, he gets test.com/1/ and only this subdirectory.
  • when 192.168.1.2 reaches test.com:8082, he gets test.com/2/ and only this subdirectory.
JochenJung
  • 7,183
  • 12
  • 64
  • 113
Fox
  • 1