Port forwarding with xinetd Ask
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的更多相关文章
- 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 ...
- Port Forwarding in Windows
转自:http://woshub.com/port-forwarding-in-windows/ Since Windows XP there is a built-in ability in Mic ...
- NAT&Port Forwarding&Port Triggering
NAT Nat,网络地址转换协议.主要功能是实现局域网内的本地主机与外网通信. 在连接外网时,内部Ip地址需要转换为网关(一般为路由器Ip地址)(端口号也需要相应的转换) 如: ...
- 路由器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 ...
- OpenSSH高级功能之端口转发(Port Forwarding)
在RedHat提供的系统管理员指南中提到OpenSSH不止是一个安全shell,它还具有X11转发(X11 Forwarding)和端口转发(Port Forwarding)的功能.X11功能一般用于 ...
- NAT&Port Forwarding&Port Triggering
NAT Nat,网络地址转换协议.主要功能是实现局域网内的本地主机与外网通信. 在连接外网时,内部Ip地址须要转换为网关(一般为路由器Ip地址)(port号也须要对应的转换) ...
- 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 ...
- 使用Port Forwarding连接k8s集群的pod(redis、mysql等)
一. 创建Redis的deployment和service 1. 创建Redis deployment redis-master-deployment.yaml apiVersion: apps/v ...
- 端口转发 Port Forwarding (一)
0x00First 最近发现一些好用的端口转发工具和技巧,计划认真梳理一下 SSH.NC.LCX.EW.FRP 0x01 SSH隧道端口转发 目前利用SSH隧道(SSH tunneling)进行端口转 ...
随机推荐
- .net mvc 运行监控和错误捕捉
方法类 /// <summary> /// 运行监控类 /// </summary> [AttributeUsage(AttributeTargets.Class | Attr ...
- js几个逻辑运算符的形象概括
“&&”是逻辑与操作符,只有“&&”两边值同时满足(同时为真),整个表达式值才为真. b>a && b<c //“&& ...
- schtasks /create 计划任务 中文路径 名字都要加“” 子命令 /tn /tr 前面要空格 否则会出错
echo off echo. 清空连接 net use * /del /y echo. 连接 net use \\192.168.1.2\人力资源部\考勤\考勤数据-小莫提供 "密码&quo ...
- opencv-flag
http://blog.csdn.net/yiyuehuan/article/details/43701797 在Mat类中定义了这样一个成员变量: /*! includes several bit- ...
- Android(java)学习笔记195:ContentProvider使用之添加数据到联系人(掌握)
1.添加联系人逻辑思路 (1)首先在raw_contacts创建一个新的id (2)在data表里面添加这个id对应的数据 2.下面通过一个案例,说明一下如何添加一条数据到联系人: (1)首先我们关注 ...
- Vue打包之后部署到 express 服务器上
Part.1 安装 express npm install express body-parer --save Part.2 在项目根目录下创建 app.js 文件作为启动 express 服务器代码 ...
- Dynamic Web Module版本对应tomcat版本
MyEclipse2017+JDK 1.8环境下 Dynamic Web Module版本3.1要对应tomcat7.0以上版本,不然部署项目时会出现错误(会出现无法部署项目的情况). Dynamic ...
- 一、认识spring框架
对于spring框架,作为Java开发人员肯定不陌生,大名鼎鼎,名声在外,但是对于spring框架没有进行过系统的学习,从今天开始学习并且记录一下spring框架的比较牛逼的特性. 一.spring简 ...
- android-async-http框架库使用基础
开源项目链接 android-async-http仓库:git clone https://github.com/loopj/android-async-http android-async-http ...
- [Luogu] P1156 垃圾陷阱
题目描述 卡门――农夫约翰极其珍视的一条Holsteins奶牛――已经落了到“垃圾井”中.“垃圾井”是农夫们扔垃圾的地方,它的深度为D(2≤D≤100)英尺. 卡门想把垃圾堆起来,等到堆得与井同样高时 ...