cvmiller / v6brouter

IPv6 bridge and IPv4 router (NAT) shell script for OpenWRT
GNU General Public License v2.0
96 stars 26 forks source link

Potential Use Case Question: Exposing IPv4 network ports over IPv6 addresses. #18

Closed chrishobcroft closed 3 years ago

chrishobcroft commented 3 years ago

So, here is my use case - I want to understand if / how v6brouter can assist.

I have a client application running on a ubuntu server, which exposes ports 1935 to host rtmp audio-video livestreams, and 8935 to serve hls audio-video livestream. Obviously, this client is designed for running on servers behind NAT.

I would like to be able to bypass NAT by mapping incoming requests on an IPv6 address to ports and protocols on IPv4 0.0.0.0, e.g. rtmp://0.0.0.0:1935/streamkey and http://0.0.0.0:8935/stream/streamkey.m3u8.

Is this the kind of thing that v6brouter could be used for? As you may be able to tell, I am new to IPv6, and I don't even know if what I'm talking about is imagined.

cvmiller commented 3 years ago

Thanks for your interest in v6brouter. Your use case is not within the scope of v6brouter. v6brouter is designed to bridge IPv6 while NATing IPv4. Specifically for ISPs which do not give more than a single /64 prefix for their customers.

What you need is a reverse proxy as a translation mechanism to convert IPv6 to IPv4 services. The good news is that there are several options, including using nginx (a webserver) or socat (like netcat) to do the translation for you. Here's an article on setting up reverse proxies: http://www.makikiweb.com/netsig/2020_10_network_proxies.html

If you had many IPv4 devices that you wanted to expose to IPv6, then I would suggest looking at jool to create a reverse NAT64 server. http://www.makikiweb.com/netsig/2021_04_accessing_v4_from_v6_only_net.html

If you have more questions, please feel free to reopen this issue.

chrishobcroft commented 3 years ago

Thanks you @cvmiller - I will look into that.