0

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 190.23.43.54:80 to 10.10.230.33:8000)

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?

HHHHHH
  • 109
  • 6
  • This doesn't make sense. What exactly do you mean by "all the traffic not just TCP or UDP or whatever"? – Michael Hampton Jul 05 '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? – HHHHHH Jul 06 '18 at 03: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 06 '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` – HHHHHH Jul 06 '18 at 17:13

0 Answers0