
CÔNG TY CỔ PHẦN DỊCH VỤ CÔNG NGHỆ DATECH
Danh sách nội dung [Ẩn]
Nat Port hay Port Forwading là hình thức mở port cho các ứng dụng trong mạng nội bộ để có thể được quản lý, giám sát hay vận hành từ xa, ra môi trường Internet bên ngoài.
Để cấu hình NAT port cần phải xác định được địa chỉ đích, port gốc (ogrignal port hay thông thường là to-port) và port phiên dịch (translate port hay dest port), xác định cổng In.interface (interface ngõ vào) hay địa chỉ In.address (thường là địa chỉ WAN).
Để định cấu hình chuyển tiếp cổng cho tường lửa Juniper SRX, bạn phải thực hiện chuyển hướng NAT trong Juniper CLI. Phần này mô tả một ví dụ về cách thực hiện việc này đối với các địa chỉ và cổng của hai máy chủ gốc (các địa chỉ và cổng bên trái được định cấu hình trong Imperva và các địa chỉ và cổng bên phải là các cổng và IP nội bộ được sử dụng trong mạng của bạn):
172.16.1.2:22 --> 192.168.1.5:2222
172.16.1.2:3389 --> 192.168.1.6:3389
set security zones security-zone trust address-book address Server1 192.168.1.5/32
set security zones security-zone trust address-book address Server2 192.168.1.6/32
set applications aplication SSH-DNAT protocol tcp
set applications application SSH-DNAT destination-port 2222
set applications application RDP protocol tcp
set applications application RDP destination-port 3389
set security nat destination pool dnat-192_168_1_5m32 address 192.168.1.5/32
set security nat destination pool dnat-192_168_1_5m32 address port 22
set security nat destination pool dnat-192_168_1_6m32 address 192.168.1.6/32
set security nat destination pool dnat-192_168_1_6m32 address port 3389
set security nat destination rule-set dst-nat from zone untrust
set security nat destination rule-set dst-nat rule rule1 match destination-address 172.16.1.2/32
set security nat destination rule-set dst-nat rule rule1 match destination-port 2222
set security nat destination rule-set dst-nat rule rule1 then destination-nat pool dnat-192_168_1_5m32
set security nat destination rule-set dst-nat rule rule2 match destination-address 172.16.1.2/32
set security nat destination rule-set dst-nat rule rule2 match destination-port 3389
set security nat destination rule-set dst-nat rule rule2 then destination-nat pool dnat-192_168_1_6m32
set security policies from-zone untrust to-zone trust policy untrust-to-trust1 match source-address any
set security policies from-zone untrust to-zone trust policy untrust-to-trust1 match destination-address server1
set security policies from-zone untrust to-zone trust policy untrust-to-trust1 match application SSH
set security policies from-zone untrust to-zone trust policy untrust-to-trust1 then permit
set security policies from-zone untrust to-zone trust policy untrust-to-trust2 match source-address any
set security policies from-zone untrust to-zone trust policy untrust-to-trust2 match destination-address server2
set security policies from-zone untrust to-zone trust policy untrust-to-trust2 match application RDP
set security policies from-zone untrust to-zone trust policy untrust-to-trust2 then permit
Trên đây là hướng dẫn cấu hình mở port trên thiết bị tường lửa Juniper. Nếu có bất cứ thắc mắc cần giải đáp vui lòng để lại bình luận dưới phần comment để được hỗ trợ sớm nhất.