内网服务器无法上网,跳板机可以上网

1、首先,让跳板机通过ssh连上服务器,并且设置xshell自动登录脚本为top(此步为了让xshell客户端不要因为超时而断开)
2、建立隧道,类型:远程(传人),源主机:localhost,端口:1235  目标主机:localhost,端口:1235
3、跳板机上启用ccproxy,http代理端口1235
4、修改服务器环境变量,代理上网
vi /etc/profile

# proxy
all_proxy="http://127.0.0.1:1235"
export all_proxy

source /etc/profile

echo "proxy=http://127.0.0.1:1235/" >> /etc/yum.conf


服务器上网到此完毕