SSH tunnel & Rsync thru two proxy/firewalls

Posted by cajwine on Server Fault See other posts from Server Fault or by cajwine
Published on 2012-04-14T08:35:47Z Indexed on 2012/04/14 11:32 UTC
Read the original article Hit count: 249

Filed under:
|
|

Screnario:

[internal_server_1]AA------AB[firewall_1]AC----+
          10.2.0.3-^        ^-10.2.0.2         |
                                            internet
          10.3.0.3-v        v-10.3.0.2         |
[internal_server_2]BA------BB[firewall_2]BC----+

Ports AC,BC has valid internet addresses. All systems run linux and have root acces to all.

Need securely rsync internal_server_1:/some/path into internal_server_2:/another/path

My idea is make ssh secure tunnel between two firewalls, e.g. from firewall_1

firewall1# ssh -N -p 22 -c 3des user2@firewall_2.example.com -L xxx/10.3.0.3/xxxx

and after will run rsync from internal_server_1 somewhat like:

intenal1# rsync -az /some/path [email protected]:/another/path

I don't know

  • how to make a correct ssh tunnel for rsync (what ports need tunnel)
  • and to where i will make the rsync? (remote comp address in case of ssh tunnel)

Any idea or pointer to helpfull internet resource for this case?

thanx.

© Server Fault or respective owner

Related posts about ssh

Related posts about rsync