MarkoPaul0 / DatagramTunneler

Simple C++ cross-platform client/server app forwarding UDP datagrams through a TCP connection.
GNU General Public License v3.0
170 stars 28 forks source link

Usage? #11

Closed rkx0 closed 12 months ago

rkx0 commented 2 years ago

Hey, I'm trying to figure out how to use the tunneler, and I'd just write down my purpose here. I'd like to make my localhost 27015 port go to a TCP port such as 255 so i can then forward it with ngrok

I have two PCs, ones IP 192.168.0.101, and the other 192.168.0.100

Hope you can heelp

MarkoPaul0 commented 2 years ago

@AimanLowCar I am not sure I fully understand what you are trying to do. Are you trying to forward udp traffic from your PC 192.168.0.101 to your second PC 192.168.0.100 ?

rkx0 commented 2 years ago

I'm trying to forward traffic from 192.168.0.101 to 192.168.0.101:1050 (UDP to tCP)

On Sun, Feb 20, 2022 at 3:54 AM MarkoPaul0 @.***> wrote:

@AimanLowCar https://github.com/AimanLowCar I am not sure I fully understand what you are trying to do. Are you trying to forward udp traffic from your PC 192.168.0.101 to your second PC 192.168.0.100 ?

— Reply to this email directly, view it on GitHub https://github.com/MarkoPaul0/DatagramTunneler/issues/11#issuecomment-1046110555, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGQGWEPXHZNDLLNLJJXMCDU4AGSHANCNFSM5J2S573A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

kashelll commented 2 years ago

Hi! Hope, you can help me)

My issue:

I have rhel server, which recieve on 500\UDP port many audit events from other company linux servers. I need to forward all this udp flow to the same local server, but to tcp port (600\tcp for example).

Can I do this by using DatagramTunneler? How?

I tried to create tunnel, however client fails with 'Could not join multicast group... Error 22'

or

'Unable to connect server... Error 111!'

mazeboy3 commented 2 years ago

I have not yet tested this solution, but it seems like it is exactly what I was searching for. Therefore, my poor situation:

I have a server running at home with different sorts of VMs and Docker containers running on it. I am behind at least 2 NATs (think in total there are 3) (and just IPv4) and do not have direct access to the router. Therefore, port forwarding on the router is not possible, but I still want to use my private server at home for online services.

So there is currently only one possible way that I see: Current Situation: I have a publicly available vServer (IPv4) rented. I build up a tunnel between both my server at home and the vServer. The vServer is configured to forward TCP ports (most important 80 and 443) to a VM on my server at home. This redirect the traffic to my nginx proxy manager to then send it to the correct VM or Docker container. The solution is working fine and is even configured to automatically start at boot on both the vServer and the server at home. The problem whatsoever is, that I am not able to forward ports that use UDP as the SSH tunnel only accepts TCP, so I am not able to forward, for example, the UDP port 9987 for my TeamSpeak server.

Even if I know that this kills the sense of UDP I would be happy to get a solution so my TeamSpeak and maybe game servers could be made available through that tunnel.

So I hope this is maybe the solution I was searching for, as socat had not worked out for me in the first test.