Problem: Reverse Proxy Should Use a Specific IP(v6) Address on an Multihomed Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I created a specific configuration for a reverse proxy, which does some URL rewriting and accesses a remote server. This rproxy is a IPv6 to IPv4 gateway to allow IPv4 users accessing IPv6 only servers. IPv6 interface has multiple IPv6 addresses:

1.) 2a01:dead:beef::2/128
2.) 2a01:dead:beef:2::2/124
3.) 2a01:dead:beef::f001/128

httpd is configured so it listens on 1) and 3) only, but it uses 3) as outgoing IPv6 address.

Is it possible to tell httpd to use 1) instead of 3) as source IP address if rproxy accesses an IPv6 host ?

This is my configuration of regarding vhost:

<VirtualHost 193.x.x.x:80>
  ServerName 4.xxx
  ServerAlias *.4.xxx
  DocumentRoot "/home/www/xxx"
  CustomLog /var/log/apache2/xxx/access_log combined
  ErrorLog /var/log/apache2/xxx/error_log

  RewriteEngine on

  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]

  ProxyVia Block

  RewriteCond   %{HTTP_HOST} ^(.+)\.4\.ip6\.li$
  RewriteMap    ip6-map      prg:/mytools/ip4to6gw.pl
  RewriteRule   ^(.+)        %{HTTP_HOST}$1          [C]
  RewriteRule   ^(.+)        http://${ip6-map:$1}    [P]

</VirtualHost>

Only problem is remote IPv6 server see address 2a01:dead:beef::f001 instead of 2a01:dead:beef::2 which would be desired source IP address. Everything else works as expected.

best regards
Christian Felsing

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux