Hướng dẫn kích hoạt / vô hiệu hóa Windows Firewall bằng Command Prompt

Hướng dẫn kích hoạt / vô hiệu hóa Windows Firewall bằng Command Prompt

Firewall (tường lửa) giống như một bức rào chắn giữa hệ thống mạng nội bộ (local network) với một mạng khác (chẳng hạn như Internet), điều khiển lưu lượng truy cập dữ liệu vào ra.

Trong bài viết trước, Quản trị mạng đã hướng dẫn bạn cách kích hoạt / vô hiệu hóa Firewall (tường lửa) thông qua Control Panel. Trong bài viết dưới đây Quản trị mạng sẽ hướng dẫn bạn cách kích hoạt / vô hiệu hóa Windows Firewall bằng Command Prompt.

Phần 1: Kích hoạt / vô hiệu hóa Windows Firewall

Để kích hoạt / vô hiệu hóa Windows Firewall bằng Command Prompt, bạn thực hiện theo các bước dưới đây:

Bước 1:

Đầu tiên mở Command Prompt. Để làm được điều này, bạn nhập cmd vào khung Search trên Start Menu.

 mở Command Prompt

Bước 2:

Trên danh sách kết quả tìm kiếm, bạn kích chuột phải vào Command Prompt rồi click chọn Run as administrator để mở Command Prompt dưới quyền Admin.

kích chuột phải vào Command Prompt rồi click chọn Run as administrator

Bước 3:

Để tắt Windows Firewall, bạn nhập câu lệnh dưới đây vào cửa sổ Command Prompt:

netsh advfirewall set allprofiles state off

tắt Windows Firewall

Bước 4:

Nếu không xảy ra bất cứ lỗi nào, trên cửa sổ Command Prompt sẽ hiển thị thông báo kèm theo thông điệp OK.

trên cửa sổ Command Prompt sẽ hiển thị thông báo

Bước 5:

Trường hợp nếu muốn kích hoạt (mở lại) Windows Firewall, bạn thực hiện các bước tương tự và nhập câu lệnh dưới đây vào cửa sổ Command Prompt:

netsh advfirewall set allprofiles state on

kích hoạt (mở lại) Windows Firewall

Bước 6:

Nếu không xảy ra bất cứ lỗi nào, trên cửa sổ Command Prompt sẽ hiển thị thông báo kèm theo thông điệp OK.

 thông báo

2. Một số câu lệnh khác

Ngoài ra bạn có thể sử dụng một số câu lệnh khác để thao tác với Windows Firewall:

1. Kích hoạt / vô hiệu hóa Firewall cho tài khoản hiện tại

Nếu muốn kích hoạt hoặc vô hiệu hóa Windows Firewall cho tài khoản người dùng hiện tại, bạn sử dụng các câu lệnh dưới đây:

- Để vô hiệu hóa Windows Firewall:

netsh advfirewall set currentprofile state off

- Để kích hoạt Windows Firewall:

netsh advfirewall set currentprofile state on

2. Firewall trên Domain Network

- Để vô hiệu hóa Firewall:

netsh advfirewall set domainprofile state off

- Để kích hoạt Firewall:

netsh advfirewall set domainprofile state on

3. Firewall trên Public Network

- Vô hiệu hóa Windows Firewall:

netsh advfirewall set publicprofile state off

- Kích hoạt Windows Firewall"

netsh advfirewall set publicprofile state on

4. Firewall trên Private Network

- Vô hiệu hóa Windows Firewall:

netsh advfirewall set privateprofile state off

- Kích hoạt Windows Firewall:

netsh advfirewall set privateprofile state on

Tham khảo thêm một số bài viết dưới đây:

Chúc các bạn thành công!

Cập nhật tin tức công nghệ mới nhất tại fanpage Công nghệ & Cuộc sống

Nguồn tin:

 

Tham gia bình luận