NAT does not have chain=output, there are 'dstnat' and 'srcnat' chains.
True, but I can create a new chain, and once created it appears together with SRC-NAT and DST-NAT
SRC-NAT replaces SRC-address (usually performed on packets that are originated from natted network).
DST-NAT replaces DST-address (usually performed on packets that are destined to the natted network).
As far as I know, user public address will be proxy address, when 'proxy' is enabled.
Correct again, but I don't need to change SRC address: proxy address is good.
What I need to do is to ask my "parent proxy" for a DST address different from the original one asked by the internal user connecting to MT proxy.
I'd try to better explain the scenario:
- there is a remote "parent proxy", caching a webserver with virtual hosts on it
- the webserver is reachable BOTH behind a NAT (public address) and through a direct access via DMZ routing (172.x.x.x)
- the parent proxy is only reachable via DMZ routing
- the parent proxy is the main resource to access external websites (the whole internet) and the DMZ webserver via its private address.
So when I need to access a virtualhost on that webserver, the DNS correctly resolves the URL with a
public address, but if the MT proxy uses it communicating to the parent proxy, it answers "Zero sized reply" because it "knows" the local webserver with local address only.
Then my first raw idea to solve this problem was to change the address into the request that MT proxy send to parent proxy....
Another chance could be to avoid request to DMZ webserver to be feed to MT proxy; these one should be "DST-NATted" and directly routed to the webserver, bypassing both MT and parent proxy.
What do you think about both these strategies?
TIA in advance.
Riccardo