Lab 02 Mô hình kết hợp giữa Juniper vSRX và DrayTek

thanhdc

Junior – IT Sơ cấp
Aug 10, 2014
124
3
18
I. Tổng quan:

1.1 Sơ đồ:



Bài lab này khá giống với
Lab 01 Cấu hình Juniper SRX làm router WAN

1.2. Yêu cầu:
- Cấu hình cơ bản cho Jupiter vSRX:
- Cấu hình DHCP
- Cấu hình zone
- Cấu hình policy
- Cấu hình Static Route, Open Ports trên DrayTek



1.3. VmWare Juniper vSRX:



Link download:
Juniper vSRX 12.1X47:https://drive.google.com/folderview?id=0Byd5pXHPhHDOV2N5VXBHTFlneGc&usp
Pass Unzip: svuit.com


II. Cấu hình cơ bản:

2.1 Cấu hình password root:

set system root-authentication plain-text-password
New password:xxxxxx
Retype new password:xxxxxx


2.2 Cấu hình hostname:
set system host-name hcm-svuit-vsrx

2.3 Cấu hình login Banner:
set system login message "Webcome to SVUIT.\n Lab Juniper SRX\n"

2.4 Cấu hình time-zone:
set system time-zone GMT+7

2.5 Cấu hình name-server:
set system name-server 8.8.8.8
set system name-server 4.2.2.2


2.6 Tạo user có full quyền quản trị:
set system login user svuit uid 2000
set system login user svuit class super-user
set system login user svuit authentication plain-text-password
New password:xxxxxx
Retype new password:xxxxxx


2.7 Cấu hình địa chỉ IP:
set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.2/24
set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.1/24
set interfaces ge-0/0/2 unit 0 family inet address 10.2.2.1/24


2.8 Cấu hình default Route:
set routing-options static route 0.0.0.0/0 next-hop 192.168.1.1


2.9 Cấu DHCP Server để cấp IP cho Client Inside:
set system services dhcp pool 10.1.1.0/24 address-range low 10.1.1.192 high 10.1.1.250
set system services dhcp pool 10.1.1.0/24 name-server 8.8.8.8
set system services dhcp pool 10.1.1.0/24 name-server 4.2.2.2
set system services dhcp pool 10.1.1.0/24 router 10.1.1.1


III. Cấu hình Zone:

3.1 Zone Outside:
set security zones security-zone Outside interfaces ge-0/0/0.0

Lưu ý:
Vì interface ge-0/0/0.0 mặc định đã được gán cho zone untrust,
nên trước khi gán interface ge-0/0/0.0 cho zone Outside thì phải gỡ bỏ interface ge-0/0/0.0 ra khỏi zone untrust
delete security zones security-zone untrust interfaces ge-0/0/0.0



3.2 Zone Inside:
set security zones security-zone Inside interfaces ge-0/0/1.0 host-inbound-traffic system-services ping
set security zones security-zone Inside interfaces ge-0/0/1.0 host-inbound-traffic system-services dhcp
set security zones security-zone Inside interfaces ge-0/0/1.0 host-inbound-traffic system-services http
set security zones security-zone Inside interfaces ge-0/0/1.0 host-inbound-traffic system-services https
set security zones security-zone Inside interfaces ge-0/0/1.0 host-inbound-traffic system-services ssh
set security zones security-zone Inside interfaces ge-0/0/1.0 host-inbound-traffic system-services telnet


3.3 Zone DMZ:
set security zones security-zone DMZ interfaces ge-0/0/2.0 host-inbound-traffic system-services ping
set security zones security-zone DMZ interfaces ge-0/0/2.0 host-inbound-traffic system-services http
set security zones security-zone DMZ interfaces ge-0/0/2.0 host-inbound-traffic system-services https
set security zones security-zone DMZ interfaces ge-0/0/2.0 host-inbound-traffic system-services ssh
set security zones security-zone DMZ interfaces ge-0/0/2.0 host-inbound-traffic system-services telnet


IV. Cấu hình Policy:

4.1 Inside to Outside:

set security policies from-zone Inside to-zone Outside policy Inside_Outside match source-address any
set security policies from-zone Inside to-zone Outside policy Inside_Outside match destination-address any
set security policies from-zone Inside to-zone Outside policy Inside_Outside match application any
set security policies from-zone Inside to-zone Outside policy Inside_Outside then permit


4.2 Inside to WEB:
set security policies from-zone Inside to-zone DMZ policy Web_Inside_DMZ match source-address any
set security policies from-zone Inside to-zone DMZ policy Web_Inside_DMZ match destination-address any
set security policies from-zone Inside to-zone DMZ policy Web_Inside_DMZ match application junos-http
set security policies from-zone Inside to-zone DMZ policy Web_Inside_DMZ match application junos-https
set security policies from-zone Inside to-zone DMZ policy Web_Inside_DMZ then permit


