inlets-pro icon indicating copy to clipboard operation
inlets-pro copied to clipboard

inlets-pro flag --client-forwarding

Open jantytgat opened this issue 3 years ago • 3 comments

When using the --client-forwarding flag at the inlets-pro server side, you are able to tunnel ports back from the server to the inlets-pro client. These ports are linked to 127.0.0.1 on the inlets-client.

Is there a way to set the IP address to which these services can be bound, or can this be added?

For example, for the server: inlets-pro tcp server --auto-tls=false --control-port=8123 --control-addr=0.0.0.0 --client-forwarding --token="token"

For example, for the client: inlets-pro client --url "wss://$IP:$PORT/connect" --token $TOKEN --license "$LICENSE" --upstream "$UPSTREAM" --ports $TCP_PORTS --debug --auto-tls=false --local 32000:remoteip:10080

This will ensure that the service running at remoteip:10080 in the network behind inlets-pro server is made available on 127.0.0.1:32000. I would like to specify an IP address instead of 127.0.0.1 as well (being a host address of the inlets-client host), something along the lines of: inlets-pro client --url "wss://$IP:$PORT/connect" --token $TOKEN --license "$LICENSE" --upstream "$UPSTREAM" --ports $TCP_PORTS --debug --auto-tls=false --local 10.0.0.1:32000:remoteip:10080

jantytgat avatar Mar 18 '22 09:03 jantytgat

Hi @jantytgat

I appreciate you've taken time to make a technical request, however, the all important question, I always have to ask is:

Why?

Why, is the question that explains the pain, problem or perceived limitation.

Alex

alexellis avatar Mar 18 '22 12:03 alexellis

I am running inlets-client on a Ubuntu host. On the same host, we also have a virtual machine running, configured with NAT.

So the host has a physical network interface called eth0. For virtual machine communication, the host has a second network interface called eth1

eth0 address: 172.16.0.1 eth1 address: 192.0.0.1

The virtual machine has an IP address 192.0.0.3

So when I run inlets-client with the command: inlets-pro client --url "wss://inlets-server:8123/connect" --token "mytoken" --license "mylicense" --upstream "192.0.0.3" --ports "80,443" --auto-tls=false --local 32000:10.0.0.1:10080

The service behind inlets-server on 10.0.0.1:10080 is mapped to the inlets-client on 127.0.0.1:32000 I cannot access 127.0.0.1:32000 from my virtual machine running on 192.0.0.3 without some fancy iptables and destination NAT to translate 192.0.0.1:32000 to 127.0.0.1:32000.

By being able to set the IP address for --client-forwarding ports, I could probably solve this without tricks.

jantytgat avatar Mar 18 '22 14:03 jantytgat

Have you already tried --local-addr string interface for --local (default "127.0.0.1:") which I found from inlets-pro tcp client --help?

Let me know if that resolves the request, then we can get this closed?

alexellis avatar May 04 '22 09:05 alexellis

I would have to revisit the topic completely. I'll close the issue and reopen it if necessary!

jantytgat avatar Sep 01 '22 15:09 jantytgat