? ? ?????? ??????.
2.2.2 SSH VPN
????????? ?? ?? ????? ????????????? ????,??????? ????????? ??? ?????? ?????? OpenVPN,?? ??? ? ??????? ??????????? ? linux??????? ?????? OpenSSH. ??? ?????? ??????????? ?????????? 2 -? ?????,??? ??? ??? ??????????? ??? ????? ???? ????? ????? ???????? ?? ?? ????? ????????.
? ?????? 4.3, OpenSSH???????????? ?????????? tun / tap,??????????? ????????? ??????????? ???????. ??? ????? ?????? ?? OpenVPN,?????????? ?? TLS.
??????????? ??????? ????????? ?? ?????? ?????? TCP??????????,??? ?????? ??????,??? ???????? ???????? ???????? VPN,?? IP.
??????? ????? ???????? ? ???????????????? ???? OpenSSH??????,??? ?? ????? ????? ????????? ?????????? tun / tap? ???????? ? ??????? root. ? ???????????????? ?????/Etc / ssh / sshd_config,?????? ?????? ????????? ?????:
yesyes
? ??? ???? ??? ????,???? office? ??????? 192.168.53.0/24? ???? colo? ??????? 172.16.100.0/24. ??? ???????? ?????????? VPN???? ????? ????????? ????????? ????????:
1. ??????????? ? ?????? ?????????????? ????? SSH?? ?????? ? ??????-W;
2. ????????? IP?????? SSH??????? ???????? ???????? ?? ??????? ? ?? ???????.
. ???????? ??????? ??? ????? ?????.
. ???? ?????,???????? NAT?? ?????????? ?????????? ?????.
????? ???????????? ?? ???? office? ???? colo. ?????????? ?????????? ? ?????????????? office,? ??????? ??????????? ?? ?????????????? ???? colo,?? ????,??????????? ????????????? colo:
? ??????? ????? w c??????????? 0:0???????,??? ??? ??????????? ??????? ?? ??????? ? ??????? ??????????? ?????????? tun0. ????????-C???????? ????????,????????-C?????? ???????.
office> ssh-c aes256-C-w0: 0 root@195.2.240.68
????????? ??????? ??? ??????????? ?? ?????????????? ???? colo. ?????? ip????? ? ????? ???????
colo> ifconfig tun0 10.0.1.1 netmask 255.255.255.252
????????? ??????? ?? ???? office
colo> route add-net 192.168.53.0 netmask 255.255.255.0 dev tun0
???????? NAT,???? ?? ???????
colo> echo 1>/Proc/sys/net/ipv4/ip_forward
??????????? ??????? ? ??????? ??????? iptables??? ????????? ??????? ?? VPN???? ? ????????
colo> iptables-t nat-A POSTROUTING-o eth1-j MASQUERADE
?????? ???????? ???????????? office:
office> ifconfig tun0 10.0.1.2 netmask 255.255.255.252> route add-net 172.16.100.0 netmask 255.255.255.0 dev tun0> echo 1>/Proc/sys/net/ipv4/ip_forward> iptables-t nat-A POSTROUTING-o eth1-j
?? ???? ????????? ?????????, VPN???? ?????????. ??? ??????????? ????????? ??????????? ? ???????????? ???????? Windows XP (????),???????????? ?????? SSH Putty.
.3?????? ?????????????????? ??????? ????????????? ????
? ???????? 2.1? 2.2??????????? ??? ?????????? (OpenVPN, SSH)???????? ?????????? ????????????? ?????,????????? VPN. ?? ???????????...