[resolved] Issue with Ubuntu's firewall (Oracle Cloud)

I’ve not seen in any guide mentioned it anywhere in any guide so I post it here.
In Oracle Cloud Service there is Ubuntu’s firewall that blocking ports, without which you can’t connect to the teamspeak server, so to resolve this issue you need to add ports exceptions by following command

apt install -y firewalld && firewall-cmd --state && firewall-cmd --add-port=9987/udp && firewall-cmd --add-port=10011/tcp && firewall-cmd --add-port=10022/tcp && firewall-cmd --add-port=10080/tcp && firewall-cmd --add-port=30033/tcp && firewall-cmd --add-port=41144/tcp && firewall-cmd --add-port=9987/udp --permanent && firewall-cmd --add-port=10011/tcp --permanent && firewall-cmd --add-port=10022/tcp --permanent && firewall-cmd --add-port=10080/tcp --permanent && firewall-cmd --add-port=30033/tcp --permanent && firewall-cmd --add-port=41144/tcp --permanent

and just incase there is one-line command to run the latest ts3 server, maybe someone need it

sudo su
apt-get -y update && apt-get -y upgrade && adduser -q --gecos GECOS --disabled-login teamspeak && wget $(curl -s TeamSpeak Downloads | TeamSpeak | grep -o ‘https://files.teamspeak-services.com/releases/server/.*/teamspeak3-server_linux_amd64-.*.tar.bz2’ | head -n1) && tar xvf teamspeak3-server_linux_amd64* && cd teamspeak3-server_linux_amd64 && mv * /home/teamspeak && cd … && rm -rf teamspeak3-server* && touch /home/teamspeak/.ts3server_license_accepted && chown -R teamspeak:teamspeak /home/teamspeak && echo -e “[Unit]\nDescription=TeamSpeak 3 Server\nAfter=network.target\n\n[Service]\nWorkingDirectory=/home/teamspeak/\nUser=teamspeak\nGroup=teamspeak\nType=forking\nExecStart=/home/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini\nExecStop=/home/teamspeak/ts3server_startscript.sh stop\nPIDFile=/home/teamspeak/ts3server.pid\nRestartSec=15\nRestart=always\n\n[Install]\nWantedBy=multi-user.target” >> /lib/systemd/system/teamspeak.service && systemctl --system daemon-reload && systemctl enable teamspeak.service && systemctl start teamspeak.service && systemctl status teamspeak.service && grep -hoE “token=(.+)” /home/teamspeak/logs/*

This will destroy iptables and the ssh will fail.

1 Like

That is correct, as port 22 is not included in the above firewall-cmd configuration. Four years ago, there was some weird issue with Oracle (and it still is, working as a DevOps and has never been seen in any other CP). If you don’t use a firewall, the VM doesn’t pass some device posture requirements and blocks incoming ports. IPtables, ufw, or firewall-cmd worked for me (choose one); magic happened when configuring them.
AI chat can adapt these rules to add SSH and any other port.
All the best.

Yep, thanks for the reply. I was having some troubles with migrating my ts server to oracle cloud then I found your post. I can’t believe the issue has been there for such a long time. But yes, not only the security list has to open the ports, the VM’s OS firewall has also to be (re)configured to allow the packets to pass through.

1 Like