Score:0

Can't access Ubuntu Server with SSH after doing something with iptables

US flag

I'm trying to run a MC-Server on an Ubuntu Sever (Oracle Cloud). I already port forwarded 25565 and 22 but still couldn't access the server. I found these commands on another tutorial, but when I executed them my SSH connection stopped, and now it just says "Network Error: Connection timed out!"

sudo iptables -I INPUT -p tcp -m tcp --dport 25565 -j ACCEPT
sudo iptables -I INPUT -p udp -m udp --dport 25565 -j ACCEPT
sudo iptables -I OUTPUT -p tcp -m tcp --dport 25565 -j ACCEPT
sudo iptables -I OUTPUT -p udp -m udp --dport 25565 -j ACCEPT
sudo netfilter-persistent save
sudo netfilter-persistent reload
sudo iptables -F

I don't understand much about this topic, so please keep your answer simple.

user535733 avatar
cn flag
`sudo iptables -F` erased all your prior work. So now you have no rules at all.
Doug Smythies avatar
gn flag
You will have to show us your overall context, `sudo iptables -xvnL`. Have you set default policies to DROP?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.