Question about using the NAT behaviour tool

Hi there! I’m having some trouble using the NAT behaviour tool referenced at stun/cmd/stun-nat-behaviour at master · pion/stun · GitHub
I can’t seem to get a successful run. Here is the output that I see (including an attempt to update the package):

Users-Mac-mini:~ user$ go install github.com/pion/stun/cmd/stun-nat-behaviour@latest
Users-Mac-mini:~ user$ $GOPATH/bin/stun-nat-behaviour  --stun.voip.blackberry.com:3478
flag provided but not defined: -stun.voip.blackberry.com:3478
Usage of /Users/user/go/bin/stun-nat-behaviour:
  -server string
    	STUN server address (default "stun.voip.blackberry.com:3478")

I am completely new to go and only moderately capable using bash prompts in terminal. Apparantly I haven’t defined the server address properly which I suspect has something to do with how I’ve set up go. Any advice on this would be appreciated :slight_smile: Documentation on this tool is mighty hard to find!
I’m running the snowflake proxy in a docker container which - as far as I can tell - is functioning properly, except that I frequently see NAT type ‘restricted’ in the container log (sometimes NAT type ‘unknown’) and I’m searching for a way to figure out what type of NAT my isp is imposing on me. The router/gateway (Actiontec T3200M) is set to NAT only. I would have to have a business account with my isp in order to have service where I’d be able to modify the NAT settings and I’m unlikely to go that route. I realize that I may have to be satisfied with the limited throughput I’m currently achieving on the proxy given these limitations, unless you can point me at any other solutions.
Of course, this is all in an effort to improve the usefulness of my implementation of the snowflake proxy.
Many thanks an kudos to you all for your brilliant work!

1 Like

[Hello don’t know if it can be useful to you :thinking:

I could be wrong. :thinking:

Snowflake Tutorial For Beginners

(https://jami.net ) = A little open source pearl

NAT Explained | Overload, Dynamic & Static

Good day to you

1 Like

Thank you :pray:t3:
I’ll have a look.

1 Like

Nice explainer on NAT. :slightly_smiling_face:
Sadly, the snowflake tutorial is for the snowflake cloud data system :joy:
Cheers!

1 Like

Hi~

The reason that command didn’t work is that the command line is malformed,
try this one instead:

$GOPATH/bin/stun-nat-behaviour --server stun.voip.blackberry.com:3478

The docker on macOS works differently than the one on Linux based systems. You could try running the snowflake proxy directly in the base macOS system instead of running it in Docker on Mac to improve that NAT situation.

The reason this would help is that on macOS, Docker operates by running a virtual machine with Linux installed to create a Linux environment, which docker depends on. This virtual machine and the mac os main system are connected with a network bridge that adds another layer of indirection that reduce the connectivity of the Linux environment, as well as any container running inside it. The guide we have on improving containerized snowflake proxy’s NAT Type only helps with the loss of connectivity between Linux base system and container(--network host) but will not be enough to redress the connectivity loss between MacOS host and Linux virtual machine.

4 Likes

Thank you so much! That worked a charm :slight_smile:
Sadly, it returns ‘address and port dependant’ as you might expect, although the mapping is ‘endpoint-independant’.

Would this be done using go in the command line? I love to give it a try. If you have any pointers for me I’d much appreciate it.

Unfortunately, since you are already running the stun-nat-behaviour in the base system and it has a restricted NAT type, running snowflake proxy on it directly won’t help. Your proxy is beneficial to the network as is, so there is no need to go out of the way to get the optimal NAT Type.

Should you decide to run snowflake proxy on the base system anyway, run the following commands:

go install git.torproject.org/pluggable-transports/snowflake.git/v2/proxy@latest
proxy
4 Likes

Ah I see. Thanks! I rather thought that I might just be looking for suspenders and a belt when it came to getting the optimal NAT type :wink: It’s good to know that my implementation of the proxy is beneficial ‘as is’. I do get pretty good throughput as it is. I will keep that command around, just in case.
Much appreciate the help!

4 Likes

A follow up. I bailed on docker, stripped all traces of go from the system and started over. The proxy running on the base system is working very well and uses a fraction of the resources that docker did :slightly_smiling_face:
Thanks again for all the help.

1 Like

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.