Server Core - Các câu lệnh cấu hình mạng

Quản Trị Mạng - Mục đích của bài viết này cung cấp cho bạn những gì cần biết để quản lý và chạy được Server Core trong môi trường mạng.

Để bắt đầu, chúng tôi sẽ giới thiệu các câu lệnh liên quan tới Networking and Firewall trên Server Core. Để cấu hình địa chỉ IP bạn sẽ phải nhớ đến lệnh Netsh. Trong ví dụ này, chúng tôi sử dụng tên mạng là "Local Area Connection", nếu bạn đã đổi tên mới cho kết nối của mình, hãy sử dụng tên đó để thay thế vào trong ví dụ này.

Cấu hình một địa chỉ IP tĩnh trên Server Core:
Netsh int ipv4 set address Local Area Connection static 10.1.1.10 255.255.255.0 10.1.1.1
Netsh int ipv4 set dnsserver Local Area Connection static 10.1.1.5 primary
Netsh int ipv4 set winsserver Local Area Connection static 10.1.1.6 primary

Cấu hình một địa chỉ IP động (DHCP) trên Server Core:
Netsh int ipv4 set address Local Area Connection source=dhcp

Thay đổi tên giao diện mạng trên Server Core:
Netsh int set interface name = Local Area Connection newname = Primary Network

Windows Firewall là một thành phần khá phức tạp, nó là thành phần không thể thiếu để bảo mật mạng nhưng đôi khi lại gây phức tạp cho những người không biết sử dụng. Dù thế nào đi nữa thì nó lại là thành phần được cài đặt mặc định và nếu bạn muốn vô hiệu hóa nó thì sử dụng câu lệnh
netsh firewall set opmode disable

Server Core có thể được quản lý từ xa bằng cách sử dụng MMCs. Tuy nhiên, với Firewall được bật mặc định thì bạn sẽ phải được sự cho phép của công cụ này mới có thể kết nối từ xa. Điều cần lưu ý đầu tiên ở đây là làm thế nào để dịch MMC Snap-in sang Windows Firewall Rule Group.

Event Viewer -> Windows Firewall Rule Group - Remote Event Log Management
Services -> Windows Firewall Rule Group - Remote Services Management
Shared Folders -> Windows Firewall Rule Group - File and Printer Sharing
Task Scheduler -> Windows Firewall Rule Group - Remote Scheduled Tasks Management
Reliability and Performance -> Windows Firewall Rule Group - Performance Logs and Alerts and Windows Firewall Rule Group -> File and Printer Sharing
Disk Management -> Windows Firewall Rule Group - Remote Volume Management
Windows Firewall with Advanced Security -> Windows Firewall Rule Group - Windows Firewall Remote Management

Để kích hoạt toàn bộ các Rules trên, bạn sử dụng câu lệnh:
Netsh advfirewall firewall set rule group=remote administration new enable=yes.

Thứ Tư, 29/06/2011 10:30
51 👨 6.223
0 Bình luận
Sắp xếp theo
    ❖ Tổng hợp