4.3 Outside to WEB:
set security policies from-zone Outside to-zone DMZ policy Web_Outside_DMZ match source-address any
set security policies from-zone Outside to-zone DMZ policy Web_Outside_DMZ match destination-address any
set security policies from-zone Outside to-zone DMZ policy Web_Outside_DMZ match application junos-http
set security policies from-zone Outside to-zone DMZ policy Web_Outside_DMZ match application junos-https
set security policies from-zone Outside to-zone DMZ policy Web_Outside_DMZ then permit


V. Cấu hình trên DrayTek:


5.1 Thông tin WAN:



5.2 Cấu hình Route:
Tạo 2 đường static route để chỉ đường đến Inside và DMZ



5.3 Cấu hình Open Ports cho phép truy cập vào Web ở zone DMZ:
Khi truy cập http://IPWAN (http://118.68.89.139) → http://10.2.2.200




 
Last edited:
KIỂM TRA CẤU HÌNH:

Show thông tin địa chỉ IP các Interface:




Show thông tin bảng định tuyến:




Show thông tin các zone:




Show thông tin các policy:




Show thông tin cấp DHCP:




Inside truy cập Internet, và truy cập Web trong DMZ




Bên ngoài truy cập Web trong DMZ




Lưu ý:
- Vì để bảo mật tốt cho DMZ nên mình ko cấu hình policy cho phép DMZ truy cập Inside, Outside
Nên từ DMZ, bạn ko thể ko thể truy cập Inside, Outside :D

Nhưng Inside, Outsde vẫn có thể truy cập http vào Web trong zone DMZ


 
Last edited:
Mình chưa biết gì về Juniper nên cho mình hỏi, ở bài lab này thanhdc có phải đang sử dụng route trên juniper và nat các dịch vụ từ draytek đúng k.
Thanhdc có thể giải thích cho mình về ý nghĩa của việc cấu hình zone trong bài lab này là gì được k
xin cảm ơn !!!
 
Trong bài Lab này mình ko trình bày phần cấu hình LAN, WAN trên DrayTek.
Mặc định thì trên DrayTek đã cấu hình PPPoE, NAT, DHCP,...
Vì trong sơ đồ DrayTek đóng vài trò làm NAT Router cho các Client hoặc Server ra Internet
nên mình không cấu hình NAT trên Juniper nữa...
Còn về ý nghĩa của các zone trê Juniper tương tự như ý nghĩa của các vùng Inside, Outside, DMZ trên Cisco ASA.
Chỉ có khác một chút là khi định nghĩa zone trên juniper thì gán luôn traffic được phép truy cập vào như ping, dhcp, http, https, telnet, ssh...
Mặc định thì trên Juniper nhà sản suất đã tạo sẵn 2 zone trust và untrust (trust tương tự như Inside, untrust tương tự như Outside trên Cisco ASA).
Mình ko thích sử dụng các zone trust, untrust, mình tạo các zone mới đặt tên Insize, Outside, DMZ (tên gọi giống như trên Cisco ASA cho dễ nhớ :D)
 
cho Mình hỏi,khi mình show interface ge-0/0/1 và ge-0/0/0 thì nó ra như thế này:


root@cntt# show interfaces ge-0/0/0
unit 0;



root@cntt# show interfaces ge-0/0/1
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}

mình không thể đặt ip cho interface ge-0/0/1 được như bài lab trên, bạn chỉ giúp mình làm sao có thể đưa ge-0/0/1 giống như ge-0/0/0

nó báo lỗi như thế này

root@cntt# set interfaces ge-0/0/1 unit 0 family inet address 10.1.1.1/24

[edit]
root@cntt# commit
[edit interfaces ge-0/0/1 unit 0]
'family'
When ethernet-switching family is configured on an interface, no other family type can be configured on the same interface.
error: configuration check-out failed

[edit]
root@cntt#

Xin cảm ơn
 
cho mình hỏi, bài hướng dẫn của bạn cho phép ping, http,https,... ở interface Inside
Giờ mình muốn Interface Inside thêm port 8082 vào thì làm như thế nào
mình cảm ơn
 

About us

  • Securityzone.vn là một trang web chuyên về an ninh mạng và công nghệ thông tin. Trang web này cung cấp các bài viết, tin tức, video, diễn đàn và các dịch vụ liên quan đến lĩnh vực này. Securityzone.vn là một trong những cộng đồng IT lớn và uy tín tại Việt Nam, thu hút nhiều người quan tâm và tham gia. Securityzone.vn cũng là nơi để các chuyên gia, nhà nghiên cứu, sinh viên và người yêu thích an ninh mạng có thể trao đổi, học hỏi và chia sẻ kiến thức, kinh nghiệm và giải pháp về các vấn đề bảo mật trong thời đại số.

Quick Navigation

User Menu