putty+ saprouter建立反向隧道访问内网sap se

2019-11-21  本文已影响0人  royplusone

目标

外网使用sapgui访问内网sap服务器

准备

linux主机,可以同时被内外网访问
一台内网中的windows 电脑

步骤

linux 主机

Linux需要开启SSH服务,注意设置GatewayPorts yes,否则转发的端口只能在linux 主机内访问

删除GatewayPorts前的#
GatewayPorts yes

sudo vi /etc/ssh/sshd_config

重启SSH

service ssh restart

内网电脑

  1. 准备
    下载saprouter和putty
  2. saprouter
    本例中router 安装目录c:\router
    2.1 设置路由规则
    修改c:\router\saprouttab, 增加一行,*表示对全部地址
    P * * *
    2.2 启动router
cd c:\router
saprouter.exe -r S 3311   #3311为router 使用的端口  
  1. 使用putty里的plink 建立到linux主机的隧道
# 123.123.123.123 linux主机
# 将linux 主机中的8811端口转发到本机中的3311端口,即router端口
plink -N -R 0.0.0.0:8811:localhost:3311 root@123.123.123.123 -pw 123456  

外网电脑

设置sapgui sap router string
/H/123.123.123.123/S/8811

上一篇 下一篇

猜你喜欢

热点阅读