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)进行端口转 ...
随机推荐
- 数据层优化-jdbc连接池简述、druid简介
终于回到既定轨道上了,这一篇讲讲数据库连接池的相关知识,线程池以后有机会再结合项目单独写篇文章(自己给自己挖坑,不知道什么时候能填上),从这一篇文章开始到本阶段结束的文章都会围绕数据库和dao层的优化 ...
- (转)淘淘商城系列——SSM框架整合之Service层整合
http://blog.csdn.net/yerenyuan_pku/article/details/72721108 上文我们一起学习了Dao层的整合,本文将教大家如何整合Service层. 我们需 ...
- 「二叉搜索树 / set / 朝鲜树 / 替罪羊树」快速排序
要求 给定n个数,对这n个数进行排序 这题当然可以直接调用sort #include<cstdio> #include<vector> #define ll long long ...
- 5-Java-C(调和级数)
题目描述: 1/1 + 1/2 + 1/3 + 1/4 + ... 在数学上称为调和级数. 它是发散的,也就是说,只要加上足够多的项,就可以得到任意大的数字. 但是,它发散的很慢: 前1项和达到 1. ...
- vue全选和取消全选
代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- flatpickr插件的使用
flatpickr功能强大的日期时间选择器插件 日期格式化 <input class=flatpickr data-date-format="d-m-Y"> <i ...
- No-6.If语句
判断(if)语句 01. 开发中的应用场景 生活中的判断几乎是无所不在的,我们每天都在做各种各样的选择,如果这样?如果那样?…… 程序中的判断 if 今天发工资: 先还信用卡的钱 if 有剩余: 又可 ...
- thinkphp5入口文件对应模块绑定
在配置文件config.php中找到或者添加 // 入口自动绑定模块 'auto_bind_module' => true, 修改其属性为true
- Java中的JVM的内存结构
Java的虚拟机自身结构图: JVM内存结构主要包括两个子系统和两个组件.两个子系统分别是Classloader子系统和Executionengine(执行引擎)子系统:两个组件分别是Runtimed ...
- python 调用 C 动态库
首先是 C 的头文件和源文件, #ifndef POINT_H #define POINT_H struct point { int x; int y; }; void point_print(str ...