https://stackoverflow.com/questions/21716673/port-forwarding-with-xinetd

------------------------------------------------------------------------------------------------------------------------------------

I want to forward xinetd connection to another local port (say 12345). I based my solution on CentOS/Redhat documentation Chapter 17. TCP Wrappers and xinetd, article 17.4.3.3. In the example the configuration starts a daemon and also redirects the traffic to a host:port. The doco say it should be able to forward to different port on the same system too.

My current goal is to starts a daemon (say testsmpp) at any connection on port 12345 and redirect the stream to a particular port (say 54321). The tricky bit is I don't want the daemon (testsmpp) to read from STDIN, instead it should be able to read from the port where the xinetd is forwarding the traffic to.

I created a service under /etc/service e.g

testsmpp    12345/tcp

And my xinetd configuration for the daemon is

service testsmpp
{
sock_type = stream
protocol = tcp
wait = no
user = root
server = /home/me/bin/testsmpp
redirect = 54321
}

testsmpp listens on port 54321. The problem is when a connection made from outside, xinetd starts the daemon but do not forward the traffic to 54321. Once the server started I can connect directly to 54321 port but the connection made via xinetd (at port 12345) is not forwarded.

Is server and redirect tags are mutually exclusive? I looked at the discussion about xinet forking concurrent server but my motivation are slightly different. I want to listen for incoming connection on another port as the other application will communicate with the daemon on that port too in a distributed computing environment.

Any clues much appreciated.

Port forwarding with xinetd Ask的更多相关文章

  1. How To Set Up Port Forwarding in Linux

    Port forwarding usually used when we want our computer act like a router. Our computer receive the p ...

  2. Port Forwarding in Windows

    转自:http://woshub.com/port-forwarding-in-windows/ Since Windows XP there is a built-in ability in Mic ...

  3. NAT&Port Forwarding&Port Triggering

    NAT     Nat,网络地址转换协议.主要功能是实现局域网内的本地主机与外网通信.     在连接外网时,内部Ip地址需要转换为网关(一般为路由器Ip地址)(端口号也需要相应的转换)     如: ...

  4. 路由器port触发与转发---Port Forwarding & Port Triggering

    What is Port Triggering? If you have not read my explanation of port forwarding do so now. You can f ...

  5. OpenSSH高级功能之端口转发(Port Forwarding)

    在RedHat提供的系统管理员指南中提到OpenSSH不止是一个安全shell,它还具有X11转发(X11 Forwarding)和端口转发(Port Forwarding)的功能.X11功能一般用于 ...

  6. NAT&Port Forwarding&Port Triggering

    NAT     Nat,网络地址转换协议.主要功能是实现局域网内的本地主机与外网通信.     在连接外网时,内部Ip地址须要转换为网关(一般为路由器Ip地址)(port号也须要对应的转换)     ...

  7. How to do SSH Tunneling (Port Forwarding)

    How to do SSH Tunneling (Port Forwarding) In this post we will see how ssh works?, what is SSH tunne ...

  8. 使用Port Forwarding连接k8s集群的pod(redis、mysql等)

    一. 创建Redis的deployment和service 1. 创建Redis deployment redis-master-deployment.yaml  apiVersion: apps/v ...

  9. 端口转发 Port Forwarding (一)

    0x00First 最近发现一些好用的端口转发工具和技巧,计划认真梳理一下 SSH.NC.LCX.EW.FRP 0x01 SSH隧道端口转发 目前利用SSH隧道(SSH tunneling)进行端口转 ...

随机推荐

  1. Vue的模板语法

    基本语法 <body> <script src="vue.js"></script> <div id="app"> ...

  2. CAD绘制标记(网页版)

    主要用到函数说明: MxDraw::GetCursorPickRect 返回拾取矩形框的宽度,默认值为6.详细说明如下: 参数 说明 IN MXDRAWOCXHANDLE hOcx 控件窗口句柄 OU ...

  3. ipv6工具类

    package mapreduce.nat; import java.math.BigDecimal; import java.math.BigInteger; import java.net.Ine ...

  4. java匹配http或https的url的正则表达式20180912

    package org.jimmy.autosearch20180821.test; import java.util.regex.Matcher; import java.util.regex.Pa ...

  5. 数据结构之线性顺序表ArrayList(Java实现)

    一.ListMe接口: import java.util.ArrayList; //实现线性表(顺序表和链表)的接口://提供add get isEmpty size 功能public interfa ...

  6. No-7.运算符

    数学符号表链接:https://zh.wikipedia.org/wiki/数学符号表 01. 算数运算符 是完成基本的算术运算使用的符号,用来处理四则运算 运算符 描述 实例 + 加 10 + 20 ...

  7. 第2节 mapreduce深入学习:7、MapReduce的规约过程combiner

    第2节 mapreduce深入学习:7.MapReduce的规约过程combiner 每一个 map 都可能会产生大量的本地输出,Combiner 的作用就是对 map 端的输出先做一次合并,以减少在 ...

  8. [LUOGU] P1466 集合 Subset Sums

    题目描述 对于从1到N (1 <= N <= 39) 的连续整数集合,能划分成两个子集合,且保证每个集合的数字和是相等的.举个例子,如果N=3,对于{1,2,3}能划分成两个子集合,每个子 ...

  9. HTML、CSS常用技巧

    一.HTML 在介绍HTML之前,我们先看一下HTML的文档树结构,主要包括哪些: (一).头部标签 1,Doctype Doctype告诉浏览器使用什么样的HTML或XHTML规范来解析HTML文档 ...

  10. 对SpringMVC框架的理解(转)

    SpringMVC概念:     他是一个轻量级的开源框架,应用于表现层,基于MVC的设计模式. SpringMVC的特点:     1.他是单例的可以设置成多例.     2.他的线程是安全的    ...