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.

最新文章

  1. getComputedStyle的简单用法
  2. [转]在windows环境中使用varnish
  3. css学习笔记 6
  4. Thomas Brinkhoff 基于路网的移动对象生成器的使用
  5. iOS-----用LLDB调试,让移动开发更简单(二)
  6. 清空mysql的历史记录
  7. Amazon Web Services
  8. JavaWeb学习之Servlet(一)----MyEclipse及Tomcat的配置
  9. C#DataGridView 美化
  10. 在线判题 (模拟)http://202.196.1.132/problem.php?id=1164
  11. oc-08-内存分析
  12. php redis 消息队列
  13. Java多线程缓存器简单实现
  14. Django 使用 locals() 函数
  15. springMVC整理02--常用注解的使用
  16. luogu P3767 膜法
  17. python基础 - 控制语句
  18. [hive] hive 安装、配置
  19. js基础学习笔记(六)
  20. 原生JS一些操作

热门文章

  1. ASP.NET Excel下载方法一览
  2. php常用的一些代码
  3. 浮动qq客服备份代码
  4. hibernate inverse属性
  5. CSU1020: 真三国无双
  6. Python自动化测试-使用Pandas来高效处理测试数据
  7. Unity 3D 使用TerrainCompose 调用RTP 报错:
  8. oracle 互锁的sql查询
  9. [luoguP1011] 车站(递推)
  10. acm 一年总结