I have read this:
Port forwarding on Linux without iptables?

I have a vps and I have ran lxc containers on it. I want to redirect all incoming traffic from one outside port to one port of a container (for example to

I want to redirect all the traffic not just TCP or UDP or whatever. I dont want to choose which protocol to use, I want a tool to redirect them all.
I have tested redir and heared that socat does all but only one protocol at a time.

Is there any tool that does what I want?
Can socat be configured in such a way it can literally mirror ports to each other?

  • This doesn't make sense. What exactly do you mean by "all the traffic not just TCP or UDP or whatever"? – Michael Hampton Jul 5 '18 at 16:04
  • @MichaelHampton For example I have a container which serves a UDP port and another container which serves a TCP port. I dont want to tell redir or whatever tool to work on tcp or udp. I want it to handle both, can socat do that? – TechJS Jul 6 '18 at 3:43
  • They are separate protocols; it only makes sense that you would have to handle them separately. What, then, do you want other than TCP or UDP? – Michael Hampton Jul 6 '18 at 12:29
  • @MichaelHampton I simply dont know! I dont know which protocol a container may use! For example I would set up an openconnect container which is a vpn or shadowsocks which is a proxy server. I dont know if openconnect uses TCP or UDP and I dont want to check for it. I want a tool that forwards them without asking me for it being tcp or udp. The idea of this came to me from docker where you can run a container and tell docker to forward both udp and tcp eg: docker run --rm -d -p 80:80/tcp -p 80:80/udp bash – TechJS Jul 6 '18 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.