วันอังคารที่ 31 พฤษภาคม พ.ศ. 2554

ปิด การทำงาน Windows firewall โดยใช้ Command DOS

ปิด การทำงาน Windows firewall โดยใช้ Command DOS

ปิด การทำงาน Windows firewall โดยใช้ Command DOS
การ ปิด การทำงาน Windows firewall โดยใช้ Command DOS
ต้องบอกก่อนว่าตัวเองก็ไม่ได้เก่ง สักเท่าไร อาสัยอ่านจาก MS technet ของ Microsoft เอาครับ
http://www.microsoft.com/technet
ลอง เข้าไปอ่านดู เนื้อหา สาระ เพียบ ครับ สำหรับคนใช้งาน ทั้ง Windows Server และ Windows Client


ก่อนอื่นเลย ต้องบอกไว้เลย นี่เป็น Script batfile Dos แบบง่ายๆ
ปัญหาส่วนนึงที่ IT เจอในองค์กรคือ
Windows Firewall ดัน Turn on ไว้ทำให้ Ping ไปไม่เจอ เครื่อง Client
ทำให้การ รับ/ส่งไฟล์ ติดขัด มีปัญหา ต่อระบบ
หนำซ้ำ User Sharefile บางครั้งเข้าได้บ้างไม่ได้บ้าง ตอนแรก นึกว่า Session เต็ม ที่ไหนดัน ดัน Turn Firewall ไว้ ซะนี่

ไหนๆ ก็ไหนๆ แล้ว องค์กร เราก้อ มี Firewall Block หลายชั้นอยู่แล้ว จะใช้ Windows Firewall ให้คาใจทำแปะ อะไร ปิดมันเสียดีกว่า

คำสั่ง ต่อไปนี้ ผมจะร่ายให้ฟัง ทีละคำสั่งแล้วกันนะ
เริ่มจาก

netsh firewall reset
เป็นคำ สั่ง Reset Windows Firewall ค่าต่างๆ ที่ถูก Exception ไว้ใน List จะถูก Delete ทั้งหมด

netsh firewall set opmode mode =disable exceptions = disable
เป็นคำสั่ง Reset Windows Firewall เช่นกัน แต่เงื่อนไขคือ
   opmode mode =disable Disable หรือ Off หรือ ปิด ในส่วนของ Firewall ที่แถบ General
   exceptions = disable Disable หรือ Off หรือ ปิด ในส่วนของ Firewall ที่แถบ exceptions

netsh firewall set notifications mode =disable profile = All
เป็นคำสั่ง ปิด ในส่วนของการแสดงรายการ การแจ้งเตือน packet/program เงื่อนไขคือ
   notifications mode =disable Disable หรือ Off หรือ ปิด ในส่วนของการแจ้งเตือน
   profile = All Disable หรือ Off หรือ ปิด ในส่วนของ Profile

netsh firewall set opmode mode =disable interface = "Network Name"
เป็นคำสั่ง ปิด ในส่วนของการแสดงรายการชื่อของ Network Card
   opmode mode =disable   Disable หรือ Off หรือ ปิด การทำการของ LAN Card
   interface = "Network Name" เลือก LAND Card ใบที่ต้องการปิด ในที่นี่คือชื่อ Network Name คุณสามารถดูชื่อได้จาก Network Connections ว่า CardLan ชื่ออะไร เมื่อได้ชื่อแล้วให้ใส่ แทนค่า Network Name นี้ครับ


DOS ตัวอย่างนี้ สามารถ COPY ใส่ Notepad แล้ว บันทักเป็นไฟล์ นามสกุล .bat ได้เลย ครับ
  1. @echo.
  2. @echo. ####### Don't close this page....
  3. @echo.
  4. @echo.
  5. @echo. Step 1.
  6. @echo. Restore Default Windows Firewall.
  7. @netsh firewall reset
  8. @echo. Step 2.
  9. @echo. Turn Off Windows Firewall Rule
  10. @netsh firewall set opmode mode =disable exceptions = disable
  11. @netsh firewall set notifications mode =disable profile = All
  12. @netsh firewall set opmode mode =disable interface = "Local Area Connection"
คัดลอกไปที่คลิปบอร์ด

ไม่มีความคิดเห็น:

แสดงความคิดเห็น