I have made this bot for Mastodon with mastodon.py:
https://github.com/aitormendez/loro/blob/main/loro.py
The bot listens to mentions and responds to them. I have it running at home on a raspberry pi with raspberry OS lite running. I'm trying to configure ufw (firewall) but when I activate it the bot stops working.
What ports should I open for the bot? As far as I know, there is no need to open any listening port, but if I activate ufw the bot stops working. I really don't know why the bot stops working when I activate the firewall or what ports I should leave open for it to work correctly. How can I know that?
This is the ufw configuration:
aitor@raspberrypi:~ $ sudo ufw status
Status: active
To Action From
22/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)