0

I worked fine on a remote server (ubuntu-16.04), and when I ran the command from https://github.com/ubuntu/microk8s/issues/408 to fix a bridging problem in microk8s (kubernetes) I fell into a bigger problem and which isn't my domain either. I lost the connection to the server and I am no longer able to reconnect.

I suspect the following command:

sudo firewall-cmd --zone=trusted --add-masquerade --permanent

I don't know what the command did, I would just like to go back to the state before the execution of this damn command.

Adil Blanco
  • 111
  • 1
  • To remove *masquerade*, use the `--remove-masquerade` option. However, I am not sure if this command is the culprit. `--permanent` means that the change is only applied when you reboot (or restart the `firewalld` service). If you issue the command without `--permament`, it has an immediate effect (but the effect will disappear when rebooting). For more info, see the [manual](https://firewalld.org/documentation/man-pages/firewall-cmd.html). – berndbausch Feb 27 '21 at 05:53
  • You _should not_ use `--permanent` until you are certain your changes work the way you intended. Your current problem is one reason why. – Michael Hampton Feb 27 '21 at 14:01
  • Thank you for your quick reply, it worked by executing the following command `sudo firewall-cmd --zone=trusted --remove-masquerade` – Adil Blanco Feb 27 '21 at 17:56
  • @Adil Blanco, if your issue has been solved, you can consider posting this information in a form of an answer. – mario Mar 01 '21 at 15:05

1 Answers1

1

I executed the command sudo firewall-cmd --zone=trusted --add-masquerade --permanent by accident, thanks to @berndbausch and @Michael Hampton comments I solved the problem by executing the following commands:

sudo firewall-cmd --zone=trusted --remove-masquerade --permanent
sudo firewall-cmd --reload
Adil Blanco
  • 111
  • 1