1
If I am on hostA
and connect to hostB
with SSH, simultaneously creating a tunnel with the -L
and/or -R
options, and I specify the tunnel destination symbolically as hostC
, who resolves the name to an IP address, hostA
or hostB
? Does it make a difference whether it is a local tunnel (-L
) or remote tunnel (-R
)?
This would matter if hostA
and hostB
have different views of hostC
's address.
That is, if I do this:
hostA$ dig hostC A +short
192.168.1.3
hostA$ ssh -L 1111:hostC:2222 -R 3333:hostC:4444 hostB
hostB$ dig hostC A +short
10.0.0.3
What address does hostA
use for packets presented to hostB:3333
? What address does hostB
use for packets presented to hostA:1111
?
I don't understand your statement about "the second part of [my] question." In the example, I give the IP address of
hostC
from the perspective ofhostA
and ofhostB
. The addresses ofhostA
andhostB
are not significant. – neirbowj – 2013-10-19T16:51:57.140Now i get what you meant, also didn't see the different hostnames in the prompt. I have to rethink this a bit. – noggerl – 2013-10-19T16:58:34.623