There are 2 debian servers available:

  1. Normal server with access from anywhere in the world.
  2. The server is local, which can connect to server # 1.

As without the "bike" to send data from the server number 2 to the Internet, at least just through rsync.

If it is not clear, here is the scheme: Internet <-> №1 <-> №2

  • Well, with rsync, these are just some terrible bikes. easier to completely internet prokinut. Here, at least, the shortest one I found in 2 minutes on Google: debian.pro/249 - Mike
  • Is this application for local server? or who is looking to internet. Thank you - orion_gm
  • For inetovskogo. on the second you simply add the default through the first one. those. something like route add default gw внутренний-ip-первого-сервера . Look where it’s set in the debian, there surely is just some sort of config where the gateway address is stupidly written and that's it - Mike
  • I read the article a couple of times, but did not understand, we set up a forwarding for a car that has an Internet, then we prescribe a route on the local one, and that's all? strange. I read some other articles there through the second interface of the car, which has access to the Internet (1 interface to the Internet, 2 interface to the local network) - orion_gm
  • Not quite so, some routes and the inclusion of forwarding are enough for machines with relay addresses to pass traffic through each other. And since we have a second machine not realist and on the Internet no one knows where to look for it, then we would add one rule in iptables with MASQUERADE to turn internal ip into our external one - Mike

2 answers 2

In fact, there are a lot of methods, here already masquerading or NAT prompted. You can put a proxy on the border, for example, socks socks

http://www.stokebloke.com/wordpress/2008/12/17/ssh-and-rsync-through-a-socks-proxy/

    at least just through rsync

    The rsync program by default (without explicitly specifying the protocol) works over an ssh connection.


    let's say we have:

    • host1 - a machine with an ssh client , without any internet access and nameservers , but with network access to host2
    • host2 - a machine with an ssh server with internet access
    • host3 - a machine with an ssh server , somewhere on the Internet
    • we have logins / passwords for connecting via ssh to both host2 and host3: user2 @ host2, user3 @ host3

    on host1, add the following (absolutely standard for proxying) lines to the ~/.ssh/config file:

     host host3 proxycommand ssh user2@host2 nc %h %p 

    now the command:

     $ rsync user3@host3:/путь/к/файлу /локальный/путь/ 

    quietly copies /путь/к/файлу (located on host3) to the local directory /локальный/путь/ .

    and vice versa:

     $ rsync /локальный/файл user3@host3:/путь/