Hướng dẫn mở port trên thiết bị tường lửa của Juniper

Hướng dẫn Nat Port - Port Forwarding trên thiết bị tường lửa của Juniper

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).

Hướng dẫn chi tiết 

Để đị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

Cấu hình zone

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

Cấu hình cổng 

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

Cấu hình nat policy

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

Cấu hình security policy

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

Kết luận

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.

CÔNG TY CỔ PHẦN DỊCH VỤ VÀ CÔNG NGHỆ DATECH
• Địa chỉ: Số 23E4 KĐT Cầu Diễn, Tổ 7, Phú Diễn, Bắc Từ Liêm, Hà Nội
• Điện thoại: 02432012368
• Hotline: 098 115 6699
 Email: info@datech.vn
• Website: https://datech.vn