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

Access 10543 from outside of the NabazTag #101

Closed
Ellerbach opened this issue Feb 13, 2020 · 4 comments
Closed

Access 10543 from outside of the NabazTag #101

Ellerbach opened this issue Feb 13, 2020 · 4 comments

Comments

@Ellerbach
Copy link

Is there a way to get connected to port 10543 from outside to be able to interact with the NabazTag and create services that will stand outside of the Pi?

@pguyot
Copy link
Collaborator

pguyot commented Feb 13, 2020

nabd voluntarily only listens to the local interface.

This is done here (launched from command line):
https://github.com/nabaztag2018/pynab/blob/v0.7.4/nabd/nabd.py#L736
And here (launched from systemd):
https://github.com/nabaztag2018/pynab/blob/v0.7.4/nabd/nabd.socket#L2

ssh is disabled by default on release images, however you can easily setup a tunnel.

You can access a more limited and undocumented API from nabblockly, though, via HTTP on port 8080.

@Ellerbach
Copy link
Author

Thanks.

And here (launched from systemd):
https://github.com/nabaztag2018/pynab/blob/v0.7.4/nabd/nabd.socket#L2

I've changed the 127.0.0.1 for 0.0.0.0 which should be any IP and rebooted but seems there is still no luck. I'd really like to intercept some of the events. So the nabblockly is not enough unfortunately.

@pguyot
Copy link
Collaborator

pguyot commented Feb 14, 2020

You do not need to reboot the whole system, you only need to alter the systemd configuration file.
This is what I did, and it worked well:

sudo sed -i -e 's|127.0.0.1|0.0.0.0|g' /lib/systemd/system/nabd.socket
sudo systemctl daemon-reload
sudo systemctl stop nabd.service
sudo systemctl restart nabd.socket
sudo systemctl start nabd.service

Let me know if it works for you.

@Ellerbach
Copy link
Author

Let me know if it works for you.

Yes, worked! Found the trick in parallel looking at the install script. Thanks! Will close the Issue

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