Comment bloquer le port 21 de mon accès Internet?
J'ai reçu une notification comme quoi la connexion Internet de mon PC présentait des "vulnérabilités" (accès sans authentification) du fait du port 21 qui est "ouvert". La remédiation serait donc de fermer / bloquer ce port 21. D'après ce que je comprends, un port n'est ouvert que parce qu'une ou plusieurs applications l'utilisent. Comment puis-je savoir quelle(s) application(s) utilisent ce port 21, et pourquoi?
Donc pouvez-vous m'aider sur la manière de détecter les applications utilisant le port 21 et surtout sur la manière d'empêcher que ce port 21 soit utilisé, compte tenu de la vulnérabilité qu'il entraine?
D'avance merci!
Réponses
-
Detecting Applications Using Port 21
You can use the lsof command in Terminal to list all processes with network sockets open. Here’s how you can do it:
1) Open Terminal.
2) Type the following command and press Enter: sudo lsof -i :21
This command will list all applications using port 21. If you want to see more details about a specific process, you can use the ps -xEf -p PID command, where PID is the Process ID you got from the previous command.
Blocking Port 21
To block port 21, you can use the built-in firewall settings on your Mac. Here’s how:
1) Choose Apple menu > System Preferences.
2) Click Network in the sidebar, then click Firewall.
3) Click Firewall Options.
4) Click the Add button under the list of applications and services.
5) Select the apps or services you want to add.
6) After an app or service is added, click its up and down arrows and choose whether to allow or block connections through the firewall.
Kindly note that blocking an app’s access through the firewall could interfere with or affect the performance of the app or other software that may depend on it.
Regards
Life happens, Coffee helps!
Show your Attitude, when you reach that Altitude!
Bitdefender Ultimate Security Plus (user)
0 -
When you say "terminal", is it my PC (windows 11)? I Have prompted that command and it is not recognized... IOW, where do I have to execute the command "sudo lsof -i :21"
My PC is not an Apple OS, but Windows 11 OS. Could you show me the process to block port 21 for a non Apple PC?
Thanks
0 -
Well, you asked the query in the MAC category of the forum, and hence the answer was provided with respect to it.
Well related to Windows 11, check on below stated steps:
Detecting Applications Using Port 21:
- Open the Command Prompt by searching for cmd in the start menu, right-click on the Command Prompt and select Run as Administrator.
- In the elevated command prompt window, execute the command netstat -ab. This will give you a list of all the ports in use by various programs.
- Look for the port number right next to the IP address in the output result. The port number will be shown after the colon (eg, '192.168.42.198:21'). The application using the port will be displayed next to the port number.
Blocking Port 21:
- Press Windows + R keys together to open the RUN command box.
- Type wf.msc and click OK. This will open the Windows Firewall with Advanced Security.
- In the left menu, select Inbound Rules.
- Click on the New Rule option in the extreme right menu panel.
- Select Port and then click on Next.
- Choose Specific local ports, enter 21 there, and click Next.
- Choose Block the connection option in this page.
- In the next page, leave the settings as default and again click on Next.
- Finally, enter any name you wish for this new rule.
- Click on Finish.
This should block port 21 and prevent any applications from using it, thus mitigating the vulnerability. Please remember to perform these steps with caution, as incorrect changes can affect your system's network functionality. If you're unsure, consider seeking help from a professional.
If issue persists, kindly contact Bitdefender support by visiting https://www.bitdefender.com/consumer/support/
Based on your selected product and the type of issue you're facing, you can get in touch with a support representative through email, chat, or a phone call.
If you choose email, you will receive a ticket number on your registered email. The support team will reply within the next 24-48 hours, excluding weekends.
Regards
Life happens, Coffee helps!
Show your Attitude, when you reach that Altitude!
Bitdefender Ultimate Security Plus (user)
1
Leaders
Catégories
- Toutes les catégories
- 634 Windows
- 33 Mac
- 99 Mobile Security
- 241 VPN
- 247 Central et abonnements
- 141 Autres produits et services
- 79 Équipe de recherche sur la sécurité
- 30 Fonctionnalités du produit et idéation
- 89 Thèmes généraux
- 7.2K Particuliers & bureau à domicile
- 575 Malwares et envoi dexemples
- 2.7K Vieux sujets
- Archiver