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

Double connection needed #14

Closed
save-se opened this issue Jan 11, 2017 · 4 comments
Closed

Double connection needed #14

save-se opened this issue Jan 11, 2017 · 4 comments

Comments

@save-se
Copy link

save-se commented Jan 11, 2017

Hi,
When client tries to connect for the first, the IP succesfully added to ts3_authorized, but then the connection fails. If the client tries a second time, of course it works because the ip is already authorized.

EDIT: with the complex script, the IP remains in ts3_authorizing

@nwerensteijn
Copy link
Contributor

In the tests I have done, the client connects on the first try. I suspect something went wrong in the configuration of the firewall. The trick to avoid double connection necessity is that after a puzzle has been verified you send a GET-COOKIE request to the SERVER. In essense the firewall spoofs this get cookie request in the name of the client. The server will then send back a set-cookie to the client (if the firewall does not intercept it). It is of course important that at this stage, the firewall does not alter any more packets.

In the simple example this is done by
sudo ${IPTABLES} -A TS3_ACCEPT_NEW -p udp -j TS3INIT_GET_COOKIE

For teamspeak 3.1 clients you can also use the TS3INIT_RESET target. This works a bit differently. Instead of spoofing a get-cookie request to the SERVER, the reset packet will send a "reset" packet back to the client. It will start connecting all over again.

If this did not help you, I need the configuration of iptables to help you further

@save-se
Copy link
Author

save-se commented Jan 12, 2017

Than you for your reply. On a local machine it works, but I'm using a separate machine as a firewall. With tcpdump it seems that the spoofed cookie is not generated.

I just noticed that today 3.1 has been released, with TS3INIT_RESET it works so it makes sense to just switch to TS3INIT_RESET

@nwerensteijn
Copy link
Contributor

3.1 is being rolled out over the coming days. Not everyone is updated yet. Thank you for the report. We will look at it

nwerensteijn added a commit that referenced this issue Jan 13, 2017
@nwerensteijn
Copy link
Contributor

The issue with TS3INIT_GET_COOKIE should be fixed now

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