![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Networking Error ! Networking Errors and Queries |
![]() |
|
Tunnelling Through a Gateway With SSH
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) | ||||||||
|
Administrator
Posts: 875
Join Date: Oct 2005
Rep Power: 10
IM:
|
What we want to do is create a tunnel with SSH so that 10.50.101.100 can go directly to 10.50.100.72. There is no routing between the networks. The box in between is dual-homed and acting as a security buffer between the 10.50.100 and 10.50.101 networks. After we set up the tunnel, we are going to perform an rsync backup of the 10.50.100.72 /share directory to 10.50.101.100. To set up the tunnel:
If there are no keys, you will have to enter passwords. The cat - just keeps the tunnel open by running a command that never quits. You have to run this from a shell, and you can't put it in the background. To make this easier, we will set up keys:
Copy the key to 10.50.100.72 directly using the tunnel:
On 10.50.100.72:
Copy the key to the gateway box (10.50.101.1):
This box needs a new authorized_keys2 file, so we need to create it and change the permissions:
Let's restart the tunnel with debugging turned on:
You can see this command run in the above log:
Let's download, compile, install, and kick, off rsync: # scp -P 839 root@localhost:/share/software/rsync-2.6.8.tar.gz /usr/src rsync-2.6.8.tar.gz 100% 754KB 754.2KB/s 00:00 # tar -xzf rsync*.gz # cd rsync* # ./configure --prefix=/usr configure: Configuring rsync 2.6.8 checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling . . . config.status: creating lib/dummy config.status: creating zlib/dummy config.status: creating popt/dummy config.status: creating shconfig config.status: creating config.h rsync 2.6.8 configuration successful # make && make install gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c rsync.c -o rsync.o gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c generator.c -o generator.o gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W - . . . mkdir -p /usr/man/man1 mkdir -p /usr/man/man5 /usr/bin/install -c -m 644 ./rsync.1 /usr/man/man1 /usr/bin/install -c -m 644 ./rsyncd.conf.5 /usr/man/man5 # # rsync -e 'ssh -p 839' --delete -az root@localhost:/share/ /share/ & [1] 6029 # |
||||||||
|
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|