Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install guide #27

Open
ph4t0o0o0om opened this issue Nov 8, 2018 · 3 comments
Open

Install guide #27

ph4t0o0o0om opened this issue Nov 8, 2018 · 3 comments

Comments

@ph4t0o0o0om
Copy link

how to install

@jselbie
Copy link
Owner

jselbie commented Nov 8, 2018

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

  1. Download the code and build it. Follow the instructions in the README file.
  2. After building, copy stunserver and stunclient binaries to /usr/bin
  3. 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

@ph4t0o0o0om
Copy link
Author

how to install on windows?

@jselbie
Copy link
Owner

jselbie commented Nov 9, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants