|
发表于 2018-10-15 14:20:41
来自手机
|
显示全部楼层
|阅读模式
来自 甘肃陇南
在某些网络环境中,其中,例如给管理LAN或某些专用LAN部署,它仍可能有必要从外部访问内网机器的某些特定端口。通常情况下,你必须访问跳板机,你才能访问相应的机器。
在我们的例子中,我们必须达到交换机的管理端口的专用LAN。例如:
私人拥有的IP地址范围192.168.10.0/24
该交换机配置了192.168.10.254和它的管理端口是80
跳板机同时访问这两个网络,具有外部地址为10.10.10.1
直接访问交换机的地址为10.10.10.1用端口81,你可以跳板机具有以下配置上配置xinetd的:
[pre]
# cat /etc/xinetd.d/http-switch
service http-switch
{
disable = no
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
redirect = 192.168.10.254 80
bind = 10.10.10.1
port = 81
user = nobod
# cat /etc/xinetd.d/http-switch
service http-switch
{
disable = no
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
redirect = 192.168.10.254 80
bind = 10.10.10.1
port = 81
user = nobody
}
[/pre]
重新加载xinetd,之后你可以通过浏览器访问http://10.10.10.1:81
[pre]
chkconfig xinetd on
rcxinetd restart
[/pre] |
|