Désactiver le firewall ufw sur Ubuntu 20.04
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Désactiver le firewall ufw sur Ubuntu 20.04

by
Community Deleted user
Created on 2021-01-12 09:23:51 (edited on 2024-09-04 11:36:19) in Serveurs Privés Virtuels (VPS)

Bonjour,

J'ai un VPS sur Ubuntu 20.04.
Hier soir j'ai configuré le firewall **ufw**. Mal configuré, car ce matin je n'arrive plus à me connecter en **SSH** et mon site n'est plus accessible via **HTTP**.

J'ai redémarré mon serveur en mode **RESCUE**, me suis connecté en **SSH** avec l'utilisateur **root** et le mot de passe envoyé par mail.
Seulement là, le paquet **ufw** n'est pas installé, donc impossible de le désactivé, évidemment.

Comment pourrais-je faire pour désactiver ce dernier et repartir en mode "normal" ?

Merci d'avance pour votre aide.


1 Reply ( Latest reply on 2021-01-12 09:56:11 by
fritz2cat officiel (d'avant la migration)
)

Lu sur: https://www.linode.com/docs/guides/configure-firewall-with-ufw/

Il faut éditer à la main après avoir monté ton disque system dans /mnt

Edit UFW’s Configuration Files

Although simple rules can be added through the command line, there may be a time when more advanced or specific rules need to be added or removed. Prior to running the rules input through the terminal, UFW will run a file, before.rules, that allows loopback, ping, and DHCP. To add to alter these rules edit the /etc/ufw/before.rules file. A before6.rules file is also located in the same directory for IPv6.

An after.rule and an after6.rule file also exists to add any rules that would need to be added after UFW runs your command-line-added rules.

An additional configuration file is located at /etc/default/ufw. From here IPv6 can be disabled or enabled, default rules can be set, and UFW can be set to manage built-in firewall chains.