Thanks Alan,
Will explore that...

/D

> On Sep 28, 2018, at 7:37 AM, Alan Carroll <solidwallofc...@oath.com.INVALID> 
> wrote:
> 
> I would be tempted to see if header_rewrite can do what you want. There are
> a wider variety of conditionals available there. You could hook it up to
> only run on your regex_remap line and "override" the remap rule result as
> needed. I haven't use map_with_recv_port so I can't say if it could be made
> to work. You might try testing that with the debug tag 'http|url_rewrite'
> and see what shows up.
> 
>> On Thu, Sep 27, 2018 at 11:31 PM Dk Jack <dnj0...@gmail.com> wrote:
>> 
>> Hi,
>> I need to remap incoming traffic from a specific IP (connection IP) or
>> traffic that is received on a specific port i.e ATS listening/server port
>> to be sent to a specific IP+port. Distribute incoming traffic to multiple
>> sites based on source-ip or listening port. For example, I want to do
>> something like this:
>> 
>> map_with_recv_port 8081 http://10.1.10.1:8080/
>> map_with_recv_port 8082 http://10.1.10.2:8080/
>> 
>> or
>> 
>> map_with_src_ip 10.1.1.1 http://10.1.10.1:8080/
>> map_with_src_ip 10.1.1.2 http://10.1.10.2:8080/
>> 
>> With map or regex_remap, they allow me to filter on particular source IP.
>> However, what I want is not filtering, but remap based on source-ip or
>> listen port. Tried this:
>> 
>> regex_remap http://.*:8081/ http://10.1.10.1:8080/
>> @actio=allow @src_ip=10.1.1.1
>> regex_remap http://.*:8082/ http://10.1.10.2:8080/
>> @actio=allow @src_ip=10.1.1.2
>> 
>> Since the regex matches all traffic (both from 10.1.1.1 and 10.1.1.2), it
>> always tries to send it to 10.1.10.1.
>> 
>> The documentation for map_with_recv_port says it should work exactly as
>> map, but I haven't found a good example. The example, I showed above
>> doesn't seem to work. Would greatly appreciate any tips or suggestions.
>> Thanks.
>> 
>> Regards,
>> Dk.
>> 
> 
> 
> -- 
> *Beware the fisherman who's casting out his line in to a dried up riverbed.*
> *Oh don't try to tell him 'cause he won't believe. Throw some bread to the
> ducks instead.*
> *It's easier that way. *- Genesis : Duke : VI 25-28

Reply via email to