#Unable to access my server with casaOS from any host in my LAN (messed up with iptables?)

9 messages · Page 1 of 1 (latest)

tight vortex
#

Hi guys, is there a way to reset the Docker-applied iptables rules to their default settings?

Context:

I was trying to configure ufw to only accept connections to the server from a couple of IP addresses on my LAN, and due to my lack of knowledge, I ended up breaking something.
I tried a few things I found on the web and then reverted them, but there's something wrong with the iptables rules that Docker applies when it starts, as I lose access from the LAN to the server.
It doesn't respond to ping, I can't access it via SSH, can't access casaOS web interface, or anything, even if I stop the iptables service (sudo systemctl stop iptables) and disable ufw (sudo ufw disable).
If I reboot the server, I can ping and SSH into it until Docker starts and applies the rules, at which point I lose access.

#

Things I tried to achieve what I wanted, but then reverted because didn't work:

  • Created the /etc/docker/daemon.json file to disable iptables, but then I deleted the file, so the change should be undone.
  • Added some lines to /etc/ufw/after.rules, which I later removed, so the change should be undone as well (I also disabled ufw, so that's not the issue).
#

Things I tried to reset iptables configurations:

sudo systemctl stop docker
sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo systemctl start docker
#

My actual iptables settings looks like this (sudo iptables -L):

#

BTW, while connected to the VPN from outside my network, I can access all contaniners and casaOS interface, SSH, ping, etc.

#

A working instalation on a VM, sames OS, looks like this (sudo iptables -L):

icy wadiBOT
#

GG @tight vortex, you just advanced to level 2!