stunserver
stunserver copied to clipboard
Install guide
how to install
Like most Linux and Unix source code distributions, "installation" is an administrative task that is typically considered external to the code itself. But I'm sure most folks new to Linux administration would appreciate some hints so they can get their job done.
Typical steps are the following
- Download the code and build it. Follow the instructions in the README file.
- After building, copy stunserver and stunclient binaries to /usr/bin
- This next step varies widely between Linux distros. Make it so that the stunserver runs on reboot - add a script to /etc/rc.local. For example, this is the script on stun.stunprotocol.org for rc.local:
#!/bin/sh -e
/usr/bin/stunserver --configfile /etc/stun.conf &
exit 0
how to install on windows?
Download the pre-compiled Windows binaries from www.stunprotocol.org.
Unzip the download package to a local directory. (e.g. c:\stunserver)
Open a console window and cd to the directory in which stunserver.exe is located (where you unzipped to.
Run "stunserver.exe --help" from the command line. You'll see it document all the options for itself.
Now run "stunserver.exe" with no command line options. You'll think the program is actually hung, but in fact, it's running. Run "stunclient.exe localhost" from another console window to validate the server is running.
Make sure the Windows firewall is configured to allow traffic. If the firewall dialog didn't prompt to open a port the first time you ran stunserver.exe, do the following. From the Windows Firewall in Control Panek, set an explicit rule to allow UDP ports 3478 and 3479. Or just a rule that enables "stunserver.exe" to have a global firewall exception (this is the preferred option).
Now after you get comfortable with starting and stopping the server program in a console window, you probably want to run stunserver.exe as a windows service such that it doesn't require logging in or manually starting. You can Google "run any program as a windows service" for utilities that will convert any console application to install and run as a Windows service.
Here's a link with some good suggestions: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable
I think I've had success with NSSM before.