Re: route by destination IP address
Hello Baptiste, We have access to some non-public networks. These networks are only accessible via its own proxy server. So based on the IP-address the http-traffic must be proxied to the correct proxy server. I have realized the routing using squid: cache_peer 172.16.0.1 parent 3128 0 no-query cache_peer 172.160.0.2 parent 3128 0 no-query acl host_destip dst 192.168.0.1 cache_peer_access 172.16.0.1 allow host_destip cache_peer_access 172.16.0.2 allow !host_destip never_direct allow all When I visit the hostname http://example/ http://example/, squid resolves the hostname and checks the IP address to the acl. It would be great if I can realize it using haproxy. If you have other suggestion, let me know. Abdelouahed Op 29 mrt. 2015, om 15:54 heeft Baptiste bed...@gmail.com het volgende geschreven: Hi, No HAProxy won't do this. Instead, if you could explain us clearly what is your problem, we may be able to help you. For now you just explain what you tried to achieve. Baptiste On Sun, Mar 29, 2015 at 3:33 PM, Abdelouahed Haitoute ahaito...@rinis.nl wrote: I think I've found the issue. During test, I'm visiting a hostname http://example/. But the acl condition req.hdr_ip(host) will only work if I visit http://192.168.0.1/. Is it possible to let haproxy resolve the domain name and then check the IP address? Op 29 mrt. 2015, om 14:04 heeft Abdelouahed Haitoute ahaito...@rinis.nl het volgende geschreven: Hello, I'm trying to route http-requests based on destination IP address. I've got the following configuration, but unfortunately its not working: frontend proxy :3128 acl host_destip req.hdr_ip(host) 192.168.0.1 use_backend a if host_destip default_backend b I'm expecting all http-traffic with destination IP address 192.168.0.1 to go to backend a, but its using the default_backend. Any help is welcome.
Re: route by destination IP address
I think I’ve found the issue. During test, I’m visiting a hostname http://example/. But the acl condition req.hdr_ip(host) will only work if I visit http://192.168.0.1/. Is it possible to let haproxy resolve the domain name and then check the IP address? Op 29 mrt. 2015, om 14:04 heeft Abdelouahed Haitoute ahaito...@rinis.nl het volgende geschreven: Hello, I’m trying to route http-requests based on destination IP address. I’ve got the following configuration, but unfortunately its not working: frontend proxy :3128 acl host_destip req.hdr_ip(host) 192.168.0.1 use_backend a if host_destip default_backend b I’m expecting all http-traffic with destination IP address 192.168.0.1 to go to backend a, but its using the default_backend. Any help is welcome.
route by destination IP address
Hello, I’m trying to route http-requests based on destination IP address. I’ve got the following configuration, but unfortunately its not working: frontend proxy :3128 acl host_destip req.hdr_ip(host) 192.168.0.1 use_backend a if host_destip default_backend b I’m expecting all http-traffic with destination IP address 192.168.0.1 to go to backend a, but its using the default_backend. Any help is welcome.
Re: route by destination IP address
Hi, No HAProxy won't do this. Instead, if you could explain us clearly what is your problem, we may be able to help you. For now you just explain what you tried to achieve. Baptiste On Sun, Mar 29, 2015 at 3:33 PM, Abdelouahed Haitoute ahaito...@rinis.nl wrote: I think I've found the issue. During test, I'm visiting a hostname http://example/. But the acl condition req.hdr_ip(host) will only work if I visit http://192.168.0.1/. Is it possible to let haproxy resolve the domain name and then check the IP address? Op 29 mrt. 2015, om 14:04 heeft Abdelouahed Haitoute ahaito...@rinis.nl het volgende geschreven: Hello, I'm trying to route http-requests based on destination IP address. I've got the following configuration, but unfortunately its not working: frontend proxy :3128 acl host_destip req.hdr_ip(host) 192.168.0.1 use_backend a if host_destip default_backend b I'm expecting all http-traffic with destination IP address 192.168.0.1 to go to backend a, but its using the default_backend. Any help is welcome.